diff --git a/README.md b/README.md index 5fc657b1..601ffd97 100644 --- a/README.md +++ b/README.md @@ -32,25 +32,25 @@ Install the SDK by adding the following dependency in your project's pom.xml fil com.maxio advanced-billing-sdk - 9.0.0 + 9.1.0 ``` You can also view the package at: -https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/9.0.0 +https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/9.1.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/client.md) The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | | site | `String` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | -| environment | [`Environment`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | -| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.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/9.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| environment | [`Environment`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.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/9.1.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -93,68 +93,68 @@ 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/9.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-products.md) -* [Subscription Renewals](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-renewals.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/configuration-interface.md) -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-client-configuration.md) -* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-client-configuration-builder.md) -* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-proxy-configuration.md) -* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-proxy-configuration-builder.md) +* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/configuration-interface.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-client-configuration.md) +* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-client-configuration-builder.md) +* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-proxy-configuration.md) +* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-proxy-configuration-builder.md) ### HTTP -* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/headers.md) -* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-callback-interface.md) -* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-context.md) -* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-body-request.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-string-response.md) +* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/headers.md) +* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-callback-interface.md) +* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-context.md) +* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-body-request.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/http-string-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/api-exception.md) -* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/api-helper.md) -* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/file-wrapper.md) -* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/date-time-helper.md) +* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/api-exception.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/api-helper.md) +* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/file-wrapper.md) +* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.1.0/doc/date-time-helper.md) diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index e78609b1..d47d70ee 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. [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 for 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. @@ -28,6 +28,10 @@ Invoice issueAdvanceInvoice( final IssueAdvanceInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -37,6 +41,8 @@ Invoice issueAdvanceInvoice( ## Response Type +**201**: Created + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -67,13 +73,17 @@ try { # Read Advance Invoice -Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle. +Returns the advance invoice generated for a subscription's upcoming renewal. There can only be one advance invoice per subscription per billing cycle. ```java Invoice readAdvanceInvoice( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -82,6 +92,8 @@ Invoice readAdvanceInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -115,6 +127,10 @@ Invoice voidAdvanceInvoice( final VoidInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -124,6 +140,8 @@ Invoice voidAdvanceInvoice( ## Response Type +**201**: Created + [`Invoice`](../../doc/models/invoice.md) ## Example Usage diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 65d302cd..18d6c526 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -23,7 +23,7 @@ APIExportsController aPIExportsController = client.getAPIExportsController(); # List Exported Proforma Invoices -This API returns an array of exported proforma invoices for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported proforma invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. @@ -32,6 +32,10 @@ List listExportedProformaInvoices( final ListExportedProformaInvoicesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ List listExportedProformaInvoices( ## Response Type +**200**: OK + [`List`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -69,7 +75,7 @@ try { # List Exported Invoices -This API returns an array of exported invoices for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. @@ -78,6 +84,10 @@ List listExportedInvoices( final ListExportedInvoicesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -86,6 +96,8 @@ List listExportedInvoices( ## Response Type +**200**: OK + [`List`](../../doc/models/invoice.md) ## Example Usage @@ -115,7 +127,7 @@ try { # List Exported Subscriptions -This API returns an array of exported subscriptions for a provided `batch_id`. Pay close attention to pagination in order to control responses from the server. +Lists exported subscriptions for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. @@ -124,6 +136,10 @@ List listExportedSubscriptions( final ListExportedSubscriptionsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -132,6 +148,8 @@ List listExportedSubscriptions( ## Response Type +**200**: OK + [`List`](../../doc/models/subscription.md) ## Example Usage @@ -161,7 +179,7 @@ try { # Export Proforma Invoices -This API creates a proforma invoices export and returns a batchjob object. +Creates a proforma invoices export and returns a batch job object. It is only available for Relationship Invoicing architecture. @@ -169,8 +187,14 @@ It is only available for Relationship Invoicing architecture. BatchJobResponse exportProformaInvoices() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -196,14 +220,20 @@ try { # Export Invoices -This API creates an invoices export and returns a batchjob object. +Creates an invoices export and returns a batch job object. ```java BatchJobResponse exportInvoices() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -229,14 +259,20 @@ try { # Export Subscriptions -This API creates a subscriptions export and returns a batchjob object. +Creates a subscriptions export and returns a batch job object. ```java BatchJobResponse exportSubscriptions() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**201**: Created + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -261,13 +297,17 @@ try { # Read Proforma Invoices Export -This API returns a batchjob object for proforma invoices export. +Returns a batch job object for a proforma invoices export. ```java BatchJobResponse readProformaInvoicesExport( final String batchId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -276,6 +316,8 @@ BatchJobResponse readProformaInvoicesExport( ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -300,13 +342,17 @@ try { # Read Invoices Export -This API returns a batchjob object for invoices export. +Returns a batch job object for an invoices export. ```java BatchJobResponse readInvoicesExport( final String batchId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -315,6 +361,8 @@ BatchJobResponse readInvoicesExport( ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage @@ -339,13 +387,17 @@ try { # Read Subscriptions Export -This API returns a batchjob object for subscriptions export. +Returns a batch job object for a subscriptions export. ```java BatchJobResponse readSubscriptionsExport( final String batchId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -354,6 +406,8 @@ BatchJobResponse readSubscriptionsExport( ## Response Type +**200**: OK + [`BatchJobResponse`](../../doc/models/batch-job-response.md) ## Example Usage diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index b4faa9e0..af85e8f3 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -18,11 +18,13 @@ BillingPortalController billingPortalController = client.getBillingPortalControl # Enable Billing Portal for Customer +Enables Billing Portal access for a customer, with an option to send an invitation email at the same time. + ## Billing Portal Documentation Full documentation on how the Billing Portal operates within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). -This documentation is focused on how the to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. +This documentation is focused on how to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. You can use this endpoint to enable Billing Portal access for a Customer, with the option of sending the Customer an Invitation email at the same time. @@ -40,6 +42,10 @@ CustomerResponse enableBillingPortalForCustomer( final AutoInvite autoInvite) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -49,6 +55,8 @@ CustomerResponse enableBillingPortalForCustomer( ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -75,7 +83,7 @@ try { # Read Billing Portal Link -This method will provide to the API user the exact URL required for a subscriber to access the Billing Portal. +Returns the exact URL required for a subscriber to access the Billing Portal. ## Rules for Management Link API @@ -90,6 +98,10 @@ PortalManagementLink readBillingPortalLink( final int customerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -98,6 +110,8 @@ PortalManagementLink readBillingPortalLink( ## Response Type +**200**: OK + [`PortalManagementLink`](../../doc/models/portal-management-link.md) ## Example Usage @@ -140,15 +154,13 @@ try { # Resend Billing Portal Invitation -You can resend a customer's Billing Portal invitation. +Resends a customer's Billing Portal invitation. -If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with `error` message in the body. +If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with an `error` message in the body. If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. -If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. - -If you attempt to resend an invitation when the Customer does not exist a Customer, you will receive a `404` error response. +If you attempt to resend an invitation when the Customer does not exist, you will receive a `404` error response. ## Limitations @@ -159,6 +171,10 @@ ResentInvitation resendBillingPortalInvitation( final int customerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -167,6 +183,8 @@ ResentInvitation resendBillingPortalInvitation( ## Response Type +**200**: OK + [`ResentInvitation`](../../doc/models/resent-invitation.md) ## Example Usage @@ -205,7 +223,7 @@ try { # Revoke Billing Portal Access -You can revoke a customer's Billing Portal invitation. +Revokes a customer's Billing Portal invitation. If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response. @@ -218,6 +236,10 @@ RevokedInvitation revokeBillingPortalAccess( final int customerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -226,6 +248,8 @@ RevokedInvitation revokeBillingPortalAccess( ## Response Type +**200**: OK + [`RevokedInvitation`](../../doc/models/revoked-invitation.md) ## Example Usage diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 683bc4db..d28d6129 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -38,6 +38,10 @@ ComponentResponse promoteComponentPricePointToDefault( final int pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ ComponentResponse promoteComponentPricePointToDefault( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -107,6 +113,10 @@ ComponentPricePointResponse createComponentPricePoint( final CreateComponentPricePointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -116,6 +126,8 @@ ComponentPricePointResponse createComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -180,7 +192,7 @@ try { # List Component Price Points -Use this endpoint to read current price points that are associated with a component. +Lists the price points associated with a component. You may specify the component by using either the numeric id or the `handle:gold` syntax. @@ -193,6 +205,10 @@ ComponentPricePointsResponse listComponentPricePoints( final ListComponentPricePointsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -201,6 +217,8 @@ ComponentPricePointsResponse listComponentPricePoints( ## Response Type +**201**: Created + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -274,7 +292,7 @@ try { # Bulk Create Component Price Points -Use this endpoint to create multiple component price points in one request. +Creates multiple component price points in one request. ```java ComponentPricePointsResponse bulkCreateComponentPricePoints( @@ -282,6 +300,10 @@ ComponentPricePointsResponse bulkCreateComponentPricePoints( final CreateComponentPricePointsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -291,6 +313,8 @@ ComponentPricePointsResponse bulkCreateComponentPricePoints( ## Response Type +**200**: OK + [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) ## Example Usage @@ -445,6 +469,10 @@ ComponentPricePointCurrencyOverageResponse cloneComponentPricePoint( final CloneComponentPricePointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -455,6 +483,8 @@ ComponentPricePointCurrencyOverageResponse cloneComponentPricePoint( ## Response Type +**201**: Created + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -566,7 +596,7 @@ try { # Update Component Price Point -When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones. +Updates a component price point and its associated prices. Passing in a price bracket without an `id` will attempt to create a new price. @@ -581,6 +611,10 @@ ComponentPricePointResponse updateComponentPricePoint( final UpdateComponentPricePointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -591,6 +625,8 @@ ComponentPricePointResponse updateComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -650,7 +686,7 @@ try { # Read Component Price Point -Use this endpoint to retrieve details for a specific component price point. You can achieve this by using either the component price point ID or handle. +Returns details for a specific component price point. You can achieve this by using either the component price point ID or handle. ```java ComponentPricePointCurrencyOverageResponse readComponentPricePoint( @@ -659,6 +695,10 @@ ComponentPricePointCurrencyOverageResponse readComponentPricePoint( final Boolean currencyPrices) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -669,6 +709,8 @@ ComponentPricePointCurrencyOverageResponse readComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -692,7 +734,7 @@ try { # Archive Component Price Point -A price point can be archived at any time. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. +Archives a component price point. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. ```java ComponentPricePointResponse archiveComponentPricePoint( @@ -700,6 +742,10 @@ ComponentPricePointResponse archiveComponentPricePoint( final ArchiveComponentPricePointPricePointId pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -709,6 +755,8 @@ ComponentPricePointResponse archiveComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -774,7 +822,7 @@ try { # Unarchive Component Price Point -Use this endpoint to unarchive a component price point. +Unarchives a component price point. ```java ComponentPricePointResponse unarchiveComponentPricePoint( @@ -782,6 +830,10 @@ ComponentPricePointResponse unarchiveComponentPricePoint( final int pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -791,6 +843,8 @@ ComponentPricePointResponse unarchiveComponentPricePoint( ## Response Type +**200**: OK + [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) ## Example Usage @@ -844,7 +898,7 @@ try { # Create 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 defined at the site level. When creating currency prices, they need to mirror the structure of your primary pricing. For each price level defined on the component price point, there should be a matching price level created in the given currency. @@ -856,6 +910,10 @@ ComponentCurrencyPricesResponse createCurrencyPrices( final CreateCurrencyPricesRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -865,6 +923,8 @@ ComponentCurrencyPricesResponse createCurrencyPrices( ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -923,7 +983,7 @@ try { # Update Currency Prices -This endpoint allows you to update currency prices for a given currency that has been defined on the site level in your settings. +Updates currency prices for a given currency defined at the site level. Note: Currency Prices are not able to be updated for custom price points. @@ -933,6 +993,10 @@ ComponentCurrencyPricesResponse updateCurrencyPrices( final UpdateCurrencyPricesRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -942,6 +1006,8 @@ ComponentCurrencyPricesResponse updateCurrencyPrices( ## Response Type +**200**: OK + [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) ## Example Usage @@ -1000,13 +1066,17 @@ try { # List All Component Price Points -This method allows to retrieve a list of Components Price Points belonging to a Site. +Lists all component price points belonging to a site. ```java ListComponentsPricePointsResponse listAllComponentPricePoints( final ListAllComponentPricePointsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1015,6 +1085,8 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( ## Response Type +**200**: OK + [`ListComponentsPricePointsResponse`](../../doc/models/list-components-price-points-response.md) ## Example Usage diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 105ab5e1..b84eb58c 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -12,7 +12,7 @@ ComponentsController componentsController = client.getComponentsController(); * [Create Metered Component](../../doc/controllers/components.md#create-metered-component) * [Create Quantity Based Component](../../doc/controllers/components.md#create-quantity-based-component) -* [Create on Off Component](../../doc/controllers/components.md#create-on-off-component) +* [Create On Off Component](../../doc/controllers/components.md#create-on-off-component) * [Create Prepaid Usage Component](../../doc/controllers/components.md#create-prepaid-usage-component) * [Create Event Based Component](../../doc/controllers/components.md#create-event-based-component) * [Find Component](../../doc/controllers/components.md#find-component) @@ -26,9 +26,9 @@ ComponentsController componentsController = client.getComponentsController(); # Create Metered Component -This request will create a component definition of kind **metered_component** under the specified product family. Metered component can then be added and “allocated” for a subscription. +Creates a metered component definition under the specified product family. A metered component can then be added and “allocated” for a subscription. -Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Adwords clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes. +Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Ads clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing 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. @@ -40,6 +40,10 @@ ComponentResponse createMeteredComponent( final CreateMeteredComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -49,6 +53,8 @@ ComponentResponse createMeteredComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -147,9 +153,9 @@ try { # Create Quantity Based Component -This request will create a component definition of kind **quantity_based_component** under the specified product family. Quantity Based component can then be added and “allocated” for a subscription. +Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription. -When defining Quantity Based component, You can choose one of 2 types: +When defining a Quantity Based component, you can choose one of 2 types: #### Recurring @@ -169,6 +175,10 @@ ComponentResponse createQuantityBasedComponent( final CreateQuantityBasedComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -178,6 +188,8 @@ ComponentResponse createQuantityBasedComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -272,9 +284,9 @@ try { | 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | -# Create on Off Component +# Create On Off Component -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. +Creates an On/Off component definition under the specified product family. An 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). @@ -286,6 +298,10 @@ ComponentResponse createOnOffComponent( final CreateOnOffComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -295,6 +311,8 @@ ComponentResponse createOnOffComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -376,7 +394,7 @@ try { # Create Prepaid Usage Component -This request will create a component definition of kind **prepaid_usage_component** under the specified product family. Prepaid component can then be added and “allocated” for a subscription. +Creates a prepaid usage component definition under the specified product family. A prepaid component can then be added and “allocated” for a subscription. 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. @@ -388,6 +406,10 @@ ComponentResponse createPrepaidUsageComponent( final CreatePrepaidComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -397,6 +419,8 @@ ComponentResponse createPrepaidUsageComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -529,7 +553,7 @@ try { # Create Event Based Component -This request will create a component definition of kind **event_based_component** under the specified product family. Event-based component can then be added and “allocated” for a subscription. +Creates an event-based component definition under the specified product family. An event-based component can then be added and “allocated” for a subscription. Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription. @@ -543,6 +567,10 @@ ComponentResponse createEventBasedComponent( final CreateEBBComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -552,6 +580,8 @@ ComponentResponse createEventBasedComponent( ## Response Type +**201**: Created + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -642,13 +672,17 @@ try { # Find Component -This request will return information regarding a component having the handle you provide. You can identify your components with a handle so you don't have to save or reference the IDs we generate. +Returns information for a component matching the provided handle. You can identify your components with a handle so you don't have to save or reference the IDs we generate. ```java ComponentResponse findComponent( final String handle) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -657,6 +691,8 @@ ComponentResponse findComponent( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -715,6 +751,10 @@ ComponentResponse readComponent( final String componentId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -724,6 +764,8 @@ ComponentResponse readComponent( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -774,7 +816,7 @@ try { # Update Product Family Component -This request will update a component from a specific product family. +Updates a component from a specific product family. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. @@ -785,6 +827,10 @@ ComponentResponse updateProductFamilyComponent( final UpdateComponentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -795,6 +841,8 @@ ComponentResponse updateProductFamilyComponent( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -858,7 +906,7 @@ try { # Archive Component -Sending a DELETE request to this endpoint will archive the component. All current subscribers will be unffected; their subscription/purchase will continue to be charged as usual. +Archives the component; all current subscribers will continue to be charged as usual. ```java Component archiveComponent( @@ -866,6 +914,10 @@ Component archiveComponent( final String componentId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -875,6 +927,8 @@ Component archiveComponent( ## Response Type +**200**: OK + [`Component`](../../doc/models/component.md) ## Example Usage @@ -928,13 +982,17 @@ try { # List Components -This request will return a list of components for a site. +Lists components for a site. ```java List listComponents( final ListComponentsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -943,6 +1001,8 @@ List listComponents( ## Response Type +**200**: OK + [`List`](../../doc/models/component-response.md) ## Example Usage @@ -1071,7 +1131,7 @@ try { # Update Component -This request will update a component. +Updates a component. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. @@ -1081,6 +1141,10 @@ ComponentResponse updateComponent( final UpdateComponentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1090,6 +1154,8 @@ ComponentResponse updateComponent( ## Response Type +**200**: OK + [`ComponentResponse`](../../doc/models/component-response.md) ## Example Usage @@ -1152,13 +1218,17 @@ try { # List Components for Product Family -This request will return a list of components for a particular product family. +Lists components for a particular product family. ```java List listComponentsForProductFamily( final ListComponentsForProductFamilyInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1167,6 +1237,8 @@ List listComponentsForProductFamily( ## Response Type +**200**: OK + [`List`](../../doc/models/component-response.md) ## Example Usage diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index dd1be3c1..282fd5c0 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -28,27 +28,26 @@ CouponsController couponsController = client.getCouponsController(); # Create Coupon -## Coupons Documentation - -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, 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 by specyfing `percentage`. +Creates a coupon under the specified product family. +You can create either a flat amount coupon by specifying amount_in_cents, or a percentage coupon by specifying percentage You can restrict a coupon to only apply to specific products / components by optionally passing in `restricted_products` and/or `restricted_components` objects in the format: `{ "": boolean_value }` +Coupons can be administered in the Advanced Billing application or created via API. See [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. + +See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. + ```java CouponResponse createCoupon( final int productFamilyId, final CouponRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -58,6 +57,8 @@ CouponResponse createCoupon( ## Response Type +**201**: Created + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -109,13 +110,17 @@ try { # List Coupons for Product Family -List coupons for a specific Product Family in a Site. +Lists coupons for a specific product family in a site. ```java List listCouponsForProductFamily( final ListCouponsForProductFamilyInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -124,6 +129,8 @@ List listCouponsForProductFamily( ## Response Type +**200**: OK + [`List`](../../doc/models/coupon-response.md) ## Example Usage @@ -254,7 +261,7 @@ try { # Find Coupon -You can search for a coupon via the API with the find method. By passing a code parameter, the find will attempt to locate a coupon that matches that code. If no coupon is found, a 404 is returned. +Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code parameter, the find will attempt to locate a coupon that matches that code. If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, then you will need to specify (either in the url or as a query string param) the product family id. @@ -265,6 +272,10 @@ CouponResponse findCoupon( final Boolean currencyPrices) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -275,6 +286,8 @@ CouponResponse findCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -293,7 +306,7 @@ try { # Read Coupon -You can retrieve the Coupon via the API with the Show method. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns. +Returns a coupon by its Advanced Billing-assigned ID. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns. If instead you would like to find a Coupon using a Coupon code, see the Coupon Find method. When fetching a coupon, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. @@ -307,6 +320,10 @@ CouponResponse readCoupon( final Boolean currencyPrices) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -317,6 +334,8 @@ CouponResponse readCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -366,9 +385,7 @@ try { # Update Coupon -## Update Coupon - -You can update a Coupon via the API with a PUT request to the resource endpoint. +Updates a coupon. You can restrict a coupon to only apply to specific products / components by optionally passing in hashes of `restricted_products` and/or `restricted_components` in the format: `{ "": boolean_value }` @@ -380,6 +397,10 @@ CouponResponse updateCoupon( final CouponRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -390,6 +411,8 @@ CouponResponse updateCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -469,7 +492,7 @@ try { # Archive Coupon -You can archive a Coupon via the API with the archive method. +Archives a coupon, making it unavailable for future use while remaining active on existing subscriptions. Archiving makes that Coupon unavailable for future use, but allows it to remain attached and functional on existing Subscriptions that are using it. The `archived_at` date and time will be assigned. @@ -479,6 +502,10 @@ CouponResponse archiveCoupon( final int couponId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -488,6 +515,8 @@ CouponResponse archiveCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -536,13 +565,17 @@ try { # List Coupons -You can retrieve a list of coupons. +Lists coupons for a site. ```java List listCoupons( final ListCouponsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -551,6 +584,8 @@ List listCoupons( ## Response Type +**200**: OK + [`List`](../../doc/models/coupon-response.md) ## Example Usage @@ -636,7 +671,7 @@ try { # Read Coupon Usage -This request will provide details about the coupon usage as an array of data hashes, one per product. +Lists coupon usage details, one entry per product. ```java List readCouponUsage( @@ -644,6 +679,10 @@ List readCouponUsage( final int couponId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -653,6 +692,8 @@ List readCouponUsage( ## Response Type +**200**: OK + [`List`](../../doc/models/coupon-usage.md) ## Example Usage @@ -706,7 +747,7 @@ try { # Validate Coupon -You can verify if a specific coupon code is valid using the `validate` method. This method is useful for validating coupon codes that are entered by a customer. If the coupon is found and is valid, the coupon will be returned with a 200 status code. +Verifies whether a specific coupon code is valid. This method is useful for validating coupon codes that are entered by a customer. If the coupon is found and is valid, the coupon will be returned with a 200 status code. If the coupon is invalid, the status code will be 404 and the response will say why it is invalid. If the coupon is valid, the status code will be 200 and the coupon will be returned. The following reasons for invalidity are supported: @@ -734,6 +775,10 @@ CouponResponse validateCoupon( final Integer productFamilyId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -743,6 +788,8 @@ CouponResponse validateCoupon( ## Response Type +**200**: OK + [`CouponResponse`](../../doc/models/coupon-response.md) ## Example Usage @@ -798,7 +845,7 @@ try { # Create or Update Coupon Currency Prices -This endpoint allows you to create and/or update currency prices for an existing coupon. Multiple prices can be created or updated in a single request but each of the currencies must be defined on the site level already and the coupon must be an amount-based coupon, not percentage. +Creates and/or updates currency prices for an existing coupon. Multiple prices can be created or updated in a single request but each of the currencies must be defined on the site level already and the coupon must be an amount-based coupon, not percentage. Currency pricing for coupons must mirror the setup of the primary coupon pricing - if the primary coupon is percentage based, you will not be able to define pricing in non-primary currencies. @@ -808,6 +855,10 @@ CouponCurrencyResponse createOrUpdateCouponCurrencyPrices( final CouponCurrencyRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -817,6 +868,8 @@ CouponCurrencyResponse createOrUpdateCouponCurrencyPrices( ## Response Type +**200**: OK + [`CouponCurrencyResponse`](../../doc/models/coupon-currency-response.md) ## Example Usage @@ -858,6 +911,8 @@ try { # Create Coupon Subcodes +Creates subcodes for an existing coupon. + ## Coupon Subcodes Intro Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon. @@ -905,6 +960,10 @@ CouponSubcodesResponse createCouponSubcodes( final CouponSubcodes body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -914,6 +973,8 @@ CouponSubcodesResponse createCouponSubcodes( ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -951,13 +1012,17 @@ try { # List Coupon Subcodes -This request allows you to request the subcodes that are attached to a coupon. +Lists the subcodes attached to a coupon. ```java CouponSubcodes listCouponSubcodes( final ListCouponSubcodesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -966,6 +1031,8 @@ CouponSubcodes listCouponSubcodes( ## Response Type +**200**: OK + [`CouponSubcodes`](../../doc/models/coupon-subcodes.md) ## Example Usage @@ -1018,7 +1085,7 @@ try { # Update Coupon Subcodes -You can update the subcodes for the given Coupon via the API with a PUT request to the resource endpoint. +Updates the subcodes for a coupon, replacing all existing subcodes with the new list. Send an array of new coupon subcodes. **Note**: All current subcodes for that Coupon will be deleted first, and replaced with the list of subcodes sent to this endpoint. @@ -1036,6 +1103,10 @@ CouponSubcodesResponse updateCouponSubcodes( final CouponSubcodes body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1045,6 +1116,8 @@ CouponSubcodesResponse updateCouponSubcodes( ## Response Type +**200**: OK + [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) ## Example Usage @@ -1070,6 +1143,8 @@ try { # Delete Coupon Subcode +Deletes a specific subcode from a coupon. + ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: @@ -1099,6 +1174,10 @@ Void deleteCouponSubcode( final String subcode) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1108,6 +1187,8 @@ Void deleteCouponSubcode( ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 0a6853c0..b26d9a51 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -44,6 +44,10 @@ List createMetafields( final CreateMetafieldsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -53,6 +57,8 @@ List createMetafields( ## Response Type +**200**: OK + [`List`](../../doc/models/metafield.md) ## Example Usage @@ -136,6 +142,10 @@ ListMetafieldsResponse listMetafields( final ListMetafieldsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -144,6 +154,8 @@ ListMetafieldsResponse listMetafields( ## Response Type +**200**: OK + [`ListMetafieldsResponse`](../../doc/models/list-metafields-response.md) ## Example Usage @@ -215,7 +227,7 @@ With this endpoint, you can: - 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. +- 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. @@ -229,6 +241,10 @@ List updateMetafield( final UpdateMetafieldsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -238,6 +254,8 @@ List updateMetafield( ## Response Type +**200**: OK + [`List`](../../doc/models/metafield.md) ## Example Usage @@ -271,6 +289,10 @@ Void deleteMetafield( final String name) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -280,6 +302,8 @@ Void deleteMetafield( ## Response Type +**200**: OK + `void` ## Example Usage @@ -316,6 +340,10 @@ List createMetadata( final CreateMetadataRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -326,6 +354,8 @@ List createMetadata( ## Response Type +**200**: OK + [`List`](../../doc/models/metadata.md) ## Example Usage @@ -373,6 +403,10 @@ PaginatedMetadata listMetadata( final ListMetadataInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -381,6 +415,8 @@ PaginatedMetadata listMetadata( ## Response Type +**200**: OK + [`PaginatedMetadata`](../../doc/models/paginated-metadata.md) ## Example Usage @@ -430,7 +466,7 @@ Updates metadata and metafields on the Site and the customer or subscription spe 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. +Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for the Subscription resource and another 100 for the Customer resource. ```java List updateMetadata( @@ -439,6 +475,10 @@ List updateMetadata( final UpdateMetadataRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -449,6 +489,8 @@ List updateMetadata( ## Response Type +**200**: OK + [`List`](../../doc/models/metadata.md) ## Example Usage @@ -485,6 +527,10 @@ Void deleteMetadata( final List names) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -496,6 +542,8 @@ Void deleteMetadata( ## Response Type +**200**: OK + `void` ## Example Usage @@ -519,13 +567,17 @@ try { # List Metadata for Resource Type -Lists metadata for a specified array of subscriptions or customers. +Lists metadata for a specified array of subscriptions or customers. ```java PaginatedMetadata listMetadataForResourceType( final ListMetadataForResourceTypeInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -534,6 +586,8 @@ PaginatedMetadata listMetadataForResourceType( ## Response Type +**200**: OK + [`PaginatedMetadata`](../../doc/models/paginated-metadata.md) ## Example Usage diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index e35e931c..550f1771 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -21,7 +21,7 @@ CustomersController customersController = client.getCustomersController(); # Create Customer -You may create a new Customer at any time, or you may create a Customer at the same time you create a Subscription. The only validation restriction is that you may only create one customer for a given reference value. +Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you may only create one customer for a given reference value. If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the `id` attribute. @@ -51,6 +51,10 @@ CustomerResponse createCustomer( final CreateCustomerRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -59,6 +63,8 @@ CustomerResponse createCustomer( ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -139,7 +145,7 @@ try { # List Customers -This request will by default list all customers associated with your Site. +Lists all customers associated with your site, or filters results using the search parameter. ## Find Customer @@ -160,6 +166,10 @@ List listCustomers( final ListCustomersInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -168,6 +178,8 @@ List listCustomers( ## Response Type +**200**: OK + [`List`](../../doc/models/customer-response.md) ## Example Usage @@ -281,6 +293,10 @@ CustomerResponse readCustomer( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -289,6 +305,8 @@ CustomerResponse readCustomer( ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -344,7 +362,7 @@ try { # Update Customer -This method allows to update the Customer. +Updates the customer. ```java CustomerResponse updateCustomer( @@ -352,6 +370,10 @@ CustomerResponse updateCustomer( final UpdateCustomerRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -361,6 +383,8 @@ CustomerResponse updateCustomer( ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -427,13 +451,17 @@ try { # Delete Customer -This method allows you to delete the Customer. +Deletes the customer. ```java Void deleteCustomer( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -442,6 +470,8 @@ Void deleteCustomer( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -459,13 +489,17 @@ try { # Read Customer by Reference -Use this method to return the customer object if you have the unique **Reference ID (Your App)** value handy. It will return a single match. +Returns a customer by their unique reference ID. It will return a single match. ```java CustomerResponse readCustomerByReference( final String reference) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -474,6 +508,8 @@ CustomerResponse readCustomerByReference( ## Response Type +**200**: OK + [`CustomerResponse`](../../doc/models/customer-response.md) ## Example Usage @@ -492,13 +528,17 @@ try { # List Customer Subscriptions -This method lists all subscriptions that belong to a customer. +Lists all subscriptions that belong to a customer. ```java List listCustomerSubscriptions( final int customerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -507,6 +547,8 @@ List listCustomerSubscriptions( ## Response Type +**200**: OK + [`List`](../../doc/models/subscription-response.md) ## Example Usage diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 3c8b715e..d9c37b4e 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -20,7 +20,7 @@ EventsBasedBillingSegmentsController eventsBasedBillingSegmentsController = clie # Create Segment -This endpoint creates a new Segment for a Component with segmented Metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined. +Creates a new segment for a component with a segmented metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -31,6 +31,10 @@ SegmentResponse createSegment( final CreateSegmentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -41,6 +45,8 @@ SegmentResponse createSegment( ## Response Type +**201**: Created + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -99,7 +105,7 @@ try { # List Segments for Price Point -This endpoint allows you to fetch Segments created for a given Price Point. They will be returned in the order of creation. +Lists segments created for a given price point, in order of creation. You can pass `page` and `per_page` parameters in order to access all of the segments. By default it will return `30` records. You can set `per_page` to `200` at most. @@ -110,6 +116,10 @@ ListSegmentsResponse listSegmentsForPricePoint( final ListSegmentsForPricePointInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -118,6 +128,8 @@ ListSegmentsResponse listSegmentsForPricePoint( ## Response Type +**200**: OK + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -154,7 +166,7 @@ try { # Update Segment -This endpoint updates a single Segment for a Component with a segmented Metric. It allows you to update the pricing for the segment. +Updates a single segment for a component with a segmented metric. It allows you to update the pricing for the segment. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -166,6 +178,10 @@ SegmentResponse updateSegment( final UpdateSegmentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -177,6 +193,8 @@ SegmentResponse updateSegment( ## Response Type +**200**: OK + [`SegmentResponse`](../../doc/models/segment-response.md) ## Example Usage @@ -205,7 +223,7 @@ try { # Delete Segment -This endpoint allows you to delete a Segment with specified ID. +Deletes a segment with the specified ID. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. @@ -216,6 +234,10 @@ Void deleteSegment( final double id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -226,6 +248,8 @@ Void deleteSegment( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -252,7 +276,7 @@ try { # Bulk Create Segments -This endpoint allows you to create multiple segments in one request. The array of segments can contain up to `2000` records. +Creates multiple segments in one request. The array of segments can contain up to `2000` records. If any of the records contain an error the whole request would fail and none of the requested segments get created. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. @@ -265,6 +289,10 @@ ListSegmentsResponse bulkCreateSegments( final BulkCreateSegments body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -275,6 +303,8 @@ ListSegmentsResponse bulkCreateSegments( ## Response Type +**201**: Created + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage @@ -302,7 +332,7 @@ try { # Bulk Update Segments -This endpoint allows you to update multiple segments in one request. The array of segments can contain up to `1000` records. +Updates multiple segments in one request. The array of segments can contain up to `1000` records. If any of the records contain an error the whole request would fail and none of the requested segments get updated. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. @@ -315,6 +345,10 @@ ListSegmentsResponse bulkUpdateSegments( final BulkUpdateSegments body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -325,6 +359,8 @@ ListSegmentsResponse bulkUpdateSegments( ## Response Type +**200**: OK + [`ListSegmentsResponse`](../../doc/models/list-segments-response.md) ## Example Usage diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 3851bf36..7a238ea4 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -17,11 +17,13 @@ EventsController eventsController = client.getEventsController(); # List Events +Lists events for a site. + ## Events Intro Advanced Billing Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. -Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to record view Events / Site Activty in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). +Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site Activity in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). ## List Events for a Site @@ -91,6 +93,10 @@ List listEvents( final ListEventsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -99,6 +105,8 @@ List listEvents( ## Response Type +**200**: OK + [`List`](../../doc/models/event-response.md) ## Example Usage @@ -188,7 +196,7 @@ try { # List Subscription Events -The following request will return a list of events for a subscription. +Lists events for a subscription. ## Event Key @@ -205,6 +213,10 @@ List listSubscriptionEvents( final ListSubscriptionEventsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -213,6 +225,8 @@ List listSubscriptionEvents( ## Response Type +**200**: OK + [`List`](../../doc/models/event-response.md) ## Example Usage @@ -284,13 +298,17 @@ try { # Read Events Count -Get a count of all the events for a given site by using this method. +Returns the total count of events for a given site. ```java CountResponse readEventsCount( final ReadEventsCountInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -299,6 +317,8 @@ CountResponse readEventsCount( ## Response Type +**200**: OK + [`CountResponse`](../../doc/models/count-response.md) ## Example Usage diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index efde0a3f..8c9868fe 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -13,12 +13,12 @@ InsightsController insightsController = client.getInsightsController(); * [Read Site Stats](../../doc/controllers/insights.md#read-site-stats) * [Read Mrr](../../doc/controllers/insights.md#read-mrr) * [List Mrr Movements](../../doc/controllers/insights.md#list-mrr-movements) -* [List Mrr Per Subscription](../../doc/controllers/insights.md#list-mrr-per-subscription) +* [List Mrr per Subscription](../../doc/controllers/insights.md#list-mrr-per-subscription) # Read Site Stats -The Stats API is a very basic view of some Site-level stats. This API call only answers with JSON responses. An XML version is not provided. +Returns basic site-level stats. This API call only answers with JSON responses. An XML version is not provided. ## Stats Documentation @@ -32,8 +32,14 @@ https://subdomain.chargify.com/dashboard SiteSummary readSiteStats() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteSummary`](../../doc/models/site-summary.md) ## Example Usage @@ -71,7 +77,7 @@ try { **This endpoint is deprecated.** -This endpoint returns your site's current MRR, including plan and usage breakouts. +Returns your site's current MRR, including plan and usage breakouts. ```java MRRResponse readMrr( @@ -79,6 +85,10 @@ MRRResponse readMrr( final Integer subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -88,6 +98,8 @@ MRRResponse readMrr( ## Response Type +**200**: OK + [`MRRResponse`](../../doc/models/mrr-response.md) ## Example Usage @@ -126,7 +138,7 @@ try { **This endpoint is deprecated.** -This endpoint returns your site's MRR movements. +Lists your site's MRR movements. ## Understanding MRR movements @@ -156,6 +168,10 @@ ListMRRResponse listMrrMovements( final ListMrrMovementsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -164,6 +180,8 @@ ListMRRResponse listMrrMovements( ## Response Type +**200**: OK + [`ListMRRResponse`](../../doc/models/list-mrr-response.md) ## Example Usage @@ -235,7 +253,7 @@ try { ``` -# List Mrr Per Subscription +# List Mrr per Subscription **This endpoint is deprecated.** @@ -246,6 +264,10 @@ SubscriptionMRRResponse listMrrPerSubscription( final ListMrrPerSubscriptionInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -254,6 +276,8 @@ SubscriptionMRRResponse listMrrPerSubscription( ## Response Type +**200**: OK + [`SubscriptionMRRResponse`](../../doc/models/subscription-mrr-response.md) ## Example Usage diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 74afdd4a..cd45fb44 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -37,7 +37,7 @@ Refund an invoice, segment, or consolidated invoice. A refund less than the total of a consolidated invoice will be split across its segments. -A $50.00 refund on a $100.00 consolidated invoice with one $60.00 and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00 respectively). +For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, respectively). ```java Invoice refundInvoice( @@ -45,6 +45,10 @@ Invoice refundInvoice( final RefundInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -54,6 +58,8 @@ Invoice refundInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -101,6 +107,10 @@ ListInvoicesResponse listInvoices( final ListInvoicesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -109,6 +119,8 @@ ListInvoicesResponse listInvoices( ## Response Type +**200**: OK + [`ListInvoicesResponse`](../../doc/models/list-invoices-response.md) ## Example Usage @@ -446,6 +458,10 @@ Invoice readInvoice( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -454,6 +470,8 @@ Invoice readInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -546,6 +564,7 @@ try { "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", + "tax_included": false, "total_amount": "100.0", "tiered_unit_price": false, "period_range_start": "2018-07-26", @@ -611,6 +630,10 @@ ListInvoiceEventsResponse listInvoiceEvents( final ListInvoiceEventsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -619,6 +642,8 @@ ListInvoiceEventsResponse listInvoiceEvents( ## Response Type +**200**: OK + [`ListInvoiceEventsResponse`](../../doc/models/list-invoice-events-response.md) ## Example Usage @@ -740,6 +765,7 @@ try { "subtotal_amount": "99.0", "discount_amount": "9.9", "tax_amount": "6.01425", + "tax_included": false, "total_amount": "95.11425", "tiered_unit_price": false, "period_range_start": "2018-08-01", @@ -760,6 +786,7 @@ try { "subtotal_amount": "15.5", "discount_amount": "1.55", "tax_amount": "0.941625", + "tax_included": false, "total_amount": "14.891625", "tiered_unit_price": true, "period_range_start": "2018-07-22", @@ -808,6 +835,7 @@ try { "subtotal_amount": "47.0", "discount_amount": "4.7", "tax_amount": "2.85525", + "tax_included": false, "total_amount": "45.15525", "tiered_unit_price": true, "period_range_start": "2018-07-22", @@ -856,6 +884,7 @@ try { "subtotal_amount": "14.0", "discount_amount": "1.4", "tax_amount": "0.8505", + "tax_included": false, "total_amount": "13.4505", "tiered_unit_price": false, "period_range_start": "2018-08-01", @@ -1031,6 +1060,10 @@ Invoice recordPaymentForInvoice( final CreateInvoicePaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1040,6 +1073,8 @@ Invoice recordPaymentForInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -1079,7 +1114,7 @@ try { This API call should be used when you want to record an external payment against multiple invoices. -In order apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. +To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. ``` { @@ -1109,6 +1144,10 @@ MultiInvoicePaymentResponse recordPaymentForMultipleInvoices( final CreateMultiInvoicePaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1117,6 +1156,8 @@ MultiInvoicePaymentResponse recordPaymentForMultipleInvoices( ## Response Type +**200**: OK + [`MultiInvoicePaymentResponse`](../../doc/models/multi-invoice-payment-response.md) ## Example Usage @@ -1199,6 +1240,10 @@ ListCreditNotesResponse listCreditNotes( final ListCreditNotesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1207,6 +1252,8 @@ ListCreditNotesResponse listCreditNotes( ## Response Type +**200**: OK + [`ListCreditNotesResponse`](../../doc/models/list-credit-notes-response.md) ## Example Usage @@ -1299,6 +1346,7 @@ try { "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", + "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", @@ -1317,6 +1365,7 @@ try { "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", + "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1335,6 +1384,7 @@ try { "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", + "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1353,6 +1403,7 @@ try { "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", + "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1371,6 +1422,7 @@ try { "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", + "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1389,6 +1441,7 @@ try { "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", + "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1541,6 +1594,10 @@ CreditNote readCreditNote( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1549,6 +1606,8 @@ CreditNote readCreditNote( ## Response Type +**200**: OK + [`CreditNote`](../../doc/models/credit-note.md) ## Example Usage @@ -1631,6 +1690,7 @@ try { "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", + "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", @@ -1651,6 +1711,7 @@ try { "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", + "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1671,6 +1732,7 @@ try { "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", + "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1691,6 +1753,7 @@ try { "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", + "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1711,6 +1774,7 @@ try { "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", + "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", @@ -1731,6 +1795,7 @@ try { "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", + "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", @@ -1890,6 +1955,10 @@ RecordPaymentResponse recordPaymentForSubscription( final RecordPaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1899,6 +1968,8 @@ RecordPaymentResponse recordPaymentForSubscription( ## Response Type +**201**: OK + [`RecordPaymentResponse`](../../doc/models/record-payment-response.md) ## Example Usage @@ -1975,6 +2046,10 @@ Invoice reopenInvoice( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1983,6 +2058,8 @@ Invoice reopenInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -2018,6 +2095,10 @@ Invoice voidInvoice( final VoidInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2027,6 +2108,8 @@ Invoice voidInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -2068,6 +2151,10 @@ ConsolidatedInvoice listConsolidatedInvoiceSegments( final ListConsolidatedInvoiceSegmentsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2076,6 +2163,8 @@ ConsolidatedInvoice listConsolidatedInvoiceSegments( ## Response Type +**200**: OK + [`ConsolidatedInvoice`](../../doc/models/consolidated-invoice.md) ## Example Usage @@ -2412,13 +2501,13 @@ Instead of creating custom products like in above example, You can pass existing The price for each line item will be calculated as well as a total due amount for the invoice. Multiple line items can be sent. -### Line items types +### Line item types -When defining line item, You can choose one of 3 types for one line item: +When defining a line item, You can choose one of 3 types for a line item: #### Custom item -Like in basic behavior example above, You can pass `title` and `unit_price` for custom item. +As shown in the basic behavior example, You can pass `title` and `unit_price` for custom item. #### Product id @@ -2426,7 +2515,7 @@ Product handle (with handle: prefix) or id from the scope of current subscriptio #### Component id -Component handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `component_id`. If `component_id` is used, following fields cannot be used: `title`, `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `price_point_id`. At this moment price points are supportted only for quantity based, on/off and metered components. For prepaid and event based billing components `unit_price` is required. +Component handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `component_id`. If `component_id` is used, following fields cannot be used: `title`, `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `price_point_id`. At this moment price points are supported only for quantity based, on/off and metered components. For prepaid and event based billing components `unit_price` is required. ### Coupons @@ -2563,7 +2652,7 @@ Optional `description` parameter, it will overwrite default generated descriptio #### Issue Date -By default, invoices will be created with a issue date set to today. `issue_date` parameter can be send to alter that. Only dates in the past can be send. `issue_date` should be send in `YYYY-MM-DD` format. +By default, invoices will be created with a issue date set to today in your site's time zone. The `issue_date` parameter can be sent to alter the default. Only today or dates in the past are accepted. This date is interpreted and validated in your site's time zone. The format for `issue_date` is `YYYY-MM-DD`. #### Net Terms @@ -2575,7 +2664,7 @@ The seller, shipping and billing addresses can be sent to override the site's de #### 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. +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_instructions` parameter. #### Status @@ -2587,6 +2676,10 @@ InvoiceResponse createInvoice( final CreateInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2596,6 +2689,8 @@ InvoiceResponse createInvoice( ## Response Type +**200**: OK + [`InvoiceResponse`](../../doc/models/invoice-response.md) ## Example Usage @@ -2710,6 +2805,7 @@ try { "subtotal_amount": "1800.0", "discount_amount": "0.0", "tax_amount": "0.0", + "tax_included": false, "total_amount": "1800.0", "tiered_unit_price": false, "period_range_start": "2020-12-02", @@ -2749,6 +2845,10 @@ Void sendInvoice( final SendInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2758,6 +2858,8 @@ Void sendInvoice( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -2794,7 +2896,7 @@ try { # Preview Customer Information Changes -Customer information may change after an invoice is issued which may lead to a mismatch between customer information that are present on an open invoice and actual customer information. This endpoint allows to preview these differences, if any. +Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -2803,6 +2905,10 @@ CustomerChangesPreviewResponse previewCustomerInformationChanges( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2811,6 +2917,8 @@ CustomerChangesPreviewResponse previewCustomerInformationChanges( ## Response Type +**200**: OK + [`CustomerChangesPreviewResponse`](../../doc/models/customer-changes-preview-response.md) ## Example Usage @@ -2891,7 +2999,7 @@ try { # Update Customer Information -This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint before. +This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -2900,6 +3008,10 @@ Invoice updateCustomerInformation( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2908,6 +3020,8 @@ Invoice updateCustomerInformation( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage @@ -3127,9 +3241,9 @@ This endpoint allows you to issue an invoice that is in "pending" or "draft" sta You cannot issue a pending child invoice that was created for a member subscription in a group. -For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on subscription will be automatically applied. Additionally, if setting is on, an email will be sent for issued invoice. +For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. -For Automatic subscriptions, prepayments and service credits will apply to the invoice and before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: +For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. @@ -3141,6 +3255,10 @@ Invoice issueInvoice( final IssueInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3150,6 +3268,8 @@ Invoice issueInvoice( ## Response Type +**200**: OK + [`Invoice`](../../doc/models/invoice.md) ## Example Usage diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index 5c2d05d7..9a97e2c3 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -19,7 +19,7 @@ OffersController offersController = client.getOffersController(); # Create Offer -Create an offer within your Advanced Billing site by sending a POST request. +Creates an offer within your Advanced Billing site. ## Documentation @@ -38,6 +38,10 @@ OfferResponse createOffer( final CreateOfferRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -46,6 +50,8 @@ OfferResponse createOffer( ## Response Type +**201**: Created + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -133,13 +139,17 @@ try { # List Offers -This endpoint will list offers for a site. +Lists offers for a site. ```java ListOffersResponse listOffers( final ListOffersInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -148,6 +158,8 @@ ListOffersResponse listOffers( ## Response Type +**200**: OK + [`ListOffersResponse`](../../doc/models/list-offers-response.md) ## Example Usage @@ -233,13 +245,17 @@ try { # Read Offer -This method allows you to list a specific offer's attributes. This is different than list all offers for a site, as it requires an `offer_id`. +Returns a specific offer's attributes. This is different from listing all offers for a site, as it requires an `offer_id`. ```java OfferResponse readOffer( final int offerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -248,6 +264,8 @@ OfferResponse readOffer( ## Response Type +**200**: OK + [`OfferResponse`](../../doc/models/offer-response.md) ## Example Usage @@ -266,13 +284,17 @@ try { # Archive Offer -Archive an existing offer. Please provide an `offer_id` in order to archive the correct item. +Archives an existing offer. Please provide an `offer_id` in order to archive the correct item. ```java Void archiveOffer( final int offerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -281,6 +303,8 @@ Void archiveOffer( ## Response Type +**200**: OK + `void` ## Example Usage @@ -298,13 +322,17 @@ try { # Unarchive Offer -Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the correct item. +Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive the correct item. ```java Void unarchiveOffer( final int offerId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -313,6 +341,8 @@ Void unarchiveOffer( ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index c1619f81..59d3f33a 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -34,7 +34,7 @@ Select an option from the **Request Examples** drop-down on the right side of th 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 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 [Maxio.js (formerly 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: @@ -42,74 +42,33 @@ See the following articles to learn more about subscriptions and payments: + [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) + [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) ++ [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) + + [Maxio.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) + + [Maxio.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) + + [Maxio.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) + + [Maxio.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) + + [Maxio.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) + + [Maxio.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) + [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) -## 3D Secure Authentication during payment profile creation. +## 3D Secure (3DS) Authentication post-authentication flow -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: +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -```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 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://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after credit card is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.", - "links": { - "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 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 - -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. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```java PaymentProfileResponse createPaymentProfile( final CreatePaymentProfileRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -118,6 +77,8 @@ PaymentProfileResponse createPaymentProfile( ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -180,13 +141,17 @@ try { # List Payment Profiles -This method will return all of the active `payment_profiles` for a Site, or for one Customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. +Returns all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. ```java List listPaymentProfiles( final ListPaymentProfilesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -195,6 +160,8 @@ List listPaymentProfiles( ## Response Type +**200**: OK + [`List`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -279,7 +246,7 @@ try { # Read Payment Profile -Using the GET method you can retrieve a Payment Profile identified by its unique ID. +Returns 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. @@ -322,6 +289,10 @@ PaymentProfileResponse readPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -330,6 +301,8 @@ PaymentProfileResponse readPaymentProfile( ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -385,6 +358,8 @@ try { # Update Payment Profile +Updates a payment profile. + ## Partial Card Updates In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue payment gateways, you can update just the billing and contact information for a payment method. Note the lack of credit-card related data contained in the JSON payload. @@ -426,6 +401,10 @@ PaymentProfileResponse updatePaymentProfile( final UpdatePaymentProfileRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -435,6 +414,8 @@ PaymentProfileResponse updatePaymentProfile( ## Response Type +**200**: OK + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -503,6 +484,10 @@ Void deleteUnusedPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -511,6 +496,8 @@ Void deleteUnusedPaymentProfile( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -549,6 +536,10 @@ Void deleteSubscriptionsPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -558,6 +549,8 @@ Void deleteSubscriptionsPaymentProfile( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -576,7 +569,7 @@ try { # Verify Bank Account -Submit the two small deposit amounts the customer received in their bank account in order to verify the bank account. (Stripe only) +Verifies a bank account. Submit the two small deposit amounts the customer received in their bank account to verify the bank account. (Stripe only) ```java BankAccountResponse verifyBankAccount( @@ -584,6 +577,10 @@ BankAccountResponse verifyBankAccount( final BankAccountVerificationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -593,6 +590,8 @@ BankAccountResponse verifyBankAccount( ## Response Type +**200**: OK + [`BankAccountResponse`](../../doc/models/bank-account-response.md) ## Example Usage @@ -665,6 +664,10 @@ Void deleteSubscriptionGroupPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -674,6 +677,8 @@ Void deleteSubscriptionGroupPaymentProfile( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -692,7 +697,7 @@ try { # Change Subscription Default Payment Profile -This will change the default payment profile on the subscription to the existing payment profile with the id specified. +Changes the default payment profile on the subscription to the existing payment profile with the specified ID. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. @@ -702,6 +707,10 @@ PaymentProfileResponse changeSubscriptionDefaultPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -711,6 +720,8 @@ PaymentProfileResponse changeSubscriptionDefaultPaymentProfile( ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -780,6 +791,10 @@ PaymentProfileResponse changeSubscriptionGroupDefaultPaymentProfile( final int paymentProfileId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -789,6 +804,8 @@ PaymentProfileResponse changeSubscriptionGroupDefaultPaymentProfile( ## Response Type +**201**: Created + [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) ## Example Usage @@ -856,6 +873,10 @@ GetOneTimeTokenRequest readOneTimeToken( final String chargifyToken) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -864,6 +885,8 @@ GetOneTimeTokenRequest readOneTimeToken( ## Response Type +**200**: OK + [`GetOneTimeTokenRequest`](../../doc/models/get-one-time-token-request.md) ## Example Usage @@ -903,6 +926,10 @@ Void sendRequestUpdatePaymentEmail( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -911,6 +938,8 @@ Void sendRequestUpdatePaymentEmail( ## Response Type +**201**: Created + `void` ## Example Usage diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 4cebbc8e..3654599b 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -25,6 +25,10 @@ List listProductsForProductFamily( final ListProductsForProductFamilyInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -33,6 +37,8 @@ List listProductsForProductFamily( ## Response Type +**200**: OK + [`List`](../../doc/models/product-response.md) ## Example Usage @@ -170,7 +176,7 @@ try { # Create Product Family -Creates 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). @@ -179,6 +185,10 @@ ProductFamilyResponse createProductFamily( final CreateProductFamilyRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -187,6 +197,8 @@ ProductFamilyResponse createProductFamily( ## Response Type +**201**: Created + [`ProductFamilyResponse`](../../doc/models/product-family-response.md) ## Example Usage @@ -234,13 +246,17 @@ try { # List Product Families -Retrieve a list of Product Families for a site. +Returns a list of Product Families for a site. ```java List listProductFamilies( final ListProductFamiliesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -249,6 +265,8 @@ List listProductFamilies( ## Response Type +**200**: OK + [`List`](../../doc/models/product-family-response.md) ## Example Usage @@ -309,6 +327,10 @@ ProductFamilyResponse readProductFamily( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -317,6 +339,8 @@ ProductFamilyResponse readProductFamily( ## Response Type +**200**: OK + [`ProductFamilyResponse`](../../doc/models/product-family-response.md) ## Example Usage diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 4a9ab376..be0503e3 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -33,6 +33,10 @@ ProductPricePointResponse createProductPricePoint( final CreateProductPricePointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ ProductPricePointResponse createProductPricePoint( ## Response Type +**201**: Created + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -123,6 +129,10 @@ ListProductPricePointsResponse listProductPricePoints( final ListProductPricePointsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -131,6 +141,8 @@ ListProductPricePointsResponse listProductPricePoints( ## Response Type +**200**: OK + [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) ## Example Usage @@ -197,6 +209,10 @@ ProductPricePointResponse updateProductPricePoint( final UpdateProductPricePointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -207,6 +223,8 @@ ProductPricePointResponse updateProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -264,7 +282,7 @@ try { # Read Product Price Point -Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle. +Returns details for a specific product price point. You can achieve this by using either the product price point ID or handle. ```java ProductPricePointResponse readProductPricePoint( @@ -273,6 +291,10 @@ ProductPricePointResponse readProductPricePoint( final Boolean currencyPrices) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -283,6 +305,8 @@ ProductPricePointResponse readProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -341,6 +365,10 @@ ProductPricePointResponse archiveProductPricePoint( final ArchiveProductPricePointPricePointId pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -350,6 +378,8 @@ ProductPricePointResponse archiveProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -408,7 +438,7 @@ try { # Unarchive Product Price Point -Use this endpoint to unarchive an archived product price point. +Unarchives an archived product price point. ```java ProductPricePointResponse unarchiveProductPricePoint( @@ -416,6 +446,10 @@ ProductPricePointResponse unarchiveProductPricePoint( final int pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -425,6 +459,8 @@ ProductPricePointResponse unarchiveProductPricePoint( ## Response Type +**200**: OK + [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) ## Example Usage @@ -481,6 +517,10 @@ ProductResponse promoteProductPricePointToDefault( final int pricePointId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -490,6 +530,8 @@ ProductResponse promoteProductPricePointToDefault( ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -570,6 +612,10 @@ BulkCreateProductPricePointsResponse bulkCreateProductPricePoints( final BulkCreateProductPricePointsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -579,6 +625,8 @@ BulkCreateProductPricePointsResponse bulkCreateProductPricePoints( ## Response Type +**201**: Created + [`BulkCreateProductPricePointsResponse`](../../doc/models/bulk-create-product-price-points-response.md) ## Example Usage @@ -681,6 +729,10 @@ CurrencyPricesResponse createProductCurrencyPrices( final CreateProductCurrencyPricesRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -690,6 +742,8 @@ CurrencyPricesResponse createProductCurrencyPrices( ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -768,6 +822,10 @@ CurrencyPricesResponse updateProductCurrencyPrices( final UpdateCurrencyPricesRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -777,6 +835,8 @@ CurrencyPricesResponse updateProductCurrencyPrices( ## Response Type +**200**: OK + [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) ## Example Usage @@ -835,13 +895,17 @@ try { # List All Product Price Points -This method allows retrieval of a list of Products Price Points belonging to a Site. +Lists Product Price Points belonging to a site. ```java ListProductPricePointsResponse listAllProductPricePoints( final ListAllProductPricePointsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -850,6 +914,8 @@ ListProductPricePointsResponse listAllProductPricePoints( ## Response Type +**200**: OK + [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) ## Example Usage diff --git a/doc/controllers/products.md b/doc/controllers/products.md index f1afe6e1..6ef2d76e 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -22,7 +22,7 @@ ProductsController productsController = client.getProductsController(); Creates a product in your Advanced Billing site. -See the following product docuemation for more information: +See the following product documentation 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) @@ -33,6 +33,10 @@ ProductResponse createProduct( final CreateOrUpdateProductRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ ProductResponse createProduct( ## Response Type +**201**: Created + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -140,6 +146,10 @@ ProductResponse readProduct( final int productId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -148,6 +158,8 @@ ProductResponse readProduct( ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -225,6 +237,10 @@ ProductResponse updateProduct( final CreateOrUpdateProductRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -234,6 +250,8 @@ ProductResponse updateProduct( ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -307,7 +325,7 @@ try { # Archive Product -Archives 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 unaffected; 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. @@ -316,6 +334,10 @@ ProductResponse archiveProduct( final int productId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -324,6 +346,8 @@ ProductResponse archiveProduct( ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -400,6 +424,10 @@ ProductResponse readProductByHandle( final String apiHandle) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -408,6 +436,8 @@ ProductResponse readProductByHandle( ## Response Type +**200**: OK + [`ProductResponse`](../../doc/models/product-response.md) ## Example Usage @@ -494,13 +524,17 @@ try { # List Products -This method allows to retrieve a list of Products belonging to a Site. +Lists products belonging to a site. ```java List listProducts( final ListProductsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -509,6 +543,8 @@ List listProducts( ## Response Type +**200**: OK + [`List`](../../doc/models/product-response.md) ## Example Usage diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index d04b57dd..92e9a016 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -24,7 +24,7 @@ ProformaInvoicesController proformaInvoicesController = client.getProformaInvoic # Create Consolidated Proforma Invoice -This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. +Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. @@ -37,6 +37,10 @@ Void createConsolidatedProformaInvoice( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ Void createConsolidatedProformaInvoice( ## Response Type +**201**: Created + `void` ## Example Usage @@ -70,7 +76,7 @@ try { # List Subscription Group Proforma Invoices -Only proforma invoices with a `consolidation_level` of parent are returned. +Lists proforma invoices with a `consolidation_level` of parent for the subscription group. By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to true. @@ -79,6 +85,10 @@ ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices( final ListSubscriptionGroupProformaInvoicesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -87,6 +97,8 @@ ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices( ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -120,7 +132,7 @@ try { # Read Proforma Invoice -Use this endpoint to read the details of an existing proforma invoice. +Returns the details of an existing proforma invoice. ## Restrictions @@ -131,6 +143,10 @@ ProformaInvoice readProformaInvoice( final String proformaInvoiceUid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -139,6 +155,8 @@ ProformaInvoice readProformaInvoice( ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -163,7 +181,7 @@ try { # Create Proforma Invoice -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. +Creates a proforma invoice and returns 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, use the renewal preview endpoint. @@ -176,6 +194,10 @@ ProformaInvoice createProformaInvoice( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -184,6 +206,8 @@ ProformaInvoice createProformaInvoice( ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -210,13 +234,17 @@ try { # List Proforma Invoices -By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. +Lists proforma invoices for a subscription. By default, results only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. ```java ListProformaInvoicesResponse listProformaInvoices( final ListProformaInvoicesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -225,6 +253,8 @@ ListProformaInvoicesResponse listProformaInvoices( ## Response Type +**200**: OK + [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) ## Example Usage @@ -255,7 +285,7 @@ try { # Deliver Proforma Invoice -Allows for proforma invoices to be programmatically delivered via email. Supports email +Delivers a proforma invoice programmatically via email. Supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. If `recipient_emails` is omitted, the system will fall back to the primary recipient derived from the invoice or @@ -268,6 +298,10 @@ ProformaInvoice deliverProformaInvoice( final DeliverProformaInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -277,6 +311,8 @@ ProformaInvoice deliverProformaInvoice( ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -315,7 +351,7 @@ try { # Void Proforma Invoice -This endpoint will void a proforma invoice that has the status "draft". +Voids a proforma invoice that has the status "draft". ## Restrictions @@ -331,6 +367,10 @@ ProformaInvoice voidProformaInvoice( final VoidInvoiceRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -340,6 +380,8 @@ ProformaInvoice voidProformaInvoice( ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -366,7 +408,7 @@ try { # Preview Proforma Invoice -Return a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. +Returns a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. @@ -379,6 +421,10 @@ ProformaInvoice previewProformaInvoice( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -387,6 +433,8 @@ ProformaInvoice previewProformaInvoice( ## Response Type +**200**: OK + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -414,9 +462,7 @@ try { # Create Signup Proforma Invoice -This endpoint is only available for Relationship Invoicing sites. It cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. - -Create a proforma invoice to preview costs before a subscription's signup. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. +Creates a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. @@ -427,6 +473,10 @@ ProformaInvoice createSignupProformaInvoice( final CreateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -435,6 +485,8 @@ ProformaInvoice createSignupProformaInvoice( ## Response Type +**201**: Created + [`ProformaInvoice`](../../doc/models/proforma-invoice.md) ## Example Usage @@ -474,9 +526,7 @@ try { # Preview Signup Proforma Invoice -This endpoint is only available for Relationship Invoicing sites. It cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. - -Create a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. You have the option of optionally previewing the first renewal's costs as well. The proforma invoice preview will not be persisted. +Creates a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. You have the option of previewing the first renewal's costs as well. The proforma invoice preview will not be persisted. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. @@ -488,6 +538,10 @@ SignupProformaPreviewResponse previewSignupProformaInvoice( final CreateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -497,6 +551,8 @@ SignupProformaPreviewResponse previewSignupProformaInvoice( ## Response Type +**201**: Created + [`SignupProformaPreviewResponse`](../../doc/models/signup-proforma-preview-response.md) ## Example Usage diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index 2238f0a4..453e589e 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -19,9 +19,11 @@ ReasonCodesController reasonCodesController = client.getReasonCodesController(); # Create Reason Code +Creates a reason code for a given site. + # Reason Codes Intro -ReasonCodes are a way to gain a high level view of why your customers are cancelling the subscription to your product or service. +Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -33,13 +35,17 @@ Full documentation on how Reason Codes operate within Advanced Billing can be lo ## Create Reason Code -This method gives a merchant the option to create a reason codes for a given Site. +This method gives a merchant the option to create reason codes for a given site. ```java ReasonCodeResponse createReasonCode( final CreateReasonCodeRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +54,8 @@ ReasonCodeResponse createReasonCode( ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -82,13 +90,17 @@ try { # List Reason Codes -This method gives a merchant the option to retrieve a list of all of the current churn codes for a given site. +Lists all current churn codes for a given site. ```java List listReasonCodes( final ListReasonCodesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -97,6 +109,8 @@ List listReasonCodes( ## Response Type +**200**: OK + [`List`](../../doc/models/reason-code-response.md) ## Example Usage @@ -166,13 +180,17 @@ try { # Read Reason Code -This method gives a merchant the option to retrieve a list of a particular code for a given Site by providing the unique numerical ID of the code. +Returns a particular churn reason code for a given site by its unique ID. ```java ReasonCodeResponse readReasonCode( final int reasonCodeId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -181,6 +199,8 @@ ReasonCodeResponse readReasonCode( ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -205,7 +225,7 @@ try { # Update Reason Code -This method gives a merchant the option to update an existing reason code for a given site. +Updates an existing reason code for a given site. ```java ReasonCodeResponse updateReasonCode( @@ -213,6 +233,10 @@ ReasonCodeResponse updateReasonCode( final UpdateReasonCodeRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -222,6 +246,8 @@ ReasonCodeResponse updateReasonCode( ## Response Type +**200**: OK + [`ReasonCodeResponse`](../../doc/models/reason-code-response.md) ## Example Usage @@ -248,13 +274,17 @@ try { # Delete Reason Code -This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. +Deletes a reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. ```java OkResponse deleteReasonCode( final int reasonCodeId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -263,6 +293,8 @@ OkResponse deleteReasonCode( ## Response Type +**200**: OK + [`OkResponse`](../../doc/models/ok-response.md) ## Example Usage diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index f0a33091..b6118587 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -11,7 +11,7 @@ ReferralCodesController referralCodesController = client.getReferralCodesControl # Validate Referral Code -Use this method to determine if the referral code is valid and applicable within your Site. This method is useful for validating referral codes that are entered by a customer. +Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. ## Referrals Documentation @@ -26,6 +26,10 @@ ReferralValidationResponse validateReferralCode( final String code) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -34,6 +38,8 @@ ReferralValidationResponse validateReferralCode( ## Response Type +**200**: OK + [`ReferralValidationResponse`](../../doc/models/referral-validation-response.md) ## Example Usage diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index be40a243..d1c78cd8 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -17,7 +17,7 @@ SalesCommissionsController salesCommissionsController = client.getSalesCommissio # List Sales Commission Settings -Endpoint returns subscriptions with associated sales reps +Lists subscriptions with associated sales reps. ## Modified Authentication Process @@ -32,6 +32,10 @@ List listSalesCommissionSettings( final ListSalesCommissionSettingsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ List listSalesCommissionSettings( ## Response Type +**200**: OK + [`List`](../../doc/models/sale-rep-settings.md) ## Example Usage @@ -98,7 +104,7 @@ try { # List Sales Reps -Endpoint returns sales rep list with details +Returns a sales rep list with details. ## Modified Authentication Process @@ -113,6 +119,10 @@ List listSalesReps( final ListSalesRepsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -121,6 +131,8 @@ List listSalesReps( ## Response Type +**200**: OK + [`List`](../../doc/models/list-sale-rep-item.md) ## Example Usage @@ -228,7 +240,7 @@ try { # Read Sales Rep -Endpoint returns sales rep and attached subscriptions details. +Returns a sales rep and attached subscription details. ## Modified Authentication Process @@ -248,6 +260,10 @@ SaleRep readSalesRep( final Integer perPage) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -261,6 +277,8 @@ SaleRep readSalesRep( ## Response Type +**200**: OK + [`SaleRep`](../../doc/models/sale-rep.md) ## Example Usage diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index 9c7be121..7f76bff0 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -17,15 +17,15 @@ SitesController sitesController = client.getSitesController(); # Read Site -This endpoint allows you to fetch some site data. +Retrieves site data. Full documentation on Sites in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites). -Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is extremely relevant to this endpoint documentation. +Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is relevant to this endpoint documentation. #### Relationship invoicing enabled -If site has RI enabled then you will see more settings like: +If the site has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, "whopays_enabled": true, @@ -38,8 +38,14 @@ You can read more about these settings here: SiteResponse readSite() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`SiteResponse`](../../doc/models/site-response.md) ## Example Usage @@ -107,7 +113,7 @@ try { # Clear Site -This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. +Clears all data from a test site asynchronously. This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. **This functionality will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.** @@ -116,6 +122,10 @@ Void clearSite( final CleanupScope cleanupScope) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -124,6 +134,8 @@ Void clearSite( ## Response Type +**200**: OK + `void` ## Example Usage @@ -141,13 +153,17 @@ try { # List Chargify Js Public Keys -This endpoint returns public keys used for Chargify.js. +Returns public keys used for Maxio.js (formerly Chargify.js). ```java ListPublicKeysResponse listChargifyJsPublicKeys( final ListChargifyJsPublicKeysInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -156,6 +172,8 @@ ListPublicKeysResponse listChargifyJsPublicKeys( ## Response Type +**200**: OK + [`ListPublicKeysResponse`](../../doc/models/list-public-keys-response.md) ## Example Usage diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index c0ec9afa..3dcaeea7 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -31,7 +31,7 @@ SubscriptionComponentsController subscriptionComponentsController = client.getSu # Read Subscription Component -This request will list information regarding a specific component owned by a subscription. +Returns information for a specific component on a subscription. ```java SubscriptionComponentResponse readSubscriptionComponent( @@ -39,6 +39,10 @@ SubscriptionComponentResponse readSubscriptionComponent( final int componentId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +52,8 @@ SubscriptionComponentResponse readSubscriptionComponent( ## Response Type +**200**: OK + [`SubscriptionComponentResponse`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -92,7 +98,7 @@ try { # List Subscription Components -This request will list a subscription's applied components. +Lists a subscription's applied components. ## Archived Components @@ -103,6 +109,10 @@ List listSubscriptionComponents( final ListSubscriptionComponentsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -111,6 +121,8 @@ List listSubscriptionComponents( ## Response Type +**200**: OK + [`List`](../../doc/models/subscription-component-response.md) ## Example Usage @@ -194,6 +206,10 @@ BulkComponentsPricePointAssignment bulkUpdateSubscriptionComponentsPricePoints( final BulkComponentsPricePointAssignment body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -203,6 +219,8 @@ BulkComponentsPricePointAssignment bulkUpdateSubscriptionComponentsPricePoints( ## Response Type +**200**: OK + [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) ## Example Usage @@ -277,6 +295,10 @@ SubscriptionResponse bulkResetSubscriptionComponentsPricePoints( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -285,6 +307,8 @@ SubscriptionResponse bulkResetSubscriptionComponentsPricePoints( ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -407,7 +431,7 @@ Creates an allocation, sets the current allocated quantity for the component, an When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. -> **Note:** These proration and accural fields are ignored for Prepaid Components since this component type always generate charges immediately without proration. +> **Note:** These proration and accrual fields are ignored for Prepaid Components since this component type always generates charges immediately without proration. For information on prorated components and upgrade/downgrade schemes, see [Setting Component Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) @@ -425,7 +449,7 @@ For information on prorated components and upgrade/downgrade schemes, see [Setti > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. -For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. +For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. ```java AllocationResponse allocateComponent( @@ -434,6 +458,10 @@ AllocationResponse allocateComponent( final CreateAllocationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -444,6 +472,8 @@ AllocationResponse allocateComponent( ## Response Type +**200**: OK + [`AllocationResponse`](../../doc/models/allocation-response.md) ## Example Usage @@ -558,7 +588,7 @@ try { # List Allocations -This endpoint returns the 50 most recent Allocations, ordered by most recent first. +Returns the 50 most recent Allocations, ordered by most recent first. ## On/Off Components @@ -571,6 +601,10 @@ List listAllocations( final Integer page) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -581,6 +615,8 @@ List listAllocations( ## Response Type +**200**: OK + [`List`](../../doc/models/allocation-response.md) ## Example Usage @@ -655,7 +691,7 @@ try { # Allocate Components -Creates multiple allocations, sets the current allocated quantity for each of the components, and recording a memo. A `component_id` is required for each allocation. +Creates multiple allocations, sets the current allocated quantity for each of the components, and records a memo. A `component_id` is required for each allocation. The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. @@ -673,7 +709,7 @@ The charges and/or credits that are created will be rolled up into a single tota > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. -For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. +For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product documentation. ```java List allocateComponents( @@ -681,6 +717,10 @@ List allocateComponents( final AllocateComponents body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -690,6 +730,8 @@ List allocateComponents( ## Response Type +**200**: OK + [`List`](../../doc/models/allocation-response.md) ## Example Usage @@ -778,7 +820,7 @@ try { # Preview Allocations -Advanced Billing offers the ability to preview a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. +Previews a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or `downgrade_credits` @@ -792,6 +834,10 @@ AllocationPreviewResponse previewAllocations( final PreviewAllocationsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -801,6 +847,8 @@ AllocationPreviewResponse previewAllocations( ## Response Type +**200**: OK + [`AllocationPreviewResponse`](../../doc/models/allocation-preview-response.md) ## Example Usage @@ -947,7 +995,7 @@ try { # Update Prepaid Usage Allocation Expiration Date -When the expiration interval options are selected on a prepaid usage component price point, all allocations will be created with an expiration date. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. +Updates the expiration date for a prepaid usage allocation. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. In order to change a prepaid usage allocation's expiration date, a PUT call must be made to the allocation's endpoint with a new expiration date. @@ -967,6 +1015,10 @@ Void updatePrepaidUsageAllocationExpirationDate( final UpdateAllocationExpirationDate body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -978,6 +1030,8 @@ Void updatePrepaidUsageAllocationExpirationDate( ## Response Type +**204**: OK + `void` ## Example Usage @@ -1011,7 +1065,9 @@ try { # Delete Prepaid Usage Allocation -Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component each allocation must be destroyed individually via this endpoint. +Deletes a prepaid usage allocation. + +Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component, each allocation must be destroyed individually via this endpoint. ## Credit Scheme @@ -1029,6 +1085,10 @@ Void deletePrepaidUsageAllocation( final CreditSchemeRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1040,6 +1100,8 @@ Void deletePrepaidUsageAllocation( ## Response Type +**200**: OK + `void` ## Example Usage @@ -1078,11 +1140,11 @@ You can report metered or prepaid usage to Advanced Billing as often as you wish 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: -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. +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: +See the following product documentation articles for more information: -- [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). A +- [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components) - [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) @@ -1131,6 +1193,10 @@ UsageResponse createUsage( final CreateUsageRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1141,6 +1207,8 @@ UsageResponse createUsage( ## Response Type +**200**: OK + [`UsageResponse`](../../doc/models/usage-response.md) ## Example Usage @@ -1197,7 +1265,7 @@ try { # List Usages -This request will return a list of the usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. +Returns a list of usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. This endpoint is not compatible with quantity-based components. @@ -1218,6 +1286,10 @@ List listUsages( final ListUsagesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1226,6 +1298,8 @@ List listUsages( ## Response Type +**200**: OK + [`List`](../../doc/models/usage-response.md) ## Example Usage @@ -1285,6 +1359,8 @@ try { # Activate Event Based Component +Activates an event-based component for a single subscription. + In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). @@ -1300,6 +1376,10 @@ Void activateEventBasedComponent( final ActivateEventBasedComponent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1310,6 +1390,8 @@ Void activateEventBasedComponent( ## Response Type +**200**: OK + `void` ## Example Usage @@ -1353,7 +1435,7 @@ try { # Deactivate Event Based Component -Use this endpoint to deactivate an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. +Deactivates an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. ```java Void deactivateEventBasedComponent( @@ -1361,6 +1443,10 @@ Void deactivateEventBasedComponent( final int componentId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1370,6 +1456,8 @@ Void deactivateEventBasedComponent( ## Response Type +**200**: OK + `void` ## Example Usage @@ -1388,6 +1476,8 @@ try { # Record Event +Records a single event for Events-Based Billing. + ## Documentation Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. @@ -1415,6 +1505,10 @@ Void recordEvent( final EBBEvent body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1429,6 +1523,8 @@ Void recordEvent( ## Response Type +**201**: Created + `void` ## Example Usage @@ -1452,7 +1548,7 @@ try { # Bulk Record Events -Use this endpoint to record a collection of events. +Records a collection of events. *Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.* @@ -1465,6 +1561,10 @@ Void bulkRecordEvents( final List body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1479,6 +1579,8 @@ Void bulkRecordEvents( ## Response Type +**201**: Created + `void` ## Example Usage @@ -1504,13 +1606,17 @@ try { # List Subscription Components for Site -This request will list components applied to each subscription. +Lists components applied to each subscription. ```java ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( final ListSubscriptionComponentsForSiteInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1519,6 +1625,8 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( ## Response Type +**200**: OK + [`ListSubscriptionComponentsResponse`](../../doc/models/list-subscription-components-response.md) ## Example Usage diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index da4cd7d2..33c13128 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -18,7 +18,7 @@ SubscriptionGroupInvoiceAccountController subscriptionGroupInvoiceAccountControl # Create Subscription Group Prepayment -A prepayment can be added for a subscription group identified by the group's `uid`. This endpoint requires a `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. +Adds a prepayment for a subscription group. This endpoint requires an `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. ```java SubscriptionGroupPrepaymentResponse createSubscriptionGroupPrepayment( @@ -26,6 +26,10 @@ SubscriptionGroupPrepaymentResponse createSubscriptionGroupPrepayment( final SubscriptionGroupPrepaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ SubscriptionGroupPrepaymentResponse createSubscriptionGroupPrepayment( ## Response Type +**200**: OK + [`SubscriptionGroupPrepaymentResponse`](../../doc/models/subscription-group-prepayment-response.md) ## Example Usage @@ -72,13 +78,17 @@ try { # List Prepayments for Subscription Group -This request will list a subscription group's prepayments. +Lists a subscription group's prepayments. ```java ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( final ListPrepaymentsForSubscriptionGroupInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -87,6 +97,8 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( ## Response Type +**200**: OK + [`ListSubscriptionGroupPrepaymentResponse`](../../doc/models/list-subscription-group-prepayment-response.md) ## Example Usage @@ -143,7 +155,7 @@ try { # Issue Subscription Group Service Credit -Credit can be issued for a subscription group identified by the group's `uid`. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. +Issues service credit for a subscription group. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. ```java ServiceCreditResponse issueSubscriptionGroupServiceCredit( @@ -151,6 +163,10 @@ ServiceCreditResponse issueSubscriptionGroupServiceCredit( final IssueServiceCreditRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -160,6 +176,8 @@ ServiceCreditResponse issueSubscriptionGroupServiceCredit( ## Response Type +**200**: OK + [`ServiceCreditResponse`](../../doc/models/service-credit-response.md) ## Example Usage @@ -210,7 +228,7 @@ try { # Deduct Subscription Group Service Credit -Credit can be deducted for a subscription group identified by the group's `uid`. Credit will be deducted from the group in the amount specified in the request body. +Deducts service credit for a subscription group. Credit will be deducted from the group in the amount specified in the request body. ```java ServiceCredit deductSubscriptionGroupServiceCredit( @@ -218,6 +236,10 @@ ServiceCredit deductSubscriptionGroupServiceCredit( final DeductServiceCreditRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -227,6 +249,8 @@ ServiceCredit deductSubscriptionGroupServiceCredit( ## Response Type +**201**: Created + [`ServiceCredit`](../../doc/models/service-credit.md) ## Example Usage diff --git a/doc/controllers/subscription-group-status.md b/doc/controllers/subscription-group-status.md index da61cd21..cd1470eb 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -28,6 +28,10 @@ Void cancelSubscriptionsInGroup( final CancelGroupedSubscriptionsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -37,6 +41,8 @@ Void cancelSubscriptionsInGroup( ## Response Type +**200**: OK + `void` ## Example Usage @@ -65,7 +71,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 its uid passed in the URL. +Schedules 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. @@ -74,6 +80,10 @@ Void initiateDelayedCancellationForGroup( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -82,6 +92,8 @@ Void initiateDelayedCancellationForGroup( ## Response Type +**200**: OK + `void` ## Example Usage @@ -107,6 +119,8 @@ try { # Cancel Delayed Cancellation for Group +Removes the delayed cancellation on a subscription group. + Removing the delayed cancellation on a subscription group will ensure that the subscriptions do not get canceled at the end of the period. The request will reset the `cancel_at_end_of_period` flag to false on each member in the group. ```java @@ -114,6 +128,10 @@ Void cancelDelayedCancellationForGroup( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -122,6 +140,8 @@ Void cancelDelayedCancellationForGroup( ## Response Type +**200**: OK + `void` ## Example Usage @@ -147,15 +167,15 @@ try { # Reactivate Subscription Group -This endpoint will attempt to reactivate or resume a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. +Reactivates or resumes a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. Whether a subscription group is reactivated (a new billing period is created) or resumed (the current billing period is respected) will depend on the parameters that are sent with the request as well as the date of the request relative to the primary subscription's period. ## Reactivating within the current period -If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period the `resume=true` option must be passed in request parameters. +If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period, the `resume=true` option must be passed in request parameters. -An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivated within the current period. If the `resume=true` option is not passed the request will return an error. +An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivated within the current period. If the `resume=true` option is not passed, the request will return an error. The `resume_members` option is ignored in this case. All eligible group members will be automatically resumed. @@ -167,12 +187,22 @@ Member subscriptions can have billing periods that are longer than the primary ( For calendar billing subscriptions, the new billing period created will be a partial one, spanning from the date of reactivation to the next corresponding calendar renewal date. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```java ReactivateSubscriptionGroupResponse reactivateSubscriptionGroup( final String uid, final ReactivateSubscriptionGroupRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -182,6 +212,8 @@ ReactivateSubscriptionGroupResponse reactivateSubscriptionGroup( ## Response Type +**200**: OK + [`ReactivateSubscriptionGroupResponse`](../../doc/models/reactivate-subscription-group-response.md) ## Example Usage diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 65cbb70f..a8ae77e4 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -10,7 +10,7 @@ SubscriptionGroupsController subscriptionGroupsController = client.getSubscripti ## Methods -* [Signup With Subscription Group](../../doc/controllers/subscription-groups.md#signup-with-subscription-group) +* [Signup with Subscription Group](../../doc/controllers/subscription-groups.md#signup-with-subscription-group) * [Create Subscription Group](../../doc/controllers/subscription-groups.md#create-subscription-group) * [List Subscription Groups](../../doc/controllers/subscription-groups.md#list-subscription-groups) * [Read Subscription Group](../../doc/controllers/subscription-groups.md#read-subscription-group) @@ -18,12 +18,12 @@ SubscriptionGroupsController subscriptionGroupsController = client.getSubscripti * [Delete Subscription Group](../../doc/controllers/subscription-groups.md#delete-subscription-group) * [Find Subscription Group](../../doc/controllers/subscription-groups.md#find-subscription-group) * [Add Subscription to Group](../../doc/controllers/subscription-groups.md#add-subscription-to-group) -* [Remove Subscription From Group](../../doc/controllers/subscription-groups.md#remove-subscription-from-group) +* [Remove Subscription from Group](../../doc/controllers/subscription-groups.md#remove-subscription-from-group) -# Signup With Subscription Group +# Signup with Subscription Group -Create multiple subscriptions at once under the same customer and consolidate them into a subscription group. +Creates multiple subscriptions at once under the same customer and consolidates them into a subscription group. You must provide one and only one of the `payer_id`/`payer_reference`/`payer_attributes` for the customer attached to the group. @@ -31,15 +31,19 @@ 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. +When passing a 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. +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 Maxio.js (formerly Chargify.js). ```java SubscriptionGroupSignupResponse signupWithSubscriptionGroup( final SubscriptionGroupSignupRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +52,8 @@ SubscriptionGroupSignupResponse signupWithSubscriptionGroup( ## Response Type +**201**: Created + [`SubscriptionGroupSignupResponse`](../../doc/models/subscription-group-signup-response.md) ## Example Usage @@ -100,6 +106,10 @@ SubscriptionGroupResponse createSubscriptionGroup( final CreateSubscriptionGroupRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -108,6 +118,8 @@ SubscriptionGroupResponse createSubscriptionGroup( ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -179,6 +191,10 @@ ListSubscriptionGroupsResponse listSubscriptionGroups( final ListSubscriptionGroupsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -187,6 +203,8 @@ ListSubscriptionGroupsResponse listSubscriptionGroups( ## Response Type +**200**: OK + [`ListSubscriptionGroupsResponse`](../../doc/models/list-subscription-groups-response.md) ## Example Usage @@ -249,7 +267,7 @@ try { # Read Subscription Group -Use this endpoint to find subscription group details. +Returns subscription group details. #### Current Billing Amount in Cents @@ -261,6 +279,10 @@ FullSubscriptionGroupResponse readSubscriptionGroup( final List include) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -270,6 +292,8 @@ FullSubscriptionGroupResponse readSubscriptionGroup( ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -333,8 +357,8 @@ try { # Update Subscription Group Members -Use this endpoint to update subscription group members. -`"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from subscription group. To clean up members, just leave the array empty. +Updates subscription group members. +`"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from the subscription group. To clean up members, just leave the array empty. ```java SubscriptionGroupResponse updateSubscriptionGroupMembers( @@ -342,6 +366,10 @@ SubscriptionGroupResponse updateSubscriptionGroupMembers( final UpdateSubscriptionGroupRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -351,6 +379,8 @@ SubscriptionGroupResponse updateSubscriptionGroupMembers( ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -416,6 +446,10 @@ DeleteSubscriptionGroupResponse deleteSubscriptionGroup( final String uid) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -424,6 +458,8 @@ DeleteSubscriptionGroupResponse deleteSubscriptionGroup( ## Response Type +**200**: OK + [`DeleteSubscriptionGroupResponse`](../../doc/models/delete-subscription-group-response.md) ## Example Usage @@ -457,15 +493,19 @@ try { # Find Subscription Group -Use this endpoint to find subscription group associated with subscription. +Finds the subscription group associated with a subscription. -If the subscription is not in a group endpoint will return 404 code. +If the subscription is not in a group, the endpoint will return a 404 code. ```java FullSubscriptionGroupResponse findSubscriptionGroup( final String subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -474,6 +514,8 @@ FullSubscriptionGroupResponse findSubscriptionGroup( ## Response Type +**200**: OK + [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) ## Example Usage @@ -560,6 +602,10 @@ SubscriptionGroupResponse addSubscriptionToGroup( final AddSubscriptionToAGroup body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -569,6 +615,8 @@ SubscriptionGroupResponse addSubscriptionToGroup( ## Response Type +**200**: OK + [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) ## Example Usage @@ -622,15 +670,19 @@ try { ``` -# Remove Subscription From Group +# Remove Subscription from Group -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#customer-hierarchies) features, it is possible to remove existing subscription from subscription group. +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#customer-hierarchies) features, it is possible to remove an existing subscription from a subscription group. ```java Void removeSubscriptionFromGroup( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -639,6 +691,8 @@ Void removeSubscriptionFromGroup( ## Response Type +**204**: No Content + `void` ## Example Usage diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 3f3a210e..0c525219 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -28,6 +28,10 @@ AccountBalances readAccountBalances( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -36,6 +40,8 @@ AccountBalances readAccountBalances( ## Response Type +**200**: OK + [`AccountBalances`](../../doc/models/account-balances.md) ## Example Usage @@ -54,7 +60,7 @@ try { # Create Prepayment -## Create Prepayment +Creates a prepayment for a subscription. In order to specify a prepayment made against a subscription, specify the `amount, memo, details, method`. @@ -62,12 +68,22 @@ When the `method` specified is `"credit_card_on_file"`, the prepayment amount wi Note that passing `amount_in_cents` is now allowed. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```java CreatePrepaymentResponse createPrepayment( final int subscriptionId, final CreatePrepaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -77,6 +93,8 @@ CreatePrepaymentResponse createPrepayment( ## Response Type +**201**: Created + [`CreatePrepaymentResponse`](../../doc/models/create-prepayment-response.md) ## Example Usage @@ -127,13 +145,17 @@ try { # List Prepayments -This request will list a subscription's prepayments. +Lists a subscription's prepayments. ```java PrepaymentsResponse listPrepayments( final ListPrepaymentsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -142,6 +164,8 @@ PrepaymentsResponse listPrepayments( ## Response Type +**200**: OK + [`PrepaymentsResponse`](../../doc/models/prepayments-response.md) ## Example Usage @@ -197,7 +221,7 @@ try { # Issue Service Credit -Credit will be added to the subscription in the amount specified in the request body. The credit is subsequently applied to the next generated invoice. +Adds a service credit to the subscription in the specified amount. The credit is subsequently applied to the next generated invoice. ```java ServiceCredit issueServiceCredit( @@ -205,6 +229,10 @@ ServiceCredit issueServiceCredit( final IssueServiceCreditRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -214,6 +242,8 @@ ServiceCredit issueServiceCredit( ## Response Type +**201**: Created + [`ServiceCredit`](../../doc/models/service-credit.md) ## Example Usage @@ -259,7 +289,7 @@ try { # Deduct Service Credit -Credit will be removed from the subscription in the amount specified in the request body. The credit amount being deducted must be equal to or less than the current credit balance. +Deducts a service credit from the subscription in the specified amount. The credit amount being deducted must be equal to or less than the current credit balance. ```java Void deductServiceCredit( @@ -267,6 +297,10 @@ Void deductServiceCredit( final DeductServiceCreditRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -276,6 +310,8 @@ Void deductServiceCredit( ## Response Type +**201**: OK + `void` ## Example Usage @@ -309,7 +345,7 @@ try { # List Service Credits -This request will list a subscription's service credits. +Lists a subscription's service credits. ```java ListServiceCreditsResponse listServiceCredits( @@ -319,6 +355,10 @@ ListServiceCreditsResponse listServiceCredits( final SortingDirection direction) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -330,6 +370,8 @@ ListServiceCreditsResponse listServiceCredits( ## Response Type +**200**: OK + [`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md) ## Example Usage @@ -388,7 +430,7 @@ try { # Refund Prepayment -This endpoint will refund, completely or partially, a particular prepayment applied to a subscription. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. +Refunds a prepayment applied to a subscription, either fully or partially. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. The amount may be passed either as a decimal, with `amount`, or an integer in cents, with `amount_in_cents`. @@ -399,6 +441,10 @@ PrepaymentResponse refundPrepayment( final RefundPrepaymentRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -409,6 +455,8 @@ PrepaymentResponse refundPrepayment( ## Response Type +**201**: Created + [`PrepaymentResponse`](../../doc/models/prepayment-response.md) ## Example Usage diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 3ad2b2ef..49d1fdf7 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -19,7 +19,7 @@ SubscriptionNotesController subscriptionNotesController = client.getSubscription # Create Subscription Note -Use the following method to create a note for a subscription. +Creates a note for a subscription. ## How to Use Subscription Notes @@ -35,6 +35,10 @@ SubscriptionNoteResponse createSubscriptionNote( final UpdateSubscriptionNoteRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -44,6 +48,8 @@ SubscriptionNoteResponse createSubscriptionNote( ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -78,13 +84,17 @@ try { # List Subscription Notes -Use this method to retrieve a list of Notes associated with a Subscription. The response will be an array of Notes. +Retrieves a list of notes associated with a subscription. The response will be an array of Notes. ```java List listSubscriptionNotes( final ListSubscriptionNotesInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -93,6 +103,8 @@ List listSubscriptionNotes( ## Response Type +**200**: OK + [`List`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -151,7 +163,7 @@ try { # Read Subscription Note -Once you have obtained the ID of the note you wish to read, use this method to show a particular note attached to a subscription. +Retrieves a specific note attached to a subscription. ```java SubscriptionNoteResponse readSubscriptionNote( @@ -159,6 +171,10 @@ SubscriptionNoteResponse readSubscriptionNote( final int noteId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -168,6 +184,8 @@ SubscriptionNoteResponse readSubscriptionNote( ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -202,7 +220,7 @@ try { # Update Subscription Note -Use the following method to update a note for a Subscription. +Updates a note for a subscription. ```java SubscriptionNoteResponse updateSubscriptionNote( @@ -211,6 +229,10 @@ SubscriptionNoteResponse updateSubscriptionNote( final UpdateSubscriptionNoteRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -221,6 +243,8 @@ SubscriptionNoteResponse updateSubscriptionNote( ## Response Type +**200**: OK + [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) ## Example Usage @@ -264,6 +288,10 @@ Void deleteSubscriptionNote( final int noteId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -273,6 +301,8 @@ Void deleteSubscriptionNote( ## Response Type +**200**: OK + `void` ## Example Usage diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index ca99ca10..d3d1d536 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -16,6 +16,8 @@ SubscriptionProductsController subscriptionProductsController = client.getSubscr # Migrate Subscription Product +Migrates a subscription to a different product. + In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. ## Valid Subscriptions @@ -30,48 +32,13 @@ Full documentation on how to record Migrations in the Advanced Billing UI can be ## 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 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`) +Important 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. -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. +## 3D Secure (3DS) Authentication post-authentication flow -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`. +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -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` - -### Example Redirect Flow - -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. -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. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```java SubscriptionResponse migrateSubscriptionProduct( @@ -79,6 +46,10 @@ SubscriptionResponse migrateSubscriptionProduct( final SubscriptionProductMigrationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -88,6 +59,8 @@ SubscriptionResponse migrateSubscriptionProduct( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -248,9 +221,11 @@ try { # Preview Subscription Product Migration +Previews the charges resulting from migrating a subscription to a different product. + ## Previewing a future date -It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (eg: `"proration_date": "2020-12-18T18:25:43.511Z"`). +It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (e.g., `"proration_date": "2020-12-18T18:25:43.511Z"`). This will calculate the prorated adjustment, charge, payment and credit applied values assuming the migration is done at that date in the future as opposed to right now. @@ -260,6 +235,10 @@ SubscriptionMigrationPreviewResponse previewSubscriptionProductMigration( final SubscriptionMigrationPreviewRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -269,6 +248,8 @@ SubscriptionMigrationPreviewResponse previewSubscriptionProductMigration( ## Response Type +**200**: OK + [`SubscriptionMigrationPreviewResponse`](../../doc/models/subscription-migration-preview-response.md) ## Example Usage diff --git a/doc/controllers/subscription-renewals.md b/doc/controllers/subscription-renewals.md index b78c55a7..9e1888ec 100644 --- a/doc/controllers/subscription-renewals.md +++ b/doc/controllers/subscription-renewals.md @@ -33,6 +33,10 @@ ScheduledRenewalConfigurationResponse createScheduledRenewalConfiguration( final ScheduledRenewalConfigurationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ ScheduledRenewalConfigurationResponse createScheduledRenewalConfiguration( ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -128,6 +134,10 @@ ScheduledRenewalConfigurationsResponse listScheduledRenewalConfigurations( final Status status) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -137,6 +147,8 @@ ScheduledRenewalConfigurationsResponse listScheduledRenewalConfigurations( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationsResponse`](../../doc/models/scheduled-renewal-configurations-response.md) ## Example Usage @@ -208,6 +220,10 @@ ScheduledRenewalConfigurationResponse readScheduledRenewalConfiguration( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -217,6 +233,8 @@ ScheduledRenewalConfigurationResponse readScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -288,6 +306,10 @@ ScheduledRenewalConfigurationResponse updateScheduledRenewalConfiguration( final ScheduledRenewalConfigurationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -298,6 +320,8 @@ ScheduledRenewalConfigurationResponse updateScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -385,6 +409,10 @@ ScheduledRenewalConfigurationResponse scheduleScheduledRenewalLockIn( final ScheduledRenewalLockInRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -395,6 +423,8 @@ ScheduledRenewalConfigurationResponse scheduleScheduledRenewalLockIn( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -477,6 +507,10 @@ ScheduledRenewalConfigurationResponse lockInScheduledRenewalImmediately( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -486,6 +520,8 @@ ScheduledRenewalConfigurationResponse lockInScheduledRenewalImmediately( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -563,6 +599,10 @@ ScheduledRenewalConfigurationResponse unpublishScheduledRenewalConfiguration( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -572,6 +612,8 @@ ScheduledRenewalConfigurationResponse unpublishScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -641,6 +683,10 @@ ScheduledRenewalConfigurationResponse cancelScheduledRenewalConfiguration( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -650,6 +696,8 @@ ScheduledRenewalConfigurationResponse cancelScheduledRenewalConfiguration( ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) ## Example Usage @@ -720,6 +768,10 @@ ScheduledRenewalConfigurationItemResponse createScheduledRenewalConfigurationIte final ScheduledRenewalConfigurationItemRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -730,6 +782,8 @@ ScheduledRenewalConfigurationItemResponse createScheduledRenewalConfigurationIte ## Response Type +**201**: Created + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -814,6 +868,10 @@ ScheduledRenewalConfigurationItemResponse updateScheduledRenewalConfigurationIte final ScheduledRenewalUpdateRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -825,6 +883,8 @@ ScheduledRenewalConfigurationItemResponse updateScheduledRenewalConfigurationIte ## Response Type +**200**: OK + [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) ## Example Usage @@ -909,6 +969,10 @@ Void deleteScheduledRenewalConfigurationItem( final int id) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -919,6 +983,8 @@ Void deleteScheduledRenewalConfigurationItem( ## Response Type +**204**: No Content + `void` ## Example Usage diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index b529d6a0..3fb2446d 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -24,21 +24,23 @@ SubscriptionStatusController subscriptionStatusController = client.getSubscripti # Retry Subscription -Advanced Billing offers the ability to retry collecting the balance due on a past due Subscription without waiting for the next scheduled attempt. +Retries collecting the balance due on a past-due subscription without waiting for the next scheduled attempt. -## Successful Reactivation +## 3D Secure (3DS) Authentication post-authentication flow -The response will be `200 OK` with the updated Subscription. +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. -## Failed Reactivation - -The response will be `422 "Unprocessable Entity`. +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```java SubscriptionResponse retrySubscription( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +49,8 @@ SubscriptionResponse retrySubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -218,6 +222,10 @@ SubscriptionResponse cancelSubscription( final CancellationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -227,6 +235,8 @@ SubscriptionResponse cancelSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -387,7 +397,7 @@ try { # Resume Subscription -Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. +Resumes a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. ```java SubscriptionResponse resumeSubscription( @@ -395,6 +405,10 @@ SubscriptionResponse resumeSubscription( final ResumptionCharge calendarBillingResumptionCharge) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -404,6 +418,8 @@ SubscriptionResponse resumeSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -539,7 +555,7 @@ try { # Pause Subscription -This will place the subscription in the on_hold state and it will not renew. +Places the subscription on hold, preventing it from renewing. ## Limitations @@ -551,6 +567,10 @@ SubscriptionResponse pauseSubscription( final PauseRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -560,6 +580,8 @@ SubscriptionResponse pauseSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -700,13 +722,13 @@ try { # Update Automatic Subscription Resumption -Once a subscription has been paused / put on hold, you can update the date which was specified to automatically resume the subscription. +Updates the date on which a paused subscription will automatically resume. To update a subscription's resume date, use this method to change or update the `automatically_resume_at` date. ### Remove the resume date -Alternately, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. +Alternatively, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. ```java SubscriptionResponse updateAutomaticSubscriptionResumption( @@ -714,6 +736,10 @@ SubscriptionResponse updateAutomaticSubscriptionResumption( final PauseRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -723,6 +749,8 @@ SubscriptionResponse updateAutomaticSubscriptionResumption( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -874,7 +902,7 @@ try { # Reactivate Subscription -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). +Reactivates 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). **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.** @@ -895,7 +923,7 @@ If a reactivation with `resume: true` were attempted _before_ what would have be If a reactivation with `resume: true` were attempted _after_ what would have been the next billing date of July 1st, then Advanced Billing would not resume the subscription, and instead it would be reactivated with a new billing period. -If a reactivation with `resume: false`, or where 'resume" is omited were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period were possible. +If a reactivation with `resume: false`, or where 'resume' is omitted were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period was possible. | Canceled | Reactivation | Resumable? | |---|---|---| @@ -1035,12 +1063,22 @@ PUT request sent to: + The next billing date should not have changed + Any product-related charges should have been collected +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. + ```java SubscriptionResponse reactivateSubscription( final int subscriptionId, final ReactivateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1050,6 +1088,8 @@ SubscriptionResponse reactivateSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1206,6 +1246,10 @@ DelayedCancellationResponse initiateDelayedCancellation( final CancellationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1215,6 +1259,8 @@ DelayedCancellationResponse initiateDelayedCancellation( ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1241,7 +1287,7 @@ try { # Cancel Delayed Cancellation -Removing the delayed cancellation on a subscription will ensure that it doesn't get canceled at the end of the period that it is in. The request will reset the `cancel_at_end_of_period` flag to `false`. +Removes the delayed cancellation from a subscription, ensuring it is not canceled at the end of the current period. The request will reset the `cancel_at_end_of_period` flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in the future, removing the delayed cancellation has no effect and the call will be successful. @@ -1250,6 +1296,10 @@ DelayedCancellationResponse cancelDelayedCancellation( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1258,6 +1308,8 @@ DelayedCancellationResponse cancelDelayedCancellation( ## Response Type +**200**: OK + [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) ## Example Usage @@ -1290,13 +1342,17 @@ try { # Cancel Dunning -If a subscription is currently in dunning, the subscription will be set to active and the active Dunner will be resolved. +Cancels the active dunning process for a subscription and sets it to active. ```java SubscriptionResponse cancelDunning( final int subscriptionId) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1305,6 +1361,8 @@ SubscriptionResponse cancelDunning( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1331,7 +1389,7 @@ try { # Preview Renewal -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. +Previews a subscription’s next renewal assessment. 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). @@ -1360,6 +1418,10 @@ RenewalPreviewResponse previewRenewal( final RenewalPreviewRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1369,6 +1431,8 @@ RenewalPreviewResponse previewRenewal( ## Response Type +**200**: OK + [`RenewalPreviewResponse`](../../doc/models/renewal-preview-response.md) ## Example Usage diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 12f0f219..0422b94f 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -20,33 +20,45 @@ SubscriptionsController subscriptionsController = client.getSubscriptionsControl * [Update Prepaid Subscription Configuration](../../doc/controllers/subscriptions.md#update-prepaid-subscription-configuration) * [Preview Subscription](../../doc/controllers/subscriptions.md#preview-subscription) * [Apply Coupons to Subscription](../../doc/controllers/subscriptions.md#apply-coupons-to-subscription) -* [Remove Coupon From Subscription](../../doc/controllers/subscriptions.md#remove-coupon-from-subscription) +* [Remove Coupon from Subscription](../../doc/controllers/subscriptions.md#remove-coupon-from-subscription) * [Activate Subscription](../../doc/controllers/subscriptions.md#activate-subscription) # Create Subscription -Creates a Subscription for a customer and product +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`. +Specify the product with `product_id` or `product_handle`. To set a specific product price point, 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. +See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. + +## Payment information + 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. 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 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 [Maxio.js (formerly 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. +## 3D Secure (3DS) Authentication post-authentication flow + +When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. + +See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```java SubscriptionResponse createSubscription( final CreateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -55,6 +67,8 @@ SubscriptionResponse createSubscription( ## Response Type +**201**: Created + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -240,7 +254,7 @@ try { # List Subscriptions -returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. +Returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. ## Search for a subscription @@ -255,6 +269,10 @@ List listSubscriptions( final ListSubscriptionsInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -263,6 +281,8 @@ List listSubscriptions( ## Response Type +**200**: OK + [`List`](../../doc/models/subscription-response.md) ## Example Usage @@ -326,21 +346,21 @@ You can also perform a delayed change to the price point by passing in either `p ## Billing Date Changes -You can update dates for a subscrption. +You can update dates for a subscription. ### 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. +> Note: If you pass an invalid date, the correct date is automatically set to the 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 +### 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. +> 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 reset to null on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. ```java SubscriptionResponse updateSubscription( @@ -348,6 +368,10 @@ SubscriptionResponse updateSubscription( final UpdateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -357,6 +381,8 @@ SubscriptionResponse updateSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -512,6 +538,10 @@ SubscriptionResponse readSubscription( final List include) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -521,6 +551,8 @@ SubscriptionResponse readSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -682,7 +714,7 @@ try { # Override Subscription -This API endpoint allows you to set certain subscription fields that are usually managed for you automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. +Sets certain subscription fields that are usually managed automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. This endpoint is provided for cases where you need to “align” Advanced Billing data with data that happened in your system, perhaps before you started using Advanced Billing. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Advanced Billing to match your existing historical dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API. @@ -708,6 +740,10 @@ Void overrideSubscription( final OverrideSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -717,6 +753,8 @@ Void overrideSubscription( ## Response Type +**204**: No Content + `void` ## Example Usage @@ -751,13 +789,17 @@ try { # Find Subscription -Use this endpoint to find a subscription by its reference. +Finds a subscription by its reference. ```java SubscriptionResponse findSubscription( final String reference) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -766,6 +808,8 @@ SubscriptionResponse findSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -788,7 +832,7 @@ try { # Purge Subscription -For sites in test mode, you may purge individual subscriptions. +Purges an individual subscription for sites in test mode. 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` @@ -805,6 +849,10 @@ SubscriptionResponse purgeSubscription( final List cascade) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -815,6 +863,8 @@ SubscriptionResponse purgeSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -846,7 +896,7 @@ try { # Update Prepaid Subscription Configuration -Use this endpoint to update a subscription's prepaid configuration. +Updates a subscription's prepaid configuration. ```java PrepaidConfigurationResponse updatePrepaidSubscriptionConfiguration( @@ -854,6 +904,10 @@ PrepaidConfigurationResponse updatePrepaidSubscriptionConfiguration( final UpsertPrepaidConfigurationRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -863,6 +917,8 @@ PrepaidConfigurationResponse updatePrepaidSubscriptionConfiguration( ## Response Type +**200**: OK + [`PrepaidConfigurationResponse`](../../doc/models/prepaid-configuration-response.md) ## Example Usage @@ -910,7 +966,7 @@ try { # Preview Subscription -The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. +Previews 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. @@ -941,6 +997,10 @@ SubscriptionPreviewResponse previewSubscription( final CreateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -949,6 +1009,8 @@ SubscriptionPreviewResponse previewSubscription( ## Response Type +**200**: OK + [`SubscriptionPreviewResponse`](../../doc/models/subscription-preview-response.md) ## Example Usage @@ -1092,6 +1154,8 @@ try { # Apply Coupons to Subscription +Applies one or more coupon codes to an existing subscription. + An existing subscription can accommodate multiple discounts/coupon codes. This is only applicable if each coupon is stackable. For more information on stackable coupons, we recommend reviewing our [coupon documentation.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#stackability-rules) ## Query Parameters vs Request Body Parameters @@ -1107,6 +1171,10 @@ SubscriptionResponse applyCouponsToSubscription( final AddCouponsRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1117,6 +1185,8 @@ SubscriptionResponse applyCouponsToSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage @@ -1297,11 +1367,11 @@ try { | 422 | Unprocessable Entity (WebDAV) | [`SubscriptionAddCouponErrorException`](../../doc/models/subscription-add-coupon-error-exception.md) | -# Remove Coupon From Subscription +# Remove Coupon from Subscription -Use this endpoint to remove a coupon from an existing subscription. +Removes a coupon from an existing subscription. -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) +For more information on the expected behavior 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( @@ -1309,6 +1379,10 @@ String removeCouponFromSubscription( final String couponCode) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1318,6 +1392,8 @@ String removeCouponFromSubscription( ## Response Type +**200**: OK + `String` ## Example Usage @@ -1350,7 +1426,7 @@ try { # Activate Subscription -Advanced Billing offers the ability to activate awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. +Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. For details on how the activation works, and how to activate subscriptions through the application, see [activation](#). @@ -1400,6 +1476,10 @@ SubscriptionResponse activateSubscription( final ActivateSubscriptionRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1409,6 +1489,8 @@ SubscriptionResponse activateSubscription( ## Response Type +**200**: OK + [`SubscriptionResponse`](../../doc/models/subscription-response.md) ## Example Usage diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 5ee392a3..e1f909b2 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,13 +20,17 @@ WebhooksController webhooksController = client.getWebhooksController(); # List Webhooks -Allows you to view a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. +Retrieves a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. ```java List listWebhooks( final ListWebhooksInput input) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -35,6 +39,8 @@ List listWebhooks( ## Response Type +**201**: OK + [`List`](../../doc/models/webhook-response.md) ## Example Usage @@ -95,13 +101,17 @@ try { # Enable Webhooks -Allows you to enable webhooks for your site +Enables webhooks for your site. ```java EnableWebhooksResponse enableWebhooks( final EnableWebhooksRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -110,6 +120,8 @@ EnableWebhooksResponse enableWebhooks( ## Response Type +**200**: OK + [`EnableWebhooksResponse`](../../doc/models/enable-webhooks-response.md) ## Example Usage @@ -146,6 +158,10 @@ ReplayWebhooksResponse replayWebhooks( final ReplayWebhooksRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -154,6 +170,8 @@ ReplayWebhooksResponse replayWebhooks( ## Response Type +**200**: OK + [`ReplayWebhooksResponse`](../../doc/models/replay-webhooks-response.md) ## Example Usage @@ -186,7 +204,7 @@ try { # Create Endpoint -Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. +Creates an endpoint and assigns a list of webhook subscriptions (events) to it. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. ```java @@ -194,6 +212,10 @@ EndpointResponse createEndpoint( final CreateOrUpdateEndpointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -202,6 +224,8 @@ EndpointResponse createEndpoint( ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -212,7 +236,8 @@ CreateOrUpdateEndpointRequest body = new CreateOrUpdateEndpointRequest.Builder( "https://your.site/webhooks", Arrays.asList( WebhookSubscription.PAYMENT_SUCCESS, - WebhookSubscription.PAYMENT_FAILURE + WebhookSubscription.PAYMENT_FAILURE, + WebhookSubscription.INVOICE_PENDING ) ) .build() @@ -240,7 +265,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] } } @@ -261,8 +287,14 @@ Returns created endpoints for a site. List listEndpoints() ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Response Type +**200**: OK + [`List`](../../doc/models/endpoint.md) ## Example Usage @@ -287,7 +319,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] }, { @@ -311,7 +344,7 @@ Updates an Endpoint. You can change the `url` of your endpoint or the list of `w Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. -If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. +If you want to unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. ```java EndpointResponse updateEndpoint( @@ -319,6 +352,10 @@ EndpointResponse updateEndpoint( final CreateOrUpdateEndpointRequest body) ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -328,6 +365,8 @@ EndpointResponse updateEndpoint( ## Response Type +**200**: OK + [`EndpointResponse`](../../doc/models/endpoint-response.md) ## Example Usage @@ -340,7 +379,8 @@ CreateOrUpdateEndpointRequest body = new CreateOrUpdateEndpointRequest.Builder( Arrays.asList( WebhookSubscription.PAYMENT_FAILURE, WebhookSubscription.PAYMENT_SUCCESS, - WebhookSubscription.REFUND_FAILURE + WebhookSubscription.REFUND_FAILURE, + WebhookSubscription.INVOICE_PENDING ) ) .build() diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index f79ed92b..70c1d433 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. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) | +| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | 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) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index a6b9fb73..8829fecd 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -14,7 +14,7 @@ | `LastName` | `String` | Optional | The last name of the bank account holder | String getLastName() | setLastName(String lastName) | | `CustomerId` | `Integer` | Optional | The Chargify-assigned id for the customer record to which the bank account belongs | Integer getCustomerId() | setCustomerId(Integer customerId) | | `CurrentVault` | [`BankAccountVault`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | BankAccountVault getCurrentVault() | setCurrentVault(BankAccountVault currentVault) | -| `VaultToken` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | String getVaultToken() | setVaultToken(String vaultToken) | +| `VaultToken` | `String` | Optional | The "token" provided by your vault storage for an already stored payment profile | String getVaultToken() | setVaultToken(String vaultToken) | | `BillingAddress` | `String` | Optional | The current billing street address for the bank account | String getBillingAddress() | setBillingAddress(String billingAddress) | | `BillingCity` | `String` | Optional | The current billing address city for the bank account | String getBillingCity() | setBillingCity(String billingCity) | | `BillingState` | `String` | Optional | The current billing address state for the bank account | String getBillingState() | setBillingState(String billingState) | @@ -23,8 +23,8 @@ | `CustomerVaultToken` | `String` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) | | `BillingAddress2` | `String` | Optional | The current billing street address, second line, for the bank account | String getBillingAddress2() | setBillingAddress2(String billingAddress2) | | `BankName` | `String` | Optional | The bank where the account resides | String getBankName() | setBankName(String bankName) | -| `MaskedBankRoutingNumber` | `String` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be bank_account | String getMaskedBankRoutingNumber() | setMaskedBankRoutingNumber(String maskedBankRoutingNumber) | -| `MaskedBankAccountNumber` | `String` | Required | A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) | String getMaskedBankAccountNumber() | setMaskedBankAccountNumber(String maskedBankAccountNumber) | +| `MaskedBankRoutingNumber` | `String` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account | String getMaskedBankRoutingNumber() | setMaskedBankRoutingNumber(String maskedBankRoutingNumber) | +| `MaskedBankAccountNumber` | `String` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') | String getMaskedBankAccountNumber() | setMaskedBankAccountNumber(String maskedBankAccountNumber) | | `BankAccountType` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | BankAccountType getBankAccountType() | setBankAccountType(BankAccountType bankAccountType) | | `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | BankAccountHolderType getBankAccountHolderType() | setBankAccountHolderType(BankAccountHolderType bankAccountHolderType) | | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.BANK_ACCOUNT` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) | @@ -38,7 +38,6 @@ ```json { - "masked_bank_account_number": "masked_bank_account_number8", "payment_type": "bank_account", "verified": false, "id": 188, diff --git a/doc/models/bank-account-response.md b/doc/models/bank-account-response.md index 85afce46..55607d64 100644 --- a/doc/models/bank-account-response.md +++ b/doc/models/bank-account-response.md @@ -16,7 +16,6 @@ ```json { "payment_profile": { - "masked_bank_account_number": "masked_bank_account_number6", "payment_type": "bank_account", "verified": false, "id": 44, diff --git a/doc/models/billing-schedule.md b/doc/models/billing-schedule.md index 6993916a..cbb601d6 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. This only works for site with Multifrequency enabled. +Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. ## Structure @@ -11,13 +11,13 @@ This attribute is particularly useful when you need to align billing events for | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `InitialBillingAt` | `LocalDate` | Optional | The initial_billing_at attribute in Maxio allows you to specify a custom starting date for billing cycles associated with components that have their own billing frequency set. Only ISO8601 format is supported. | LocalDate getInitialBillingAt() | setInitialBillingAt(LocalDate initialBillingAt) | +| `InitialBillingAt` | `LocalDate` | Optional | Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If omitted or null, billing aligns with the product schedule. If provided, date must be on or after the minimum allowed date for the subscription or component. | LocalDate getInitialBillingAt() | setInitialBillingAt(LocalDate initialBillingAt) | ## Example (as JSON) ```json { - "initial_billing_at": "2024-01-01" + "initial_billing_at": "2026-01-01" } ``` diff --git a/doc/models/chjs-tokenization-failure.md b/doc/models/chjs-tokenization-failure.md new file mode 100644 index 00000000..697d3e9e --- /dev/null +++ b/doc/models/chjs-tokenization-failure.md @@ -0,0 +1,27 @@ + +# Chjs Tokenization Failure + +## Structure + +`ChjsTokenizationFailure` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Errors` | `String` | Required | - | String getErrors() | setErrors(String errors) | +| `PaymentProfileParams` | [`PaymentProfileParams`](../../doc/models/payment-profile-params.md) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | PaymentProfileParams getPaymentProfileParams() | setPaymentProfileParams(PaymentProfileParams paymentProfileParams) | + +## Example (as JSON) + +```json +{ + "errors": "errors2", + "payment_profile_params": { + "first_name": "first_name2", + "last_name": "last_name0", + "card_type": "card_type2" + } +} +``` + diff --git a/doc/models/chjs-tokenization-success.md b/doc/models/chjs-tokenization-success.md new file mode 100644 index 00000000..622835e7 --- /dev/null +++ b/doc/models/chjs-tokenization-success.md @@ -0,0 +1,28 @@ + +# Chjs Tokenization Success + +## Structure + +`ChjsTokenizationSuccess` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `PaymentProfile` | [`TokenizedPaymentProfile`](../../doc/models/tokenized-payment-profile.md) | Required | - | TokenizedPaymentProfile getPaymentProfile() | setPaymentProfile(TokenizedPaymentProfile paymentProfile) | +| `GatewayCustomerId` | `Integer` | Optional | - | Integer getGatewayCustomerId() | setGatewayCustomerId(Integer gatewayCustomerId) | + +## Example (as JSON) + +```json +{ + "payment_profile": { + "id": 44, + "vault_token": "vault_token6", + "gateway_handle": "gateway_handle4", + "customer_vault_token": "customer_vault_token2" + }, + "gateway_customer_id": 44 +} +``` + diff --git a/doc/models/containers/allocation-preview-item-previous-quantity.md b/doc/models/containers/allocation-preview-item-previous-quantity.md index 903ca457..76670995 100644 --- a/doc/models/containers/allocation-preview-item-previous-quantity.md +++ b/doc/models/containers/allocation-preview-item-previous-quantity.md @@ -12,3 +12,27 @@ | `int` | AllocationPreviewItemPreviousQuantity.fromNumber(int number) | | `String` | AllocationPreviewItemPreviousQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +AllocationPreviewItemPreviousQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +AllocationPreviewItemPreviousQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/allocation-preview-item-quantity.md b/doc/models/containers/allocation-preview-item-quantity.md index b6d29537..3f6c7d69 100644 --- a/doc/models/containers/allocation-preview-item-quantity.md +++ b/doc/models/containers/allocation-preview-item-quantity.md @@ -12,3 +12,27 @@ | `int` | AllocationPreviewItemQuantity.fromNumber(int number) | | `String` | AllocationPreviewItemQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +AllocationPreviewItemQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +AllocationPreviewItemQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/allocation-previous-quantity.md b/doc/models/containers/allocation-previous-quantity.md index dc208827..c325027c 100644 --- a/doc/models/containers/allocation-previous-quantity.md +++ b/doc/models/containers/allocation-previous-quantity.md @@ -12,3 +12,27 @@ | `int` | AllocationPreviousQuantity.fromNumber(int number) | | `String` | AllocationPreviousQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +AllocationPreviousQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +AllocationPreviousQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/allocation-quantity.md b/doc/models/containers/allocation-quantity.md index 94154723..2e70fddf 100644 --- a/doc/models/containers/allocation-quantity.md +++ b/doc/models/containers/allocation-quantity.md @@ -12,3 +12,27 @@ | `int` | AllocationQuantity.fromNumber(int number) | | `String` | AllocationQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +AllocationQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +AllocationQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/archive-component-price-point-component-id.md b/doc/models/containers/archive-component-price-point-component-id.md index 571b2df2..f85b62b4 100644 --- a/doc/models/containers/archive-component-price-point-component-id.md +++ b/doc/models/containers/archive-component-price-point-component-id.md @@ -12,3 +12,27 @@ | `int` | ArchiveComponentPricePointComponentId.fromNumber(int number) | | `String` | ArchiveComponentPricePointComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ArchiveComponentPricePointComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ArchiveComponentPricePointComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/archive-component-price-point-price-point-id.md b/doc/models/containers/archive-component-price-point-price-point-id.md index 1f4f2cec..e8031383 100644 --- a/doc/models/containers/archive-component-price-point-price-point-id.md +++ b/doc/models/containers/archive-component-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | ArchiveComponentPricePointPricePointId.fromNumber(int number) | | `String` | ArchiveComponentPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ArchiveComponentPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ArchiveComponentPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/archive-product-price-point-price-point-id.md b/doc/models/containers/archive-product-price-point-price-point-id.md index 2673308c..de16a121 100644 --- a/doc/models/containers/archive-product-price-point-price-point-id.md +++ b/doc/models/containers/archive-product-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | ArchiveProductPricePointPricePointId.fromNumber(int number) | | `String` | ArchiveProductPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ArchiveProductPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ArchiveProductPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/archive-product-price-point-product-id.md b/doc/models/containers/archive-product-price-point-product-id.md index 4d6c4535..47f5dd30 100644 --- a/doc/models/containers/archive-product-price-point-product-id.md +++ b/doc/models/containers/archive-product-price-point-product-id.md @@ -12,3 +12,27 @@ | `int` | ArchiveProductPricePointProductId.fromNumber(int number) | | `String` | ArchiveProductPricePointProductId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ArchiveProductPricePointProductId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ArchiveProductPricePointProductId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md index 77931080..4b6c4f1b 100644 --- a/doc/models/containers/calendar-billing-snap-day.md +++ b/doc/models/containers/calendar-billing-snap-day.md @@ -12,3 +12,27 @@ | `int` | CalendarBillingSnapDay.fromNumber(int number) | | `String` | CalendarBillingSnapDay.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CalendarBillingSnapDay.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CalendarBillingSnapDay.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/clone-component-price-point-component-id.md b/doc/models/containers/clone-component-price-point-component-id.md index 004c01c1..b45e13c7 100644 --- a/doc/models/containers/clone-component-price-point-component-id.md +++ b/doc/models/containers/clone-component-price-point-component-id.md @@ -12,3 +12,27 @@ | `int` | CloneComponentPricePointComponentId.fromNumber(int number) | | `String` | CloneComponentPricePointComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CloneComponentPricePointComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CloneComponentPricePointComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/clone-component-price-point-price-point-id.md b/doc/models/containers/clone-component-price-point-price-point-id.md index 015419ee..b384b499 100644 --- a/doc/models/containers/clone-component-price-point-price-point-id.md +++ b/doc/models/containers/clone-component-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | CloneComponentPricePointPricePointId.fromNumber(int number) | | `String` | CloneComponentPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CloneComponentPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CloneComponentPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/component-allocation-change-allocated-quantity.md b/doc/models/containers/component-allocation-change-allocated-quantity.md index c9eb076e..f701f5fb 100644 --- a/doc/models/containers/component-allocation-change-allocated-quantity.md +++ b/doc/models/containers/component-allocation-change-allocated-quantity.md @@ -12,3 +12,27 @@ | `int` | ComponentAllocationChangeAllocatedQuantity.fromNumber(int number) | | `String` | ComponentAllocationChangeAllocatedQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ComponentAllocationChangeAllocatedQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ComponentAllocationChangeAllocatedQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/component-price-point-assignment-price-point.md b/doc/models/containers/component-price-point-assignment-price-point.md index 3394c37f..abeb0123 100644 --- a/doc/models/containers/component-price-point-assignment-price-point.md +++ b/doc/models/containers/component-price-point-assignment-price-point.md @@ -12,3 +12,27 @@ | `String` | ComponentPricePointAssignmentPricePoint.fromString(String string) | | `int` | ComponentPricePointAssignmentPricePoint.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +ComponentPricePointAssignmentPricePoint.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +ComponentPricePointAssignmentPricePoint.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/coupon-payload-percentage.md b/doc/models/containers/coupon-payload-percentage.md index 1878bb4d..0bccef1f 100644 --- a/doc/models/containers/coupon-payload-percentage.md +++ b/doc/models/containers/coupon-payload-percentage.md @@ -12,3 +12,27 @@ | `String` | CouponPayloadPercentage.fromString(String string) | | `double` | CouponPayloadPercentage.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CouponPayloadPercentage.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CouponPayloadPercentage.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-allocation-price-point-id.md b/doc/models/containers/create-allocation-price-point-id.md index 6c38cc0c..22bbc463 100644 --- a/doc/models/containers/create-allocation-price-point-id.md +++ b/doc/models/containers/create-allocation-price-point-id.md @@ -12,3 +12,27 @@ | `String` | CreateAllocationPricePointId.fromString(String string) | | `int` | CreateAllocationPricePointId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateAllocationPricePointId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateAllocationPricePointId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-component-price-point-request-price-point.md b/doc/models/containers/create-component-price-point-request-price-point.md index 5f3eca5e..6cf02aac 100644 --- a/doc/models/containers/create-component-price-point-request-price-point.md +++ b/doc/models/containers/create-component-price-point-request-price-point.md @@ -12,3 +12,63 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | CreateComponentPricePointRequestPricePoint.fromCreateComponentPricePoint(CreateComponentPricePoint createComponentPricePoint) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | CreateComponentPricePointRequestPricePoint.fromCreatePrepaidUsageComponentPricePoint(CreatePrepaidUsageComponentPricePoint createPrepaidUsageComponentPricePoint) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```java +CreateComponentPricePointRequestPricePoint.fromCreateComponentPricePoint( + new CreateComponentPricePoint.Builder( + "name0", + PricingScheme.PER_UNIT, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 242 + ), + PriceUnitPrice.fromPrecision( + 23.26D + ) + ) + .build() + ) + ) + .useSiteExchangeRate(true) + .build() + ) +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```java +CreateComponentPricePointRequestPricePoint.fromCreatePrepaidUsageComponentPricePoint( + new CreatePrepaidUsageComponentPricePoint.Builder( + "name0", + PricingScheme.PER_UNIT, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 242 + ), + PriceUnitPrice.fromPrecision( + 23.26D + ) + ) + .build() + ), + new OveragePricing.Builder( + PricingScheme.STAIRSTEP + ) + .build() + ) + .useSiteExchangeRate(true) + .build() + ) +``` + diff --git a/doc/models/containers/create-component-price-points-request-price-points.md b/doc/models/containers/create-component-price-points-request-price-points.md index 3f6386f7..78067ef6 100644 --- a/doc/models/containers/create-component-price-points-request-price-points.md +++ b/doc/models/containers/create-component-price-points-request-price-points.md @@ -12,3 +12,63 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | CreateComponentPricePointsRequestPricePoints.fromCreateComponentPricePoint(CreateComponentPricePoint createComponentPricePoint) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | CreateComponentPricePointsRequestPricePoints.fromCreatePrepaidUsageComponentPricePoint(CreatePrepaidUsageComponentPricePoint createPrepaidUsageComponentPricePoint) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```java +CreateComponentPricePointsRequestPricePoints.fromCreateComponentPricePoint( + new CreateComponentPricePoint.Builder( + "name0", + PricingScheme.PER_UNIT, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 242 + ), + PriceUnitPrice.fromPrecision( + 23.26D + ) + ) + .build() + ) + ) + .useSiteExchangeRate(true) + .build() + ) +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```java +CreateComponentPricePointsRequestPricePoints.fromCreatePrepaidUsageComponentPricePoint( + new CreatePrepaidUsageComponentPricePoint.Builder( + "name0", + PricingScheme.PER_UNIT, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 242 + ), + PriceUnitPrice.fromPrecision( + 23.26D + ) + ) + .build() + ), + new OveragePricing.Builder( + PricingScheme.STAIRSTEP + ) + .build() + ) + .useSiteExchangeRate(true) + .build() + ) +``` + diff --git a/doc/models/containers/create-invoice-coupon-amount.md b/doc/models/containers/create-invoice-coupon-amount.md index e73e96fa..4e6d2f50 100644 --- a/doc/models/containers/create-invoice-coupon-amount.md +++ b/doc/models/containers/create-invoice-coupon-amount.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceCouponAmount.fromString(String string) | | `double` | CreateInvoiceCouponAmount.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponAmount.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponAmount.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-invoice-coupon-percentage.md b/doc/models/containers/create-invoice-coupon-percentage.md index ecc4ca0c..8e6f9b80 100644 --- a/doc/models/containers/create-invoice-coupon-percentage.md +++ b/doc/models/containers/create-invoice-coupon-percentage.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceCouponPercentage.fromString(String string) | | `double` | CreateInvoiceCouponPercentage.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponPercentage.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponPercentage.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-invoice-coupon-product-family-id.md b/doc/models/containers/create-invoice-coupon-product-family-id.md index c76f0bf6..a979ff16 100644 --- a/doc/models/containers/create-invoice-coupon-product-family-id.md +++ b/doc/models/containers/create-invoice-coupon-product-family-id.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceCouponProductFamilyId.fromString(String string) | | `int` | CreateInvoiceCouponProductFamilyId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponProductFamilyId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateInvoiceCouponProductFamilyId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-invoice-item-component-id.md b/doc/models/containers/create-invoice-item-component-id.md index e438a95d..44bc3e8a 100644 --- a/doc/models/containers/create-invoice-item-component-id.md +++ b/doc/models/containers/create-invoice-item-component-id.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceItemComponentId.fromString(String string) | | `int` | CreateInvoiceItemComponentId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemComponentId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemComponentId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-invoice-item-price-point-id.md b/doc/models/containers/create-invoice-item-price-point-id.md index 3e2883f6..9c647656 100644 --- a/doc/models/containers/create-invoice-item-price-point-id.md +++ b/doc/models/containers/create-invoice-item-price-point-id.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceItemPricePointId.fromString(String string) | | `int` | CreateInvoiceItemPricePointId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemPricePointId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemPricePointId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-invoice-item-product-id.md b/doc/models/containers/create-invoice-item-product-id.md index 09eec953..f42acb7b 100644 --- a/doc/models/containers/create-invoice-item-product-id.md +++ b/doc/models/containers/create-invoice-item-product-id.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceItemProductId.fromString(String string) | | `int` | CreateInvoiceItemProductId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemProductId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemProductId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-invoice-item-product-price-point-id.md b/doc/models/containers/create-invoice-item-product-price-point-id.md index 767b8737..44465b8b 100644 --- a/doc/models/containers/create-invoice-item-product-price-point-id.md +++ b/doc/models/containers/create-invoice-item-product-price-point-id.md @@ -12,3 +12,27 @@ | `String` | CreateInvoiceItemProductPricePointId.fromString(String string) | | `int` | CreateInvoiceItemProductPricePointId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemProductPricePointId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemProductPricePointId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-invoice-item-quantity.md b/doc/models/containers/create-invoice-item-quantity.md index 2f5d024c..0a54fbab 100644 --- a/doc/models/containers/create-invoice-item-quantity.md +++ b/doc/models/containers/create-invoice-item-quantity.md @@ -12,3 +12,27 @@ | `double` | CreateInvoiceItemQuantity.fromPrecision(double precision) | | `String` | CreateInvoiceItemQuantity.fromString(String string) | +## double + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemQuantity.fromPrecision( + 0D + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-invoice-item-unit-price.md b/doc/models/containers/create-invoice-item-unit-price.md index 4955e52e..3fce4a5a 100644 --- a/doc/models/containers/create-invoice-item-unit-price.md +++ b/doc/models/containers/create-invoice-item-unit-price.md @@ -12,3 +12,27 @@ | `double` | CreateInvoiceItemUnitPrice.fromPrecision(double precision) | | `String` | CreateInvoiceItemUnitPrice.fromString(String string) | +## double + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemUnitPrice.fromPrecision( + 0D + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateInvoiceItemUnitPrice.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-invoice-payment-amount.md b/doc/models/containers/create-invoice-payment-amount.md index 0ad3089c..dfd1a26c 100644 --- a/doc/models/containers/create-invoice-payment-amount.md +++ b/doc/models/containers/create-invoice-payment-amount.md @@ -12,3 +12,27 @@ | `String` | CreateInvoicePaymentAmount.fromString(String string) | | `double` | CreateInvoicePaymentAmount.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CreateInvoicePaymentAmount.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateInvoicePaymentAmount.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-metafields-request-metafields.md b/doc/models/containers/create-metafields-request-metafields.md index 4be9bdc3..1cf263f9 100644 --- a/doc/models/containers/create-metafields-request-metafields.md +++ b/doc/models/containers/create-metafields-request-metafields.md @@ -12,3 +12,44 @@ | [`CreateMetafield`](../../../doc/models/create-metafield.md) | CreateMetafieldsRequestMetafields.fromCreateMetafield(CreateMetafield createMetafield) | | [`List`](../../../doc/models/create-metafield.md) | CreateMetafieldsRequestMetafields.fromListOfCreateMetafield(List listOfCreateMetafield) | +## CreateMetafield + +### Initialization Code + +#### Example + +```java +CreateMetafieldsRequestMetafields.fromCreateMetafield( + new CreateMetafield.Builder() + .name("my_field") + .scope(new MetafieldScope.Builder() + .csv(IncludeOption.EXCLUDE) + .invoices(IncludeOption.EXCLUDE) + .statements(IncludeOption.EXCLUDE) + .portal(IncludeOption.EXCLUDE) + .publicShow(IncludeOption.EXCLUDE) + .publicEdit(IncludeOption.EXCLUDE) + .build()) + .inputType(MetafieldInput.TEXT) + .mEnum(Arrays.asList( + "string" + )) + .build() + ) +``` + +## List + +### Initialization Code + +#### Example + +```java +CreateMetafieldsRequestMetafields.fromListOfCreateMetafield( + Arrays.asList( + new CreateMetafield.Builder() + .build() + ) + ) +``` + diff --git a/doc/models/containers/create-multi-invoice-payment-amount.md b/doc/models/containers/create-multi-invoice-payment-amount.md index ca90e8f2..ad1e6a07 100644 --- a/doc/models/containers/create-multi-invoice-payment-amount.md +++ b/doc/models/containers/create-multi-invoice-payment-amount.md @@ -12,3 +12,27 @@ | `String` | CreateMultiInvoicePaymentAmount.fromString(String string) | | `double` | CreateMultiInvoicePaymentAmount.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CreateMultiInvoicePaymentAmount.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateMultiInvoicePaymentAmount.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-or-update-segment-price-unit-price.md b/doc/models/containers/create-or-update-segment-price-unit-price.md index e0a23be7..d009644f 100644 --- a/doc/models/containers/create-or-update-segment-price-unit-price.md +++ b/doc/models/containers/create-or-update-segment-price-unit-price.md @@ -12,3 +12,27 @@ | `String` | CreateOrUpdateSegmentPriceUnitPrice.fromString(String string) | | `double` | CreateOrUpdateSegmentPriceUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +CreateOrUpdateSegmentPriceUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateOrUpdateSegmentPriceUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-month.md b/doc/models/containers/create-payment-profile-expiration-month.md index ba35fc43..8853d0b6 100644 --- a/doc/models/containers/create-payment-profile-expiration-month.md +++ b/doc/models/containers/create-payment-profile-expiration-month.md @@ -12,3 +12,27 @@ | `int` | CreatePaymentProfileExpirationMonth.fromNumber(int number) | | `String` | CreatePaymentProfileExpirationMonth.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreatePaymentProfileExpirationMonth.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreatePaymentProfileExpirationMonth.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-year.md b/doc/models/containers/create-payment-profile-expiration-year.md index ecd18e08..74387915 100644 --- a/doc/models/containers/create-payment-profile-expiration-year.md +++ b/doc/models/containers/create-payment-profile-expiration-year.md @@ -12,3 +12,27 @@ | `int` | CreatePaymentProfileExpirationYear.fromNumber(int number) | | `String` | CreatePaymentProfileExpirationYear.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreatePaymentProfileExpirationYear.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreatePaymentProfileExpirationYear.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-product-price-point-product-id.md b/doc/models/containers/create-product-price-point-product-id.md index 4f70d943..814f46e2 100644 --- a/doc/models/containers/create-product-price-point-product-id.md +++ b/doc/models/containers/create-product-price-point-product-id.md @@ -12,3 +12,27 @@ | `int` | CreateProductPricePointProductId.fromNumber(int number) | | `String` | CreateProductPricePointProductId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateProductPricePointProductId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateProductPricePointProductId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-segment-segment-property-1-value.md b/doc/models/containers/create-segment-segment-property-1-value.md index b569ab3e..0da2870b 100644 --- a/doc/models/containers/create-segment-segment-property-1-value.md +++ b/doc/models/containers/create-segment-segment-property-1-value.md @@ -14,3 +14,51 @@ | `int` | CreateSegmentSegmentProperty1Value.fromNumber(int number) | | `boolean` | CreateSegmentSegmentProperty1Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty1Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty1Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty1Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty1Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/create-segment-segment-property-2-value.md b/doc/models/containers/create-segment-segment-property-2-value.md index f49a495c..5bd2779d 100644 --- a/doc/models/containers/create-segment-segment-property-2-value.md +++ b/doc/models/containers/create-segment-segment-property-2-value.md @@ -14,3 +14,51 @@ | `int` | CreateSegmentSegmentProperty2Value.fromNumber(int number) | | `boolean` | CreateSegmentSegmentProperty2Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty2Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty2Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty2Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty2Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/create-segment-segment-property-3-value.md b/doc/models/containers/create-segment-segment-property-3-value.md index 3c0204c5..d5940051 100644 --- a/doc/models/containers/create-segment-segment-property-3-value.md +++ b/doc/models/containers/create-segment-segment-property-3-value.md @@ -14,3 +14,51 @@ | `int` | CreateSegmentSegmentProperty3Value.fromNumber(int number) | | `boolean` | CreateSegmentSegmentProperty3Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty3Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty3Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty3Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty3Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/create-segment-segment-property-4-value.md b/doc/models/containers/create-segment-segment-property-4-value.md index 32f64208..43a28373 100644 --- a/doc/models/containers/create-segment-segment-property-4-value.md +++ b/doc/models/containers/create-segment-segment-property-4-value.md @@ -14,3 +14,51 @@ | `int` | CreateSegmentSegmentProperty4Value.fromNumber(int number) | | `boolean` | CreateSegmentSegmentProperty4Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty4Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty4Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty4Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +CreateSegmentSegmentProperty4Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/create-subscription-component-allocated-quantity.md b/doc/models/containers/create-subscription-component-allocated-quantity.md index e6d7d053..6d3e8e5b 100644 --- a/doc/models/containers/create-subscription-component-allocated-quantity.md +++ b/doc/models/containers/create-subscription-component-allocated-quantity.md @@ -12,3 +12,27 @@ | `int` | CreateSubscriptionComponentAllocatedQuantity.fromNumber(int number) | | `String` | CreateSubscriptionComponentAllocatedQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentAllocatedQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentAllocatedQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-subscription-component-component-id.md b/doc/models/containers/create-subscription-component-component-id.md index f05eba70..8b1f5d82 100644 --- a/doc/models/containers/create-subscription-component-component-id.md +++ b/doc/models/containers/create-subscription-component-component-id.md @@ -12,3 +12,27 @@ | `int` | CreateSubscriptionComponentComponentId.fromNumber(int number) | | `String` | CreateSubscriptionComponentComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-subscription-component-price-point-id.md b/doc/models/containers/create-subscription-component-price-point-id.md index 3f7609ff..4960fdbd 100644 --- a/doc/models/containers/create-subscription-component-price-point-id.md +++ b/doc/models/containers/create-subscription-component-price-point-id.md @@ -12,3 +12,27 @@ | `int` | CreateSubscriptionComponentPricePointId.fromNumber(int number) | | `String` | CreateSubscriptionComponentPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateSubscriptionComponentPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-subscription-offer-id.md b/doc/models/containers/create-subscription-offer-id.md index f4c376e5..132d1702 100644 --- a/doc/models/containers/create-subscription-offer-id.md +++ b/doc/models/containers/create-subscription-offer-id.md @@ -12,3 +12,27 @@ | `String` | CreateSubscriptionOfferId.fromString(String string) | | `int` | CreateSubscriptionOfferId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +CreateSubscriptionOfferId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +CreateSubscriptionOfferId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/create-usage-component-id.md b/doc/models/containers/create-usage-component-id.md index c721f53a..29208a55 100644 --- a/doc/models/containers/create-usage-component-id.md +++ b/doc/models/containers/create-usage-component-id.md @@ -12,3 +12,27 @@ | `int` | CreateUsageComponentId.fromNumber(int number) | | `String` | CreateUsageComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateUsageComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateUsageComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/create-usage-subscription-id-or-reference.md b/doc/models/containers/create-usage-subscription-id-or-reference.md index f5d95f14..875dbd90 100644 --- a/doc/models/containers/create-usage-subscription-id-or-reference.md +++ b/doc/models/containers/create-usage-subscription-id-or-reference.md @@ -12,3 +12,27 @@ | `int` | CreateUsageSubscriptionIdOrReference.fromNumber(int number) | | `String` | CreateUsageSubscriptionIdOrReference.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +CreateUsageSubscriptionIdOrReference.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +CreateUsageSubscriptionIdOrReference.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/customer-error-response-errors.md b/doc/models/containers/customer-error-response-errors.md index 7d4df820..866973a0 100644 --- a/doc/models/containers/customer-error-response-errors.md +++ b/doc/models/containers/customer-error-response-errors.md @@ -12,3 +12,30 @@ | [`CustomerError`](../../../doc/models/customer-error.md) | CustomerErrorResponseErrors.fromCustomerError(CustomerError customerError) | | `List` | CustomerErrorResponseErrors.fromListOfString(List listOfString) | +## CustomerError + +### Initialization Code + +#### Example + +```java +CustomerErrorResponseErrors.fromCustomerError( + new CustomerError.Builder() + .build() + ) +``` + +## List + +### Initialization Code + +#### Example + +```java +CustomerErrorResponseErrors.fromListOfString( + Arrays.asList( + "String1" + ) + ) +``` + diff --git a/doc/models/containers/deduct-service-credit-amount.md b/doc/models/containers/deduct-service-credit-amount.md index e84ee6f6..134a61d8 100644 --- a/doc/models/containers/deduct-service-credit-amount.md +++ b/doc/models/containers/deduct-service-credit-amount.md @@ -12,3 +12,27 @@ | `String` | DeductServiceCreditAmount.fromString(String string) | | `double` | DeductServiceCreditAmount.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +DeductServiceCreditAmount.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +DeductServiceCreditAmount.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/ebb-component-unit-price.md b/doc/models/containers/ebb-component-unit-price.md index 91306e3d..96bcad5b 100644 --- a/doc/models/containers/ebb-component-unit-price.md +++ b/doc/models/containers/ebb-component-unit-price.md @@ -12,3 +12,27 @@ | `String` | EBBComponentUnitPrice.fromString(String string) | | `double` | EBBComponentUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +EBBComponentUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +EBBComponentUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index 1f95ebef..3a8ef091 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -27,4 +27,418 @@ | [`PaymentCollectionMethodChanged`](../../../doc/models/payment-collection-method-changed.md) | EventEventSpecificData.fromPaymentCollectionMethodChanged(PaymentCollectionMethodChanged paymentCollectionMethodChanged) | | [`ItemPricePointChanged`](../../../doc/models/item-price-point-changed.md) | EventEventSpecificData.fromItemPricePointChanged(ItemPricePointChanged itemPricePointChanged) | | [`CustomFieldValueChange`](../../../doc/models/custom-field-value-change.md) | EventEventSpecificData.fromCustomFieldValueChange(CustomFieldValueChange customFieldValueChange) | +| [`ChjsTokenizationSuccess`](../../../doc/models/chjs-tokenization-success.md) | EventEventSpecificData.fromChjsTokenizationSuccess(ChjsTokenizationSuccess chjsTokenizationSuccess) | +| [`ChjsTokenizationFailure`](../../../doc/models/chjs-tokenization-failure.md) | EventEventSpecificData.fromChjsTokenizationFailure(ChjsTokenizationFailure chjsTokenizationFailure) | + +## SubscriptionProductChange + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromSubscriptionProductChange( + new SubscriptionProductChange.Builder( + 126, + 12 + ) + .build() + ) +``` + +## SubscriptionStateChange + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromSubscriptionStateChange( + new SubscriptionStateChange.Builder( + "previous_subscription_state2", + "new_subscription_state6" + ) + .build() + ) +``` + +## PaymentRelatedEvents + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPaymentRelatedEvents( + new PaymentRelatedEvents.Builder( + 42, + 58 + ) + .build() + ) +``` + +## RefundSuccess + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromRefundSuccess( + new RefundSuccess.Builder( + 12, + 182, + 168 + ) + .build() + ) +``` + +## ComponentAllocationChange + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromComponentAllocationChange( + new ComponentAllocationChange.Builder( + 94, + 102, + 88, + "component_handle8", + "memo2", + 158 + ) + .build() + ) +``` + +## MeteredUsage + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromMeteredUsage( + new MeteredUsage.Builder( + "previous_unit_balance6", + 80, + 42, + 4, + "component_handle8", + "memo2" + ) + .build() + ) +``` + +## PrepaidUsage + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPrepaidUsage( + new PrepaidUsage.Builder( + "previous_unit_balance0", + "previous_overage_unit_balance4", + 252, + 224, + 214, + 106, + 176, + "component_handle4", + "memo8", + Arrays.asList( + new PrepaidUsageAllocationDetail.Builder() + .build() + ) + ) + .build() + ) +``` + +## DunningStepReached + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromDunningStepReached( + new DunningStepReached.Builder( + new DunnerData.Builder( + "state8", + 194, + 98L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + 42, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z") + ) + .build(), + new DunningStepData.Builder( + 198, + "action4", + false, + false, + false + ) + .build(), + new DunningStepData.Builder( + 30, + "action4", + false, + false, + false + ) + .build() + ) + .build() + ) +``` + +## InvoiceIssued + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromInvoiceIssued( + new InvoiceIssued.Builder( + "uid4", + "number8", + "role2", + DateTimeHelper.fromSimpleDate("2016-03-13"), + "issue_date0", + "paid_date6", + "due_amount6", + "paid_amount4", + "tax_amount2", + "refund_amount0", + "total_amount0", + "status_amount4", + "product_name0", + "consolidation_level4", + Arrays.asList( + new InvoiceLineItemEventData.Builder() + .build() + ) + ) + .build() + ) +``` + +## PendingCancellationChange + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPendingCancellationChange( + new PendingCancellationChange.Builder( + "cancellation_state8", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z") + ) + .build() + ) +``` + +## PrepaidSubscriptionBalanceChanged + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPrepaidSubscriptionBalanceChanged( + new PrepaidSubscriptionBalanceChanged.Builder( + "reason8", + 250L, + 44L, + 242L + ) + .build() + ) +``` + +## ProformaInvoiceIssued + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromProformaInvoiceIssued( + new ProformaInvoiceIssued.Builder( + "uid0", + "number2", + "role6", + DateTimeHelper.fromSimpleDate("2016-03-13"), + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + "due_amount2", + "paid_amount8", + "tax_amount6", + "total_amount6", + "product_name6", + Arrays.asList( + new InvoiceLineItemEventData.Builder() + .build() + ) + ) + .build() + ) +``` + +## SubscriptionGroupSignupEventData + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromSubscriptionGroupSignupEventData( + new SubscriptionGroupSignupEventData.Builder( + new SubscriptionGroupSignupFailureData.Builder() + .build(), + new Customer.Builder() + .build() + ) + .build() + ) +``` + +## CreditAccountBalanceChanged + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromCreditAccountBalanceChanged( + new CreditAccountBalanceChanged.Builder( + "reason8", + 10L, + 116L, + "currency_code8", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z") + ) + .build() + ) +``` + +## PrepaymentAccountBalanceChanged + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPrepaymentAccountBalanceChanged( + new PrepaymentAccountBalanceChanged.Builder( + "reason4", + 182L, + 206L, + "currency_code4" + ) + .build() + ) +``` + +## PaymentCollectionMethodChanged + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromPaymentCollectionMethodChanged( + new PaymentCollectionMethodChanged.Builder( + "previous_value4", + "current_value2" + ) + .build() + ) +``` + +## ItemPricePointChanged + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromItemPricePointChanged( + new ItemPricePointChanged.Builder( + 66, + "item_type6", + "item_handle4", + "item_name8", + new ItemPricePointData.Builder() + .build(), + new ItemPricePointData.Builder() + .build() + ) + .build() + ) +``` + +## CustomFieldValueChange + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromCustomFieldValueChange( + new CustomFieldValueChange.Builder( + "event_type2", + "metafield_name6", + 78, + "old_value2", + "new_value8", + "resource_type2", + 74 + ) + .build() + ) +``` + +## ChjsTokenizationSuccess + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromChjsTokenizationSuccess( + new ChjsTokenizationSuccess.Builder( + new TokenizedPaymentProfile.Builder( + 44 + ) + .build() + ) + .build() + ) +``` + +## ChjsTokenizationFailure + +### Initialization Code + +#### Example + +```java +EventEventSpecificData.fromChjsTokenizationFailure( + new ChjsTokenizationFailure.Builder( + "errors2" + ) + .build() + ) +``` diff --git a/doc/models/containers/invoice-event-payment.md b/doc/models/containers/invoice-event-payment.md index 2fe41e1f..1150f07b 100644 --- a/doc/models/containers/invoice-event-payment.md +++ b/doc/models/containers/invoice-event-payment.md @@ -1,6 +1,8 @@ # Invoice Event Payment +A nested data structure detailing the method of payment + ## Class Name `InvoiceEventPayment` @@ -15,3 +17,86 @@ | [`PaymentMethodExternal`](../../../doc/models/payment-method-external.md) | InvoiceEventPayment.fromPaymentMethodExternal(PaymentMethodExternal paymentMethodExternal) | | [`PaymentMethodPaypal`](../../../doc/models/payment-method-paypal.md) | InvoiceEventPayment.fromPaymentMethodPaypal(PaymentMethodPaypal paymentMethodPaypal) | +## PaymentMethodApplePay + +### Initialization Code + +#### Example + +```java +InvoiceEventPayment.fromPaymentMethodApplePay( + new PaymentMethodApplePay.Builder( + InvoiceEventPaymentMethod.APPLE_PAY + ) + .build() + ) +``` + +## PaymentMethodBankAccount + +### Initialization Code + +#### Example + +```java +InvoiceEventPayment.fromPaymentMethodBankAccount( + new PaymentMethodBankAccount.Builder( + "masked_account_number2", + "masked_routing_number2", + InvoiceEventPaymentMethod.BANK_ACCOUNT + ) + .build() + ) +``` + +## PaymentMethodCreditCard + +### Initialization Code + +#### Example + +```java +InvoiceEventPayment.fromPaymentMethodCreditCard( + new PaymentMethodCreditCard.Builder( + "card_brand4", + "masked_card_number0", + InvoiceEventPaymentMethod.CREDIT_CARD + ) + .build() + ) +``` + +## PaymentMethodExternal + +### Initialization Code + +#### Example + +```java +InvoiceEventPayment.fromPaymentMethodExternal( + new PaymentMethodExternal.Builder( + "details4", + "kind2", + "memo8", + InvoiceEventPaymentMethod.EXTERNAL + ) + .build() + ) +``` + +## PaymentMethodPaypal + +### Initialization Code + +#### Example + +```java +InvoiceEventPayment.fromPaymentMethodPaypal( + new PaymentMethodPaypal.Builder( + "email2", + InvoiceEventPaymentMethod.PAYPAL_ACCOUNT + ) + .build() + ) +``` + diff --git a/doc/models/containers/invoice-event.md b/doc/models/containers/invoice-event.md index fd9a3a7c..c2012bda 100644 --- a/doc/models/containers/invoice-event.md +++ b/doc/models/containers/invoice-event.md @@ -25,3 +25,458 @@ | [`VoidInvoiceEvent`](../../../doc/models/void-invoice-event.md) | InvoiceEvent.fromVoidInvoiceEvent(VoidInvoiceEvent voidInvoiceEvent) | | [`VoidRemainderEvent`](../../../doc/models/void-remainder-event.md) | InvoiceEvent.fromVoidRemainderEvent(VoidRemainderEvent voidRemainderEvent) | +## ApplyCreditNoteEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromApplyCreditNoteEvent( + new ApplyCreditNoteEvent.Builder( + 214L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.APPLY_CREDIT_NOTE, + new ApplyCreditNoteEventData.Builder( + "uid6", + "credit_note_number0", + "credit_note_uid0", + "original_amount0", + "applied_amount2" + ) + .build() + ) + .build() + ) +``` + +## ApplyDebitNoteEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromApplyDebitNoteEvent( + new ApplyDebitNoteEvent.Builder( + 164L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.APPLY_DEBIT_NOTE, + new ApplyDebitNoteEventData.Builder( + "debit_note_number6", + "debit_note_uid2", + "original_amount0", + "applied_amount2" + ) + .build() + ) + .build() + ) +``` + +## ApplyPaymentEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromApplyPaymentEvent( + new ApplyPaymentEvent.Builder( + 234L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.APPLY_PAYMENT, + new ApplyPaymentEventData.Builder( + InvoiceConsolidationLevel.CHILD, + "memo0", + "original_amount0", + "applied_amount2", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + InvoiceEventPayment.fromPaymentMethodApplePay( + new PaymentMethodApplePay.Builder( + InvoiceEventPaymentMethod.APPLE_PAY + ) + .build() + ) + ) + .build() + ) + .build() + ) +``` + +## BackportInvoiceEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromBackportInvoiceEvent( + new BackportInvoiceEvent.Builder( + 78L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.BACKPORT_INVOICE, + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build() + ) + .build() + ) +``` + +## ChangeChargebackStatusEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromChangeChargebackStatusEvent( + new ChangeChargebackStatusEvent.Builder( + 214L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.CHANGE_CHARGEBACK_STATUS, + new ChangeChargebackStatusEventData.Builder( + ChargebackStatus.WON + ) + .build() + ) + .build() + ) +``` + +## ChangeInvoiceCollectionMethodEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromChangeInvoiceCollectionMethodEvent( + new ChangeInvoiceCollectionMethodEvent.Builder( + 246L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.CHANGE_INVOICE_COLLECTION_METHOD, + new ChangeInvoiceCollectionMethodEventData.Builder( + "from_collection_method4", + "to_collection_method8" + ) + .build() + ) + .build() + ) +``` + +## ChangeInvoiceStatusEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromChangeInvoiceStatusEvent( + new ChangeInvoiceStatusEvent.Builder( + 92L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.CHANGE_INVOICE_STATUS, + new ChangeInvoiceStatusEventData.Builder( + InvoiceStatus.OPEN, + InvoiceStatus.PENDING + ) + .build() + ) + .build() + ) +``` + +## CreateCreditNoteEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromCreateCreditNoteEvent( + new CreateCreditNoteEvent.Builder( + 28L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.CREATE_CREDIT_NOTE, + new CreditNote.Builder() + .build() + ) + .build() + ) +``` + +## CreateDebitNoteEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromCreateDebitNoteEvent( + new CreateDebitNoteEvent.Builder( + 98L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.CREATE_DEBIT_NOTE, + new DebitNote.Builder() + .build() + ) + .build() + ) +``` + +## FailedPaymentEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromFailedPaymentEvent( + new FailedPaymentEvent.Builder( + 120L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.FAILED_PAYMENT, + new FailedPaymentEventData.Builder( + 220, + 194, + InvoicePaymentMethodType.CASH, + 78 + ) + .build() + ) + .build() + ) +``` + +## IssueInvoiceEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromIssueInvoiceEvent( + new IssueInvoiceEvent.Builder( + 130L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.ISSUE_INVOICE, + new IssueInvoiceEventData.Builder( + InvoiceConsolidationLevel.CHILD, + InvoiceStatus.OPEN, + InvoiceStatus.PENDING, + "due_amount8", + "total_amount2" + ) + .build() + ) + .build() + ) +``` + +## RefundInvoiceEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromRefundInvoiceEvent( + new RefundInvoiceEvent.Builder( + 54L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.REFUND_INVOICE, + new RefundInvoiceEventData.Builder( + false, + new CreditNote.Builder() + .build(), + 204, + "refund_amount8", + 248, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z") + ) + .build() + ) + .build() + ) +``` + +## RemovePaymentEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromRemovePaymentEvent( + new RemovePaymentEvent.Builder( + 236L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.REMOVE_PAYMENT, + new RemovePaymentEventData.Builder( + 78, + "memo0", + "applied_amount2", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + InvoiceEventPayment.fromPaymentMethodApplePay( + new PaymentMethodApplePay.Builder( + InvoiceEventPaymentMethod.APPLE_PAY + ) + .build() + ), + false + ) + .build() + ) + .build() + ) +``` + +## VoidInvoiceEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromVoidInvoiceEvent( + new VoidInvoiceEvent.Builder( + 16L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.VOID_INVOICE, + new VoidInvoiceEventData.Builder( + new CreditNote.Builder() + .build(), + "memo0", + "applied_amount2", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + false, + "reason2" + ) + .build() + ) + .build() + ) +``` + +## VoidRemainderEvent + +### Initialization Code + +#### Example + +```java +InvoiceEvent.fromVoidRemainderEvent( + new VoidRemainderEvent.Builder( + 128L, + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z"), + new Invoice.Builder() + .issueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .dueDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .paidDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .publicUrlExpiresOn(DateTimeHelper.fromSimpleDate("2024-01-21")) + .build(), + InvoiceEventType.VOID_REMAINDER, + new VoidRemainderEventData.Builder( + new CreditNote.Builder() + .build(), + "memo0", + "applied_amount2", + DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z") + ) + .build() + ) + .build() + ) +``` + diff --git a/doc/models/containers/issue-service-credit-amount.md b/doc/models/containers/issue-service-credit-amount.md index defabcd4..81cfe46e 100644 --- a/doc/models/containers/issue-service-credit-amount.md +++ b/doc/models/containers/issue-service-credit-amount.md @@ -12,3 +12,27 @@ | `double` | IssueServiceCreditAmount.fromPrecision(double precision) | | `String` | IssueServiceCreditAmount.fromString(String string) | +## double + +### Initialization Code + +#### Example + +```java +IssueServiceCreditAmount.fromPrecision( + 0D + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +IssueServiceCreditAmount.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/list-product-price-points-input-product-id.md b/doc/models/containers/list-product-price-points-input-product-id.md index ff2be98a..09e90d5e 100644 --- a/doc/models/containers/list-product-price-points-input-product-id.md +++ b/doc/models/containers/list-product-price-points-input-product-id.md @@ -12,3 +12,27 @@ | `int` | ListProductPricePointsInputProductId.fromNumber(int number) | | `String` | ListProductPricePointsInputProductId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ListProductPricePointsInputProductId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ListProductPricePointsInputProductId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/list-usages-input-component-id.md b/doc/models/containers/list-usages-input-component-id.md index 5d509284..4392e34a 100644 --- a/doc/models/containers/list-usages-input-component-id.md +++ b/doc/models/containers/list-usages-input-component-id.md @@ -12,3 +12,27 @@ | `int` | ListUsagesInputComponentId.fromNumber(int number) | | `String` | ListUsagesInputComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ListUsagesInputComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ListUsagesInputComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/list-usages-input-subscription-id-or-reference.md b/doc/models/containers/list-usages-input-subscription-id-or-reference.md index 45379586..7ff72a94 100644 --- a/doc/models/containers/list-usages-input-subscription-id-or-reference.md +++ b/doc/models/containers/list-usages-input-subscription-id-or-reference.md @@ -12,3 +12,27 @@ | `int` | ListUsagesInputSubscriptionIdOrReference.fromNumber(int number) | | `String` | ListUsagesInputSubscriptionIdOrReference.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ListUsagesInputSubscriptionIdOrReference.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ListUsagesInputSubscriptionIdOrReference.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/metafield-enum.md b/doc/models/containers/metafield-enum.md index 6080e1ef..98823505 100644 --- a/doc/models/containers/metafield-enum.md +++ b/doc/models/containers/metafield-enum.md @@ -12,3 +12,29 @@ | `String` | MetafieldEnum.fromString(String string) | | `List` | MetafieldEnum.fromListOfString(List listOfString) | +## String + +### Initialization Code + +#### Example + +```java +MetafieldEnum.fromString( + "String0" + ) +``` + +## List + +### Initialization Code + +#### Example + +```java +MetafieldEnum.fromListOfString( + Arrays.asList( + "String1" + ) + ) +``` + diff --git a/doc/models/containers/metered-component-unit-price.md b/doc/models/containers/metered-component-unit-price.md index e0f2835e..87a1d89b 100644 --- a/doc/models/containers/metered-component-unit-price.md +++ b/doc/models/containers/metered-component-unit-price.md @@ -12,3 +12,27 @@ | `String` | MeteredComponentUnitPrice.fromString(String string) | | `double` | MeteredComponentUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +MeteredComponentUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +MeteredComponentUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/on-off-component-unit-price.md b/doc/models/containers/on-off-component-unit-price.md index 52737f52..eeb0b6ef 100644 --- a/doc/models/containers/on-off-component-unit-price.md +++ b/doc/models/containers/on-off-component-unit-price.md @@ -12,3 +12,27 @@ | `String` | OnOffComponentUnitPrice.fromString(String string) | | `double` | OnOffComponentUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +OnOffComponentUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +OnOffComponentUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-month.md b/doc/models/containers/payment-profile-attributes-expiration-month.md index e2575344..5e233e05 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-month.md +++ b/doc/models/containers/payment-profile-attributes-expiration-month.md @@ -12,3 +12,27 @@ | `int` | PaymentProfileAttributesExpirationMonth.fromNumber(int number) | | `String` | PaymentProfileAttributesExpirationMonth.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +PaymentProfileAttributesExpirationMonth.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +PaymentProfileAttributesExpirationMonth.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-year.md b/doc/models/containers/payment-profile-attributes-expiration-year.md index 08bd8021..04294398 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-year.md +++ b/doc/models/containers/payment-profile-attributes-expiration-year.md @@ -12,3 +12,27 @@ | `int` | PaymentProfileAttributesExpirationYear.fromNumber(int number) | | `String` | PaymentProfileAttributesExpirationYear.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +PaymentProfileAttributesExpirationYear.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +PaymentProfileAttributesExpirationYear.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/payment-profile.md b/doc/models/containers/payment-profile.md index 1bdae622..eadcd813 100644 --- a/doc/models/containers/payment-profile.md +++ b/doc/models/containers/payment-profile.md @@ -14,3 +14,83 @@ | [`CreditCardPaymentProfile`](../../../doc/models/credit-card-payment-profile.md) | PaymentProfile.fromCreditCardPaymentProfile(CreditCardPaymentProfile creditCardPaymentProfile) | | [`PaypalPaymentProfile`](../../../doc/models/paypal-payment-profile.md) | PaymentProfile.fromPaypalPaymentProfile(PaypalPaymentProfile paypalPaymentProfile) | +## ApplePayPaymentProfile + +### Initialization Code + +#### Example + +```java +PaymentProfile.fromApplePayPaymentProfile( + new ApplePayPaymentProfile.Builder( + PaymentType.APPLE_PAY + ) + .build() + ) +``` + +## BankAccountPaymentProfile + +### Initialization Code + +#### Example + +```java +PaymentProfile.fromBankAccountPaymentProfile( + new BankAccountPaymentProfile.Builder( + PaymentType.BANK_ACCOUNT + ) + .verified(false) + .build() + ) +``` + +## CreditCardPaymentProfile + +### Initialization Code + +#### Example + +```java +PaymentProfile.fromCreditCardPaymentProfile( + new CreditCardPaymentProfile.Builder( + PaymentType.CREDIT_CARD + ) + .id(10088716) + .firstName("Test") + .lastName("Subscription") + .maskedCardNumber("XXXX-XXXX-XXXX-1") + .cardType(CardType.BOGUS) + .expirationMonth(1) + .expirationYear(2022) + .customerId(14543792) + .currentVault(CreditCardVault.BOGUS) + .vaultToken("1") + .billingAddress("123 Montana Way") + .billingCity("Billings") + .billingState("MT") + .billingZip("59101") + .billingCountry("US") + .customerVaultToken("customer_vault_token2") + .billingAddress2("") + .siteGatewaySettingId(1) + .gatewayHandle("gateway_handle8") + .build() + ) +``` + +## PaypalPaymentProfile + +### Initialization Code + +#### Example + +```java +PaymentProfile.fromPaypalPaymentProfile( + new PaypalPaymentProfile.Builder( + PaymentType.PAYPAL_ACCOUNT + ) + .build() + ) +``` + diff --git a/doc/models/containers/prepaid-usage-component-unit-price.md b/doc/models/containers/prepaid-usage-component-unit-price.md index 07797586..1625d130 100644 --- a/doc/models/containers/prepaid-usage-component-unit-price.md +++ b/doc/models/containers/prepaid-usage-component-unit-price.md @@ -12,3 +12,27 @@ | `String` | PrepaidUsageComponentUnitPrice.fromString(String string) | | `double` | PrepaidUsageComponentUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +PrepaidUsageComponentUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +PrepaidUsageComponentUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/price-ending-quantity.md b/doc/models/containers/price-ending-quantity.md index 377cc91a..5d0a223f 100644 --- a/doc/models/containers/price-ending-quantity.md +++ b/doc/models/containers/price-ending-quantity.md @@ -12,3 +12,27 @@ | `int` | PriceEndingQuantity.fromNumber(int number) | | `String` | PriceEndingQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +PriceEndingQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +PriceEndingQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/price-starting-quantity.md b/doc/models/containers/price-starting-quantity.md index 13d2e4c2..0daf5d86 100644 --- a/doc/models/containers/price-starting-quantity.md +++ b/doc/models/containers/price-starting-quantity.md @@ -12,3 +12,27 @@ | `int` | PriceStartingQuantity.fromNumber(int number) | | `String` | PriceStartingQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +PriceStartingQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +PriceStartingQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/price-unit-price.md b/doc/models/containers/price-unit-price.md index 48fbf99f..443e9df4 100644 --- a/doc/models/containers/price-unit-price.md +++ b/doc/models/containers/price-unit-price.md @@ -12,3 +12,27 @@ | `double` | PriceUnitPrice.fromPrecision(double precision) | | `String` | PriceUnitPrice.fromString(String string) | +## double + +### Initialization Code + +#### Example + +```java +PriceUnitPrice.fromPrecision( + 0D + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +PriceUnitPrice.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/quantity-based-component-unit-price.md b/doc/models/containers/quantity-based-component-unit-price.md index f7369dbd..dce687c4 100644 --- a/doc/models/containers/quantity-based-component-unit-price.md +++ b/doc/models/containers/quantity-based-component-unit-price.md @@ -12,3 +12,27 @@ | `String` | QuantityBasedComponentUnitPrice.fromString(String string) | | `double` | QuantityBasedComponentUnitPrice.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +QuantityBasedComponentUnitPrice.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +QuantityBasedComponentUnitPrice.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/reactivate-subscription-request-resume.md b/doc/models/containers/reactivate-subscription-request-resume.md index 1d37bbca..f4f65fce 100644 --- a/doc/models/containers/reactivate-subscription-request-resume.md +++ b/doc/models/containers/reactivate-subscription-request-resume.md @@ -12,3 +12,28 @@ | `boolean` | ReactivateSubscriptionRequestResume.fromBoolean(boolean mBoolean) | | [`ResumeOptions`](../../../doc/models/resume-options.md) | ReactivateSubscriptionRequestResume.fromResumeOptions(ResumeOptions resumeOptions) | +## boolean + +### Initialization Code + +#### Example + +```java +ReactivateSubscriptionRequestResume.fromBoolean( + false + ) +``` + +## ResumeOptions + +### Initialization Code + +#### Example + +```java +ReactivateSubscriptionRequestResume.fromResumeOptions( + new ResumeOptions.Builder() + .build() + ) +``` + diff --git a/doc/models/containers/read-component-price-point-component-id.md b/doc/models/containers/read-component-price-point-component-id.md index d91256d5..5f78cd31 100644 --- a/doc/models/containers/read-component-price-point-component-id.md +++ b/doc/models/containers/read-component-price-point-component-id.md @@ -12,3 +12,27 @@ | `int` | ReadComponentPricePointComponentId.fromNumber(int number) | | `String` | ReadComponentPricePointComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ReadComponentPricePointComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ReadComponentPricePointComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/read-component-price-point-price-point-id.md b/doc/models/containers/read-component-price-point-price-point-id.md index eaa607a2..db72cb92 100644 --- a/doc/models/containers/read-component-price-point-price-point-id.md +++ b/doc/models/containers/read-component-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | ReadComponentPricePointPricePointId.fromNumber(int number) | | `String` | ReadComponentPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ReadComponentPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ReadComponentPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/read-product-price-point-price-point-id.md b/doc/models/containers/read-product-price-point-price-point-id.md index 8b57dac4..43fa78c9 100644 --- a/doc/models/containers/read-product-price-point-price-point-id.md +++ b/doc/models/containers/read-product-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | ReadProductPricePointPricePointId.fromNumber(int number) | | `String` | ReadProductPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ReadProductPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ReadProductPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/read-product-price-point-product-id.md b/doc/models/containers/read-product-price-point-product-id.md index 14182fb1..d27a5747 100644 --- a/doc/models/containers/read-product-price-point-product-id.md +++ b/doc/models/containers/read-product-price-point-product-id.md @@ -12,3 +12,27 @@ | `int` | ReadProductPricePointProductId.fromNumber(int number) | | `String` | ReadProductPricePointProductId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +ReadProductPricePointProductId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +ReadProductPricePointProductId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/refund-consolidated-invoice-segment-uids.md b/doc/models/containers/refund-consolidated-invoice-segment-uids.md index b1c1c94a..8a3bde55 100644 --- a/doc/models/containers/refund-consolidated-invoice-segment-uids.md +++ b/doc/models/containers/refund-consolidated-invoice-segment-uids.md @@ -12,3 +12,29 @@ | `List` | RefundConsolidatedInvoiceSegmentUids.fromListOfString(List listOfString) | | `String` | RefundConsolidatedInvoiceSegmentUids.fromString(String string) | +## List + +### Initialization Code + +#### Example + +```java +RefundConsolidatedInvoiceSegmentUids.fromListOfString( + Arrays.asList( + "String1" + ) + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +RefundConsolidatedInvoiceSegmentUids.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/refund-invoice-request-refund.md b/doc/models/containers/refund-invoice-request-refund.md index 6db859d7..e3c64f2d 100644 --- a/doc/models/containers/refund-invoice-request-refund.md +++ b/doc/models/containers/refund-invoice-request-refund.md @@ -12,3 +12,42 @@ | [`RefundInvoice`](../../../doc/models/refund-invoice.md) | RefundInvoiceRequestRefund.fromRefundInvoice(RefundInvoice refundInvoice) | | [`RefundConsolidatedInvoice`](../../../doc/models/refund-consolidated-invoice.md) | RefundInvoiceRequestRefund.fromRefundConsolidatedInvoice(RefundConsolidatedInvoice refundConsolidatedInvoice) | +## RefundInvoice + +### Initialization Code + +#### Example + +```java +RefundInvoiceRequestRefund.fromRefundInvoice( + new RefundInvoice.Builder( + "amount8", + "memo0", + 0 + ) + .build() + ) +``` + +## RefundConsolidatedInvoice + +### Initialization Code + +#### Example + +```java +RefundInvoiceRequestRefund.fromRefundConsolidatedInvoice( + new RefundConsolidatedInvoice.Builder( + "memo0", + 46, + RefundConsolidatedInvoiceSegmentUids.fromListOfString( + Arrays.asList( + "String0", + "String1" + ) + ) + ) + .build() + ) +``` + diff --git a/doc/models/containers/refund-prepayment-amount.md b/doc/models/containers/refund-prepayment-amount.md index 88e5d29d..0d0b89c1 100644 --- a/doc/models/containers/refund-prepayment-amount.md +++ b/doc/models/containers/refund-prepayment-amount.md @@ -12,3 +12,27 @@ | `String` | RefundPrepaymentAmount.fromString(String string) | | `double` | RefundPrepaymentAmount.fromPrecision(double precision) | +## String + +### Initialization Code + +#### Example + +```java +RefundPrepaymentAmount.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +RefundPrepaymentAmount.fromPrecision( + 0D + ) +``` + diff --git a/doc/models/containers/renewal-preview-component-component-id.md b/doc/models/containers/renewal-preview-component-component-id.md index 516b2159..3d967584 100644 --- a/doc/models/containers/renewal-preview-component-component-id.md +++ b/doc/models/containers/renewal-preview-component-component-id.md @@ -12,3 +12,27 @@ | `String` | RenewalPreviewComponentComponentId.fromString(String string) | | `int` | RenewalPreviewComponentComponentId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +RenewalPreviewComponentComponentId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +RenewalPreviewComponentComponentId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/renewal-preview-component-price-point-id.md b/doc/models/containers/renewal-preview-component-price-point-id.md index b671c709..96c43820 100644 --- a/doc/models/containers/renewal-preview-component-price-point-id.md +++ b/doc/models/containers/renewal-preview-component-price-point-id.md @@ -12,3 +12,27 @@ | `String` | RenewalPreviewComponentPricePointId.fromString(String string) | | `int` | RenewalPreviewComponentPricePointId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +RenewalPreviewComponentPricePointId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +RenewalPreviewComponentPricePointId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md index 4e71334e..2f55ead3 100644 --- a/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md +++ b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md @@ -12,3 +12,35 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```java +ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent.Builder( + "Component", + 108 + ) + .build() + ) +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```java +ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct( + new ScheduledRenewalItemRequestBodyProduct.Builder( + "Product", + 32 + ) + .build() + ) +``` + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-interval.md b/doc/models/containers/scheduled-renewal-product-price-point-interval.md index f6498ed6..d9457a28 100644 --- a/doc/models/containers/scheduled-renewal-product-price-point-interval.md +++ b/doc/models/containers/scheduled-renewal-product-price-point-interval.md @@ -12,3 +12,27 @@ | `String` | ScheduledRenewalProductPricePointInterval.fromString(String string) | | `int` | ScheduledRenewalProductPricePointInterval.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +ScheduledRenewalProductPricePointInterval.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +ScheduledRenewalProductPricePointInterval.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md index ab39b59e..75961517 100644 --- a/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md +++ b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md @@ -12,3 +12,27 @@ | `String` | ScheduledRenewalProductPricePointPriceInCents.fromString(String string) | | `long` | ScheduledRenewalProductPricePointPriceInCents.fromLong(long mLong) | +## String + +### Initialization Code + +#### Example + +```java +ScheduledRenewalProductPricePointPriceInCents.fromString( + "String0" + ) +``` + +## long + +### Initialization Code + +#### Example + +```java +ScheduledRenewalProductPricePointPriceInCents.fromLong( + 0L + ) +``` + diff --git a/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md index 3cbb524b..f72d5de4 100644 --- a/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md +++ b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md @@ -12,3 +12,35 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```java +ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent.Builder( + "Component", + 108 + ) + .build() + ) +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```java +ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct( + new ScheduledRenewalItemRequestBodyProduct.Builder( + "Product", + 32 + ) + .build() + ) +``` + diff --git a/doc/models/containers/segment-segment-property-1-value.md b/doc/models/containers/segment-segment-property-1-value.md index acf99935..8c612bf4 100644 --- a/doc/models/containers/segment-segment-property-1-value.md +++ b/doc/models/containers/segment-segment-property-1-value.md @@ -14,3 +14,51 @@ | `int` | SegmentSegmentProperty1Value.fromNumber(int number) | | `boolean` | SegmentSegmentProperty1Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty1Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty1Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty1Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty1Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/segment-segment-property-2-value.md b/doc/models/containers/segment-segment-property-2-value.md index 1d239564..71965a26 100644 --- a/doc/models/containers/segment-segment-property-2-value.md +++ b/doc/models/containers/segment-segment-property-2-value.md @@ -14,3 +14,51 @@ | `int` | SegmentSegmentProperty2Value.fromNumber(int number) | | `boolean` | SegmentSegmentProperty2Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty2Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty2Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty2Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty2Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/segment-segment-property-3-value.md b/doc/models/containers/segment-segment-property-3-value.md index b901dc6f..d112b579 100644 --- a/doc/models/containers/segment-segment-property-3-value.md +++ b/doc/models/containers/segment-segment-property-3-value.md @@ -14,3 +14,51 @@ | `int` | SegmentSegmentProperty3Value.fromNumber(int number) | | `boolean` | SegmentSegmentProperty3Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty3Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty3Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty3Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty3Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/segment-segment-property-4-value.md b/doc/models/containers/segment-segment-property-4-value.md index 5aab5069..a9b2e19b 100644 --- a/doc/models/containers/segment-segment-property-4-value.md +++ b/doc/models/containers/segment-segment-property-4-value.md @@ -14,3 +14,51 @@ | `int` | SegmentSegmentProperty4Value.fromNumber(int number) | | `boolean` | SegmentSegmentProperty4Value.fromBoolean(boolean mBoolean) | +## String + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty4Value.fromString( + "String0" + ) +``` + +## double + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty4Value.fromPrecision( + 0D + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty4Value.fromNumber( + 0 + ) +``` + +## boolean + +### Initialization Code + +#### Example + +```java +SegmentSegmentProperty4Value.fromBoolean( + false + ) +``` + diff --git a/doc/models/containers/subscription-component-allocated-quantity.md b/doc/models/containers/subscription-component-allocated-quantity.md index 189ba154..35b0bc83 100644 --- a/doc/models/containers/subscription-component-allocated-quantity.md +++ b/doc/models/containers/subscription-component-allocated-quantity.md @@ -12,3 +12,27 @@ | `int` | SubscriptionComponentAllocatedQuantity.fromNumber(int number) | | `String` | SubscriptionComponentAllocatedQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +SubscriptionComponentAllocatedQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +SubscriptionComponentAllocatedQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-expiration-interval.md b/doc/models/containers/subscription-custom-price-expiration-interval.md index e3564771..97132f2e 100644 --- a/doc/models/containers/subscription-custom-price-expiration-interval.md +++ b/doc/models/containers/subscription-custom-price-expiration-interval.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPriceExpirationInterval.fromString(String string) | | `int` | SubscriptionCustomPriceExpirationInterval.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceExpirationInterval.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceExpirationInterval.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md b/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md index d015de3f..2d892476 100644 --- a/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md +++ b/doc/models/containers/subscription-custom-price-initial-charge-in-cents.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPriceInitialChargeInCents.fromString(String string) | | `long` | SubscriptionCustomPriceInitialChargeInCents.fromLong(long mLong) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceInitialChargeInCents.fromString( + "String0" + ) +``` + +## long + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceInitialChargeInCents.fromLong( + 0L + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-interval.md b/doc/models/containers/subscription-custom-price-interval.md index 03d14041..10e94c8d 100644 --- a/doc/models/containers/subscription-custom-price-interval.md +++ b/doc/models/containers/subscription-custom-price-interval.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPriceInterval.fromString(String string) | | `int` | SubscriptionCustomPriceInterval.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceInterval.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceInterval.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-price-in-cents.md b/doc/models/containers/subscription-custom-price-price-in-cents.md index 24abbb57..7a71503d 100644 --- a/doc/models/containers/subscription-custom-price-price-in-cents.md +++ b/doc/models/containers/subscription-custom-price-price-in-cents.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPricePriceInCents.fromString(String string) | | `long` | SubscriptionCustomPricePriceInCents.fromLong(long mLong) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPricePriceInCents.fromString( + "String0" + ) +``` + +## long + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPricePriceInCents.fromLong( + 0L + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-trial-interval.md b/doc/models/containers/subscription-custom-price-trial-interval.md index 10b52a36..25dc3809 100644 --- a/doc/models/containers/subscription-custom-price-trial-interval.md +++ b/doc/models/containers/subscription-custom-price-trial-interval.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPriceTrialInterval.fromString(String string) | | `int` | SubscriptionCustomPriceTrialInterval.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceTrialInterval.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceTrialInterval.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-custom-price-trial-price-in-cents.md b/doc/models/containers/subscription-custom-price-trial-price-in-cents.md index ca10b5da..53146337 100644 --- a/doc/models/containers/subscription-custom-price-trial-price-in-cents.md +++ b/doc/models/containers/subscription-custom-price-trial-price-in-cents.md @@ -12,3 +12,27 @@ | `String` | SubscriptionCustomPriceTrialPriceInCents.fromString(String string) | | `long` | SubscriptionCustomPriceTrialPriceInCents.fromLong(long mLong) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceTrialPriceInCents.fromString( + "String0" + ) +``` + +## long + +### Initialization Code + +#### Example + +```java +SubscriptionCustomPriceTrialPriceInCents.fromLong( + 0L + ) +``` + diff --git a/doc/models/containers/subscription-group-create-error-response-errors.md b/doc/models/containers/subscription-group-create-error-response-errors.md index b40aab07..341cee2c 100644 --- a/doc/models/containers/subscription-group-create-error-response-errors.md +++ b/doc/models/containers/subscription-group-create-error-response-errors.md @@ -13,3 +13,47 @@ | [`SubscriptionGroupSingleError`](../../../doc/models/subscription-group-single-error.md) | SubscriptionGroupCreateErrorResponseErrors.fromSubscriptionGroupSingleError(SubscriptionGroupSingleError subscriptionGroupSingleError) | | `String` | SubscriptionGroupCreateErrorResponseErrors.fromString(String string) | +## SubscriptionGroupMembersArrayError + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreateErrorResponseErrors.fromSubscriptionGroupMembersArrayError( + new SubscriptionGroupMembersArrayError.Builder( + Arrays.asList( + "members6" + ) + ) + .build() + ) +``` + +## SubscriptionGroupSingleError + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreateErrorResponseErrors.fromSubscriptionGroupSingleError( + new SubscriptionGroupSingleError.Builder( + "subscription_group2" + ) + .build() + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreateErrorResponseErrors.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/subscription-group-credit-card-expiration-month.md b/doc/models/containers/subscription-group-credit-card-expiration-month.md index 043d85b2..3e3d4be4 100644 --- a/doc/models/containers/subscription-group-credit-card-expiration-month.md +++ b/doc/models/containers/subscription-group-credit-card-expiration-month.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupCreditCardExpirationMonth.fromString(String string) | | `int` | SubscriptionGroupCreditCardExpirationMonth.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardExpirationMonth.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardExpirationMonth.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-credit-card-expiration-year.md b/doc/models/containers/subscription-group-credit-card-expiration-year.md index 997e9ff7..2fef3885 100644 --- a/doc/models/containers/subscription-group-credit-card-expiration-year.md +++ b/doc/models/containers/subscription-group-credit-card-expiration-year.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupCreditCardExpirationYear.fromString(String string) | | `int` | SubscriptionGroupCreditCardExpirationYear.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardExpirationYear.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardExpirationYear.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-credit-card-full-number.md b/doc/models/containers/subscription-group-credit-card-full-number.md index 713aae8f..278c7f5a 100644 --- a/doc/models/containers/subscription-group-credit-card-full-number.md +++ b/doc/models/containers/subscription-group-credit-card-full-number.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupCreditCardFullNumber.fromString(String string) | | `int` | SubscriptionGroupCreditCardFullNumber.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardFullNumber.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupCreditCardFullNumber.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-signup-component-allocated-quantity.md b/doc/models/containers/subscription-group-signup-component-allocated-quantity.md index bf0dec8a..d8850926 100644 --- a/doc/models/containers/subscription-group-signup-component-allocated-quantity.md +++ b/doc/models/containers/subscription-group-signup-component-allocated-quantity.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupSignupComponentAllocatedQuantity.fromString(String string) | | `int` | SubscriptionGroupSignupComponentAllocatedQuantity.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentAllocatedQuantity.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentAllocatedQuantity.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-signup-component-component-id.md b/doc/models/containers/subscription-group-signup-component-component-id.md index a3b97ce3..194dd111 100644 --- a/doc/models/containers/subscription-group-signup-component-component-id.md +++ b/doc/models/containers/subscription-group-signup-component-component-id.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupSignupComponentComponentId.fromString(String string) | | `int` | SubscriptionGroupSignupComponentComponentId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentComponentId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentComponentId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-signup-component-price-point-id.md b/doc/models/containers/subscription-group-signup-component-price-point-id.md index ffd4f17d..5ca434cc 100644 --- a/doc/models/containers/subscription-group-signup-component-price-point-id.md +++ b/doc/models/containers/subscription-group-signup-component-price-point-id.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupSignupComponentPricePointId.fromString(String string) | | `int` | SubscriptionGroupSignupComponentPricePointId.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentPricePointId.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentPricePointId.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/subscription-group-signup-component-unit-balance.md b/doc/models/containers/subscription-group-signup-component-unit-balance.md index 528af8f9..0781173d 100644 --- a/doc/models/containers/subscription-group-signup-component-unit-balance.md +++ b/doc/models/containers/subscription-group-signup-component-unit-balance.md @@ -12,3 +12,27 @@ | `String` | SubscriptionGroupSignupComponentUnitBalance.fromString(String string) | | `int` | SubscriptionGroupSignupComponentUnitBalance.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentUnitBalance.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +SubscriptionGroupSignupComponentUnitBalance.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/update-component-price-point-component-id.md b/doc/models/containers/update-component-price-point-component-id.md index 94212fc4..364bd861 100644 --- a/doc/models/containers/update-component-price-point-component-id.md +++ b/doc/models/containers/update-component-price-point-component-id.md @@ -12,3 +12,27 @@ | `int` | UpdateComponentPricePointComponentId.fromNumber(int number) | | `String` | UpdateComponentPricePointComponentId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdateComponentPricePointComponentId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdateComponentPricePointComponentId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-component-price-point-price-point-id.md b/doc/models/containers/update-component-price-point-price-point-id.md index c567f26c..5cda3d5a 100644 --- a/doc/models/containers/update-component-price-point-price-point-id.md +++ b/doc/models/containers/update-component-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | UpdateComponentPricePointPricePointId.fromNumber(int number) | | `String` | UpdateComponentPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdateComponentPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdateComponentPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-metafields-request-metafields.md b/doc/models/containers/update-metafields-request-metafields.md index 770d17c8..46c02647 100644 --- a/doc/models/containers/update-metafields-request-metafields.md +++ b/doc/models/containers/update-metafields-request-metafields.md @@ -12,3 +12,31 @@ | [`UpdateMetafield`](../../../doc/models/update-metafield.md) | UpdateMetafieldsRequestMetafields.fromUpdateMetafield(UpdateMetafield updateMetafield) | | [`List`](../../../doc/models/update-metafield.md) | UpdateMetafieldsRequestMetafields.fromListOfUpdateMetafield(List listOfUpdateMetafield) | +## UpdateMetafield + +### Initialization Code + +#### Example + +```java +UpdateMetafieldsRequestMetafields.fromUpdateMetafield( + new UpdateMetafield.Builder() + .build() + ) +``` + +## List + +### Initialization Code + +#### Example + +```java +UpdateMetafieldsRequestMetafields.fromListOfUpdateMetafield( + Arrays.asList( + new UpdateMetafield.Builder() + .build() + ) + ) +``` + diff --git a/doc/models/containers/update-price-ending-quantity.md b/doc/models/containers/update-price-ending-quantity.md index 429c2ae5..e8e0b56e 100644 --- a/doc/models/containers/update-price-ending-quantity.md +++ b/doc/models/containers/update-price-ending-quantity.md @@ -12,3 +12,27 @@ | `int` | UpdatePriceEndingQuantity.fromNumber(int number) | | `String` | UpdatePriceEndingQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdatePriceEndingQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdatePriceEndingQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-price-starting-quantity.md b/doc/models/containers/update-price-starting-quantity.md index 8bde7447..bf9e204c 100644 --- a/doc/models/containers/update-price-starting-quantity.md +++ b/doc/models/containers/update-price-starting-quantity.md @@ -12,3 +12,27 @@ | `int` | UpdatePriceStartingQuantity.fromNumber(int number) | | `String` | UpdatePriceStartingQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdatePriceStartingQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdatePriceStartingQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-price-unit-price.md b/doc/models/containers/update-price-unit-price.md index bd10b794..f12b72fb 100644 --- a/doc/models/containers/update-price-unit-price.md +++ b/doc/models/containers/update-price-unit-price.md @@ -12,3 +12,27 @@ | `double` | UpdatePriceUnitPrice.fromPrecision(double precision) | | `String` | UpdatePriceUnitPrice.fromString(String string) | +## double + +### Initialization Code + +#### Example + +```java +UpdatePriceUnitPrice.fromPrecision( + 0D + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdatePriceUnitPrice.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-product-price-point-price-point-id.md b/doc/models/containers/update-product-price-point-price-point-id.md index bffaa8ee..89beac40 100644 --- a/doc/models/containers/update-product-price-point-price-point-id.md +++ b/doc/models/containers/update-product-price-point-price-point-id.md @@ -12,3 +12,27 @@ | `int` | UpdateProductPricePointPricePointId.fromNumber(int number) | | `String` | UpdateProductPricePointPricePointId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdateProductPricePointPricePointId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdateProductPricePointPricePointId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-product-price-point-product-id.md b/doc/models/containers/update-product-price-point-product-id.md index 65f8c882..64b366df 100644 --- a/doc/models/containers/update-product-price-point-product-id.md +++ b/doc/models/containers/update-product-price-point-product-id.md @@ -12,3 +12,27 @@ | `int` | UpdateProductPricePointProductId.fromNumber(int number) | | `String` | UpdateProductPricePointProductId.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UpdateProductPricePointProductId.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UpdateProductPricePointProductId.fromString( + "String0" + ) +``` + diff --git a/doc/models/containers/update-subscription-net-terms.md b/doc/models/containers/update-subscription-net-terms.md index c21ba651..a804f2e8 100644 --- a/doc/models/containers/update-subscription-net-terms.md +++ b/doc/models/containers/update-subscription-net-terms.md @@ -12,3 +12,27 @@ | `String` | UpdateSubscriptionNetTerms.fromString(String string) | | `int` | UpdateSubscriptionNetTerms.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +UpdateSubscriptionNetTerms.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +UpdateSubscriptionNetTerms.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md index ece3e5fc..5f8a3459 100644 --- a/doc/models/containers/update-subscription-snap-day.md +++ b/doc/models/containers/update-subscription-snap-day.md @@ -12,3 +12,27 @@ | `String` | UpdateSubscriptionSnapDay.fromString(String string) | | `int` | UpdateSubscriptionSnapDay.fromNumber(int number) | +## String + +### Initialization Code + +#### Example + +```java +UpdateSubscriptionSnapDay.fromString( + "String0" + ) +``` + +## int + +### Initialization Code + +#### Example + +```java +UpdateSubscriptionSnapDay.fromNumber( + 0 + ) +``` + diff --git a/doc/models/containers/usage-quantity.md b/doc/models/containers/usage-quantity.md index cea9f098..89207b72 100644 --- a/doc/models/containers/usage-quantity.md +++ b/doc/models/containers/usage-quantity.md @@ -12,3 +12,27 @@ | `int` | UsageQuantity.fromNumber(int number) | | `String` | UsageQuantity.fromString(String string) | +## int + +### Initialization Code + +#### Example + +```java +UsageQuantity.fromNumber( + 0 + ) +``` + +## String + +### Initialization Code + +#### Example + +```java +UsageQuantity.fromString( + "String0" + ) +``` + diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index 3bcbb915..7f2cb0ed 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -22,7 +22,7 @@ | `AccrueCharge` | `Boolean` | Optional | "If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.

`true` - Attempt to charge the customer at the next renewal.

`false` - Attempt to charge the customer right away. If it fails, the charge will be accrued until the next renewal.

Defaults to the site setting if unspecified in the request. | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | | `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. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) | +| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | 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) diff --git a/doc/models/create-invoice.md b/doc/models/create-invoice.md index 0fbe73c9..dc481c49 100644 --- a/doc/models/create-invoice.md +++ b/doc/models/create-invoice.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `LineItems` | [`List`](../../doc/models/create-invoice-item.md) | Optional | - | List getLineItems() | setLineItems(List lineItems) | -| `IssueDate` | `LocalDate` | Optional | - | LocalDate getIssueDate() | setIssueDate(LocalDate issueDate) | +| `IssueDate` | `LocalDate` | Optional | Date on which the invoice will be issued (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. If omitted, defaults to today in your site's time zone. | LocalDate getIssueDate() | setIssueDate(LocalDate issueDate) | | `NetTerms` | `Integer` | Optional | By default, invoices will be created with a due date matching the date of 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. | Integer getNetTerms() | setNetTerms(Integer netTerms) | | `PaymentInstructions` | `String` | Optional | - | String getPaymentInstructions() | setPaymentInstructions(String paymentInstructions) | | `Memo` | `String` | Optional | A custom memo can be sent to override the site's default. | String getMemo() | setMemo(String memo) | diff --git a/doc/models/create-on-off-component.md b/doc/models/create-on-off-component.md index de7559b1..02987f59 100644 --- a/doc/models/create-on-off-component.md +++ b/doc/models/create-on-off-component.md @@ -1,5 +1,5 @@ -# Create on Off Component +# Create On Off Component ## Structure diff --git a/doc/models/create-or-update-endpoint-request.md b/doc/models/create-or-update-endpoint-request.md index 22f3f83b..b0e8f542 100644 --- a/doc/models/create-or-update-endpoint-request.md +++ b/doc/models/create-or-update-endpoint-request.md @@ -20,7 +20,7 @@ Used to Create or Update Endpoint "endpoint": { "url": "url2", "webhook_subscriptions": [ - "dunning_step_reached" + "subscription_prepayment_account_balance_changed" ] } } diff --git a/doc/models/create-or-update-endpoint.md b/doc/models/create-or-update-endpoint.md index 4454d10a..686f4657 100644 --- a/doc/models/create-or-update-endpoint.md +++ b/doc/models/create-or-update-endpoint.md @@ -20,7 +20,7 @@ Used to Create or Update Endpoint { "url": "url8", "webhook_subscriptions": [ - "payment_success" + "refund_success" ] } ``` diff --git a/doc/models/create-payment-profile.md b/doc/models/create-payment-profile.md index 9259cdea..cf17c648 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 information using chargify.js. | String getChargifyToken() | setChargifyToken(String chargifyToken) | +| `ChargifyToken` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly 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) | @@ -29,8 +29,8 @@ | `VaultToken` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | String getVaultToken() | setVaultToken(String vaultToken) | | `CustomerVaultToken` | `String` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) | | `CustomerId` | `Integer` | Optional | (Required when creating a new payment profile) The Chargify customer id. | Integer getCustomerId() | setCustomerId(Integer customerId) | -| `PaypalEmail` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | String getPaypalEmail() | setPaypalEmail(String paypalEmail) | -| `PaymentMethodNonce` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | String getPaymentMethodNonce() | setPaymentMethodNonce(String paymentMethodNonce) | +| `PaypalEmail` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | String getPaypalEmail() | setPaypalEmail(String paypalEmail) | +| `PaymentMethodNonce` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | String getPaymentMethodNonce() | setPaymentMethodNonce(String paymentMethodNonce) | | `GatewayHandle` | `String` | Optional | This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | | `Cvv` | `String` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | String getCvv() | setCvv(String cvv) | | `BankName` | `String` | Optional | (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides | String getBankName() | setBankName(String bankName) | diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 5b16c350..4132f6c2 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -23,7 +23,6 @@ }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "skip_billing_manifest_taxes": false, "product_handle": "product_handle6", "product_id": 206, "product_price_point_handle": "product_price_point_handle2", diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index 95e578a4..e6450fbb 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -58,7 +58,7 @@ | `AchAgreement` | [`ACHAgreement`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | ACHAgreement getAchAgreement() | setAchAgreement(ACHAgreement achAgreement) | | `DunningCommunicationDelayEnabled` | `Boolean` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.

**Default**: `false` | Boolean getDunningCommunicationDelayEnabled() | setDunningCommunicationDelayEnabled(Boolean dunningCommunicationDelayEnabled) | | `DunningCommunicationDelayTimeZone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | String getDunningCommunicationDelayTimeZone() | setDunningCommunicationDelayTimeZone(String dunningCommunicationDelayTimeZone) | -| `SkipBillingManifestTaxes` | `Boolean` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.

**Default**: `false` | Boolean getSkipBillingManifestTaxes() | setSkipBillingManifestTaxes(Boolean skipBillingManifestTaxes) | +| `SkipBillingManifestTaxes` | `Boolean` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests. Defaults to `false` when not provided. | Boolean getSkipBillingManifestTaxes() | setSkipBillingManifestTaxes(Boolean skipBillingManifestTaxes) | ## Example (as JSON) @@ -71,7 +71,6 @@ }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "skip_billing_manifest_taxes": false, "product_handle": "product_handle6", "product_id": 212, "product_price_point_handle": "product_price_point_handle0", diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md index 51d6d3a1..8db2f310 100644 --- a/doc/models/create-usage.md +++ b/doc/models/create-usage.md @@ -12,7 +12,7 @@ | `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. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) | +| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | 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) diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index da0204a7..42ed7a8a 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -28,7 +28,7 @@ | `BillingAddress2` | `String` | Optional | The current billing street address, second line, for the card. | String getBillingAddress2() | setBillingAddress2(String billingAddress2) | | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.CREDIT_CARD` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) | | `Disabled` | `Boolean` | Optional | - | Boolean getDisabled() | setDisabled(Boolean disabled) | -| `ChargifyToken` | `String` | Optional | Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | String getChargifyToken() | setChargifyToken(String chargifyToken) | +| `ChargifyToken` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | String getChargifyToken() | setChargifyToken(String chargifyToken) | | `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) | | `GatewayHandle` | `String` | Optional | An identifier of connected gateway. | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | | `CreatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | diff --git a/doc/models/credit-note-line-item.md b/doc/models/credit-note-line-item.md index e5fe8a19..63ef7036 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -17,6 +17,7 @@ | `SubtotalAmount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | String getSubtotalAmount() | setSubtotalAmount(String subtotalAmount) | | `DiscountAmount` | `String` | Optional | The approximate discount of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | String getDiscountAmount() | setDiscountAmount(String discountAmount) | | `TaxAmount` | `String` | Optional | The approximate tax of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | String getTaxAmount() | setTaxAmount(String taxAmount) | +| `TaxIncluded` | `Boolean` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | | `TotalAmount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | String getTotalAmount() | setTotalAmount(String totalAmount) | | `TieredUnitPrice` | `Boolean` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | Boolean getTieredUnitPrice() | setTieredUnitPrice(Boolean tieredUnitPrice) | | `PeriodRangeStart` | `LocalDate` | Optional | Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. | LocalDate getPeriodRangeStart() | setPeriodRangeStart(LocalDate periodRangeStart) | @@ -27,6 +28,7 @@ | `PricePointId` | `Integer` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. | Integer getPricePointId() | setPricePointId(Integer pricePointId) | | `BillingScheduleItemId` | `Integer` | Optional | - | Integer getBillingScheduleItemId() | setBillingScheduleItemId(Integer billingScheduleItemId) | | `CustomItem` | `Boolean` | Optional | - | Boolean getCustomItem() | setCustomItem(Boolean customItem) | +| `PrepaidAllocationExpiresAt` | `LocalDate` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | LocalDate getPrepaidAllocationExpiresAt() | setPrepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 8d1b96b8..ffc813bf 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -39,6 +39,7 @@ | `SalesforceId` | `String` | Optional | The Salesforce ID for the customer | String getSalesforceId() | setSalesforceId(String salesforceId) | | `TaxExemptReason` | `String` | Optional | The Tax Exemption Reason Code for the customer | String getTaxExemptReason() | setTaxExemptReason(String taxExemptReason) | | `DefaultAutoRenewalProfileId` | `Integer` | Optional | The default auto-renewal profile ID for the customer | Integer getDefaultAutoRenewalProfileId() | setDefaultAutoRenewalProfileId(Integer defaultAutoRenewalProfileId) | +| `Maxioid` | `String` | Optional | The Maxio-generated unique identifier for the customer. | String getMaxioid() | setMaxioid(String maxioid) | ## Example (as JSON) diff --git a/doc/models/event-key.md b/doc/models/event-key.md index feb40461..a400739e 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -42,6 +42,7 @@ | `TRIAL_END_NOTICE` | | `DUNNING_STEP_REACHED` | | `INVOICE_ISSUED` | +| `INVOICE_PENDING` | | `PREPAID_SUBSCRIPTION_BALANCE_CHANGED` | | `SUBSCRIPTION_GROUP_SIGNUP_SUCCESS` | | `SUBSCRIPTION_GROUP_SIGNUP_FAILURE` | @@ -85,6 +86,8 @@ | `CHARGEBACK_WON` | | `PAYMENT_COLLECTION_METHOD_CHANGED` | | `COMPONENT_BILLING_DATE_CHANGED` | +| `CHJS_TOKENIZATION_FAILURE` | +| `CHJS_TOKENIZATION_SUCCESS` | | `SUBSCRIPTION_TERM_RENEWAL_SCHEDULED` | | `SUBSCRIPTION_TERM_RENEWAL_PENDING` | | `SUBSCRIPTION_TERM_RENEWAL_ACTIVATED` | diff --git a/doc/models/event-response.md b/doc/models/event-response.md index 1a31a8c0..13f19a70 100644 --- a/doc/models/event-response.md +++ b/doc/models/event-response.md @@ -17,7 +17,7 @@ { "event": { "id": 242, - "key": "subscription_state_change", + "key": "maxio_payments_direct_debit_payment_rejected", "message": "message0", "subscription_id": 96, "customer_id": 24, diff --git a/doc/models/event.md b/doc/models/event.md index 394ae3d5..876929d7 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -22,7 +22,7 @@ ```json { "id": 40, - "key": "invoice_issued", + "key": "subscription_group_signup_success", "message": "message8", "subscription_id": 150, "customer_id": 78, diff --git a/doc/models/invoice-line-item.md b/doc/models/invoice-line-item.md index 578bbee6..95d220d7 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -17,6 +17,7 @@ | `SubtotalAmount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | String getSubtotalAmount() | setSubtotalAmount(String subtotalAmount) | | `DiscountAmount` | `String` | Optional | The approximate discount applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | String getDiscountAmount() | setDiscountAmount(String discountAmount) | | `TaxAmount` | `String` | Optional | The approximate tax applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | String getTaxAmount() | setTaxAmount(String taxAmount) | +| `TaxIncluded` | `Boolean` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | | `TotalAmount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | String getTotalAmount() | setTotalAmount(String totalAmount) | | `TieredUnitPrice` | `Boolean` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | Boolean getTieredUnitPrice() | setTieredUnitPrice(Boolean tieredUnitPrice) | | `PeriodRangeStart` | `LocalDate` | Optional | Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
* For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
* For non-periodic charges, this date and the end date will match. | LocalDate getPeriodRangeStart() | setPeriodRangeStart(LocalDate periodRangeStart) | @@ -32,6 +33,7 @@ | `ProductPricePointId` | `Integer` | Optional | The price point ID of the line item's product | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | | `CustomItem` | `Boolean` | Optional | - | Boolean getCustomItem() | setCustomItem(Boolean customItem) | | `Kind` | `String` | Optional | - | String getKind() | setKind(String kind) | +| `PrepaidAllocationExpiresAt` | `LocalDate` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | LocalDate getPrepaidAllocationExpiresAt() | setPrepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) | ## Example (as JSON) diff --git a/doc/models/list-mrr-per-subscription-input.md b/doc/models/list-mrr-per-subscription-input.md index d0293cd5..be23e738 100644 --- a/doc/models/list-mrr-per-subscription-input.md +++ b/doc/models/list-mrr-per-subscription-input.md @@ -1,5 +1,5 @@ -# List Mrr Per Subscription Input +# List Mrr per Subscription Input Input structure for the method ListMrrPerSubscription diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md index 2aaca4be..d4ea04e0 100644 --- a/doc/models/payment-profile-attributes.md +++ b/doc/models/payment-profile-attributes.md @@ -11,7 +11,7 @@ alias to credit_card_attributes | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `ChargifyToken` | `String` | Optional | (Optional) Token received after sending billing information using chargify.js. This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | String getChargifyToken() | setChargifyToken(String chargifyToken) | +| `ChargifyToken` | `String` | Optional | (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | 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 | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | String getFirstName() | setFirstName(String firstName) | diff --git a/doc/models/payment-profile-params.md b/doc/models/payment-profile-params.md new file mode 100644 index 00000000..9e00621e --- /dev/null +++ b/doc/models/payment-profile-params.md @@ -0,0 +1,27 @@ + +# Payment Profile Params + +PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. + +## Structure + +`PaymentProfileParams` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `FirstName` | `String` | Optional | - | String getFirstName() | setFirstName(String firstName) | +| `LastName` | `String` | Optional | - | String getLastName() | setLastName(String lastName) | +| `CardType` | `String` | Optional | - | String getCardType() | setCardType(String cardType) | + +## Example (as JSON) + +```json +{ + "first_name": "first_name2", + "last_name": "last_name0", + "card_type": "card_type8" +} +``` + diff --git a/doc/models/site.md b/doc/models/site.md index 8b6b5e61..3bf1817a 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -25,6 +25,9 @@ | `OrganizationAddress` | [`OrganizationAddress`](../../doc/models/organization-address.md) | Optional | - | OrganizationAddress getOrganizationAddress() | setOrganizationAddress(OrganizationAddress organizationAddress) | | `TaxConfiguration` | [`TaxConfiguration`](../../doc/models/tax-configuration.md) | Optional | - | TaxConfiguration getTaxConfiguration() | setTaxConfiguration(TaxConfiguration taxConfiguration) | | `NetTerms` | [`NetTerms`](../../doc/models/net-terms.md) | Optional | - | NetTerms getNetTerms() | setNetTerms(NetTerms netTerms) | +| `MultiFrequencyEnabled` | `Boolean` | Optional | Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. | Boolean getMultiFrequencyEnabled() | setMultiFrequencyEnabled(Boolean multiFrequencyEnabled) | +| `AutoRenewalsEnabled` | `Boolean` | Optional | Whether the auto-renewals feature is enabled for this site. | Boolean getAutoRenewalsEnabled() | setAutoRenewalsEnabled(Boolean autoRenewalsEnabled) | +| `PortalEnabled` | `Boolean` | Optional | Whether the Billing Portal is enabled for this site. | Boolean getPortalEnabled() | setPortalEnabled(Boolean portalEnabled) | | `Test` | `Boolean` | Optional | - | Boolean getTest() | setTest(Boolean test) | ## Example (as JSON) diff --git a/doc/models/tokenized-payment-profile.md b/doc/models/tokenized-payment-profile.md new file mode 100644 index 00000000..a7732130 --- /dev/null +++ b/doc/models/tokenized-payment-profile.md @@ -0,0 +1,27 @@ + +# Tokenized Payment Profile + +## Structure + +`TokenizedPaymentProfile` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `int` | Required | - | int getId() | setId(int id) | +| `VaultToken` | `String` | Optional | - | String getVaultToken() | setVaultToken(String vaultToken) | +| `GatewayHandle` | `String` | Optional | - | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | +| `CustomerVaultToken` | `String` | Optional | - | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) | + +## Example (as JSON) + +```json +{ + "id": 72, + "vault_token": "vault_token2", + "gateway_handle": "gateway_handle8", + "customer_vault_token": "customer_vault_token8" +} +``` + diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index ced689e1..85990e59 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -11,12 +11,15 @@ | --- | | `BILLING_DATE_CHANGE` | | `COMPONENT_ALLOCATION_CHANGE` | +| `CHJS_TOKENIZATION_FAILURE` | +| `CHJS_TOKENIZATION_SUCCESS` | | `CUSTOMER_CREATE` | | `CUSTOMER_UPDATE` | | `DUNNING_STEP_REACHED` | | `EXPIRING_CARD` | | `EXPIRATION_DATE_CHANGE` | | `INVOICE_ISSUED` | +| `INVOICE_PENDING` | | `METERED_USAGE` | | `PAYMENT_FAILURE` | | `PAYMENT_SUCCESS` | diff --git a/pom.xml b/pom.xml index 6559ebf5..e4bd772a 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 com.maxio advanced-billing-sdk - 9.0.0 + 9.1.0 jar Advanced Billing SDK Ultimate billing and pricing flexibility for B2B SaaS. diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java index 7629d125..429718bb 100644 --- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java +++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java @@ -101,7 +101,7 @@ public final class AdvancedBillingClient implements Configuration { private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - private static String userAgent = "AB SDK Java:9.0.0 on OS {os-info}"; + private static String userAgent = "AB SDK Java:9.1.0 on OS {os-info}"; /** * Current API environment. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java index 2c1a40d0..3fe3db07 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java @@ -39,8 +39,8 @@ public APIExportsController(GlobalConfiguration globalConfig) { } /** - * This API returns an array of exported proforma invoices for a provided `batch_id`. Pay close - * attention to pagination in order to control responses from the server. Example: `GET + * Lists exported proforma invoices for a provided `batch_id`. Use pagination to control + * responses returned from the server. Example: `GET * https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. * @param input ListExportedProformaInvoicesInput object containing request parameters * @return Returns the List of ProformaInvoice response from the API call @@ -86,8 +86,8 @@ private ApiCall, ApiException> prepareListExportedProforma } /** - * This API returns an array of exported invoices for a provided `batch_id`. Pay close attention - * to pagination in order to control responses from the server. Example: `GET + * Lists exported invoices for a provided `batch_id`. Use pagination to control responses + * returned from the server. Example: `GET * https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. * @param input ListExportedInvoicesInput object containing request parameters * @return Returns the List of Invoice response from the API call @@ -133,8 +133,8 @@ private ApiCall, ApiException> prepareListExportedInvoicesRequest( } /** - * This API returns an array of exported subscriptions for a provided `batch_id`. Pay close - * attention to pagination in order to control responses from the server. Example: `GET + * Lists exported subscriptions for a provided `batch_id`. Use pagination to control responses + * returned from the server. Example: `GET * https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. * @param input ListExportedSubscriptionsInput object containing request parameters * @return Returns the List of Subscription response from the API call @@ -180,8 +180,8 @@ private ApiCall, ApiException> prepareListExportedSubscriptio } /** - * This API creates a proforma invoices export and returns a batchjob object. It is only - * available for Relationship Invoicing architecture. + * Creates a proforma invoices export and returns a batch job object. It is only available for + * Relationship Invoicing architecture. * @return Returns the BatchJobResponse 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. @@ -219,7 +219,7 @@ private ApiCall prepareExportProformaInvoicesReq } /** - * This API creates an invoices export and returns a batchjob object. + * Creates an invoices export and returns a batch job object. * @return Returns the BatchJobResponse 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. @@ -257,7 +257,7 @@ private ApiCall prepareExportInvoicesRequest() { } /** - * This API creates a subscriptions export and returns a batchjob object. + * Creates a subscriptions export and returns a batch job object. * @return Returns the BatchJobResponse 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. @@ -292,7 +292,7 @@ private ApiCall prepareExportSubscriptionsReques } /** - * This API returns a batchjob object for proforma invoices export. + * Returns a batch job object for a proforma invoices export. * @param batchId Required parameter: Id of a Batch Job. * @return Returns the BatchJobResponse response from the API call * @throws ApiException Represents error response from the server. @@ -332,7 +332,7 @@ private ApiCall prepareReadProformaInvoicesExpor } /** - * This API returns a batchjob object for invoices export. + * Returns a batch job object for an invoices export. * @param batchId Required parameter: Id of a Batch Job. * @return Returns the BatchJobResponse response from the API call * @throws ApiException Represents error response from the server. @@ -372,7 +372,7 @@ private ApiCall prepareReadInvoicesExportRequest } /** - * This API returns a batchjob object for subscriptions export. + * Returns a batch job object for a subscriptions export. * @param batchId Required parameter: Id of a Batch Job. * @return Returns the BatchJobResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java index 36f9fb91..8efeb272 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java @@ -36,7 +36,7 @@ public AdvanceInvoiceController(GlobalConfiguration globalConfig) { /** * 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 + * for more information on advance invoices, including eligibility for 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 @@ -94,9 +94,8 @@ private ApiCall prepareIssueAdvanceInvoiceRequest( } /** - * Once an advance invoice has been generated for a subscription's upcoming renewal, it can be - * viewed through this endpoint. There can only be one advance invoice per subscription per - * billing cycle. + * Returns the advance invoice generated for a subscription's upcoming renewal. There can only + * be one advance invoice per subscription per billing cycle. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the Invoice response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java index a743c61e..86386366 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java @@ -37,10 +37,11 @@ public BillingPortalController(GlobalConfiguration globalConfig) { } /** - * ## Billing Portal Documentation Full documentation on how the Billing Portal operates within - * the Advanced Billing UI can be located + * Enables Billing Portal access for a customer, with an option to send an invitation email at + * the same time. ## Billing Portal Documentation Full documentation on how the Billing Portal + * operates within the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). - * This documentation is focused on how the to configure the Billing Portal Settings, as well as + * This documentation is focused on how to configure the Billing Portal Settings, as well as * Subscriber Interaction and Merchant Management of the Billing Portal. You can use this * endpoint to enable Billing Portal access for a Customer, with the option of sending the * Customer an Invitation email at the same time. ## Billing Portal Security If your customer @@ -100,14 +101,13 @@ private ApiCall prepareEnableBillingPortalForCus } /** - * This method will provide to the API user the exact URL required for a subscriber to access - * the Billing Portal. ## Rules for Management Link API + When retrieving a management URL, - * multiple requests for the same customer in a short period will return the **same** URL + We - * will not generate a new URL for 15 days + You must cache and remember this URL if you are - * going to need it again within 15 days + Only request a new URL after the - * `new_link_available_at` date + You are limited to 15 requests for the same URL. If you make - * more than 15 requests before `new_link_available_at`, you will be blocked from further - * Management URL requests (with a response code `429`). + * Returns the exact URL required for a subscriber to access the Billing Portal. ## Rules for + * Management Link API + When retrieving a management URL, multiple requests for the same + * customer in a short period will return the **same** URL + We will not generate a new URL for + * 15 days + You must cache and remember this URL if you are going to need it again within 15 + * days + Only request a new URL after the `new_link_available_at` date + You are limited to 15 + * requests for the same URL. If you make more than 15 requests before `new_link_available_at`, + * you will be blocked from further Management URL requests (with a response code `429`). * @param customerId Required parameter: The Chargify id of the customer * @return Returns the PortalManagementLink response from the API call * @throws ApiException Represents error response from the server. @@ -150,14 +150,12 @@ private ApiCall prepareReadBillingPortalLink } /** - * You can resend a customer's Billing Portal invitation. If you attempt to resend an invitation - * 5 times within 30 minutes, you will receive a `422` response with `error` message in the + * Resends a customer's Billing Portal invitation. If you attempt to resend an invitation 5 + * times within 30 minutes, you will receive a `422` response with an `error` message in the * body. If you attempt to resend an invitation when the Billing Portal is already disabled for * a Customer, you will receive a `422` error response. If you attempt to resend an invitation - * when the Billing Portal is already disabled for a Customer, you will receive a `422` error - * response. If you attempt to resend an invitation when the Customer does not exist a Customer, - * you will receive a `404` error response. ## Limitations This endpoint will only return a JSON - * response. + * when the Customer does not exist, you will receive a `404` error response. ## Limitations + * This endpoint will only return a JSON response. * @param customerId Required parameter: The Chargify id of the customer * @return Returns the ResentInvitation response from the API call * @throws ApiException Represents error response from the server. @@ -200,9 +198,9 @@ private ApiCall prepareResendBillingPortalInvita } /** - * You can revoke a customer's Billing Portal invitation. If you attempt to revoke an invitation - * when the Billing Portal is already disabled for a Customer, you will receive a 422 error - * response. ## Limitations This endpoint will only return a JSON response. + * Revokes a customer's Billing Portal invitation. If you attempt to revoke an invitation when + * the Billing Portal is already disabled for a Customer, you will receive a 422 error response. + * ## Limitations This endpoint will only return a JSON response. * @param customerId Required parameter: The Chargify id of the customer * @return Returns the RevokedInvitation response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java index bd58ed3b..48d01ef3 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java @@ -151,13 +151,13 @@ private ApiCall prepareCreateComponen } /** - * Use this endpoint to read current price points that are associated with a component. You may - * specify the component by using either the numeric id or the `handle:gold` syntax. When - * fetching a component's price points, if you have defined multiple currencies at the site - * level, you can optionally pass the `?currency_prices=true` query param to include an array of - * currency price data in the response. If the price point 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. + * Lists the price points associated with a component. You may specify the component by using + * either the numeric id or the `handle:gold` syntax. When fetching a component's price points, + * if you have defined multiple currencies at the site level, you can optionally pass the + * `?currency_prices=true` query param to include an array of currency price data in the + * response. If the price point 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. * @param input ListComponentPricePointsInput object containing request parameters * @return Returns the ComponentPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. @@ -202,7 +202,7 @@ private ApiCall prepareListComponent } /** - * Use this endpoint to create multiple component price points in one request. + * Creates multiple component price points in one request. * @param componentId Required parameter: The Advanced Billing id of the component for which * you want to fetch price points. * @param body Optional parameter: @@ -314,11 +314,11 @@ private ApiCall prepar } /** - * 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. + * Updates a component price point and its associated prices. 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 * handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or * `handle:example-product-handle` for a string handle. @@ -374,8 +374,8 @@ private ApiCall prepareUpdateComponen } /** - * Use this endpoint to retrieve details for a specific component price point. You can achieve - * this by using either the component price point ID or handle. + * Returns details for a specific component price point. You can achieve this by using either + * the component price point ID or handle. * @param componentId Required parameter: The id or handle of the component. 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. @@ -427,8 +427,8 @@ private ApiCall prepar } /** - * A price point can be archived at any time. Subscriptions using a price point that has been - * archived will continue using it until they're moved to another price point. + * Archives a component price point. Subscriptions using a price point that has been archived + * will continue using it until they're moved to another price point. * @param componentId Required parameter: The id or handle of the component. 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. @@ -477,7 +477,7 @@ private ApiCall prepareArchiveCompone } /** - * Use this endpoint to unarchive a component price point. + * Unarchives a component price point. * @param componentId Required parameter: The Advanced Billing id of the component to which * the price point belongs * @param pricePointId Required parameter: The Advanced Billing id of the price point @@ -520,11 +520,10 @@ private ApiCall prepareUnarchiveCompo } /** - * 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. For each price level defined on the component price point, - * there should be a matching price level created in the given currency. Note: Currency Prices - * are not able to be created for custom price points. + * Creates currency prices for a given currency defined at the site level. When creating + * currency prices, they need to mirror the structure of your primary pricing. For each price + * level defined on the component price point, there should be a matching price level created in + * the given currency. Note: Currency Prices are not able to be created for custom price points. * @param pricePointId Required parameter: The Advanced Billing id of the price point * @param body Optional parameter: * @return Returns the ComponentCurrencyPricesResponse response from the API call @@ -571,9 +570,8 @@ private ApiCall prepareCreateCurr } /** - * This endpoint allows you to update currency prices for a given currency that has been defined - * on the site level in your settings. Note: Currency Prices are not able to be updated for - * custom price points. + * Updates currency prices for a given currency defined at the site level. Note: Currency Prices + * are not able to be updated for custom price points. * @param pricePointId Required parameter: The Advanced Billing id of the price point * @param body Optional parameter: * @return Returns the ComponentCurrencyPricesResponse response from the API call @@ -620,7 +618,7 @@ private ApiCall prepareUpdateCurr } /** - * This method allows to retrieve a list of Components Price Points belonging to a Site. + * Lists all component price points belonging to a site. * @param input ListAllComponentPricePointsInput object containing request parameters * @return Returns the ListComponentsPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java index f5045f3b..52bbbf33 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java @@ -42,15 +42,15 @@ public ComponentsController(GlobalConfiguration globalConfig) { } /** - * This request will create a component definition of kind **metered_component** under the - * specified product family. Metered component can then be added and “allocated” for a - * subscription. Metered components are used to bill for any type of unit that resets to 0 at - * the end of the billing period (think daily Google Adwords clicks or monthly cell phone - * minutes). This is most commonly associated with usage-based billing and many other pricing - * 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, see our documentation + * Creates a metered component definition under the specified product family. A metered + * component can then be added and “allocated” for a subscription. Metered components are used + * to bill for any type of unit that resets to 0 at the end of the billing period (think daily + * Google Ads clicks or monthly cell phone minutes). This is most commonly associated with + * usage-based billing and many other pricing 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, + * 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:` @@ -102,17 +102,17 @@ private ApiCall prepareCreateMeteredComponentRe } /** - * This request will create a component definition of kind **quantity_based_component** under - * the specified product family. Quantity Based component can then be added and “allocated” for - * a subscription. When defining Quantity Based component, You can choose one of 2 types: #### - * Recurring Recurring quantity-based components are used to bill for the number of some unit - * (think monthly software user licenses or the number of pairs of socks in a box-a-month club). - * This is most commonly associated with billing for user licenses, number of users, number of - * employees, etc. #### One-time One-time quantity-based components are used to create ad hoc - * 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, see our documentation + * Creates a Quantity Based component definition under the specified product family. A Quantity + * Based component can then be added and “allocated” for a subscription. When defining a + * Quantity Based component, you can choose one of 2 types: #### Recurring Recurring + * quantity-based components are used to bill for the number of some unit (think monthly + * software user licenses or the number of pairs of socks in a box-a-month club). This is most + * commonly associated with billing for user licenses, number of users, number of employees, + * etc. #### One-time One-time quantity-based components are used to create ad hoc 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, 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:` @@ -164,11 +164,10 @@ 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, see our - * documentation + * Creates an On/Off component definition under the specified product family. An 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, 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:` @@ -220,14 +219,13 @@ private ApiCall prepareCreateOnOffComponentRequ } /** - * This request will create a component definition of kind **prepaid_usage_component** under the - * specified product family. Prepaid component can then be added and “allocated” for a - * subscription. 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, see our - * documentation + * Creates a prepaid usage component definition under the specified product family. A prepaid + * component can then be added and “allocated” for a subscription. 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, 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:` @@ -279,15 +277,15 @@ private ApiCall prepareCreatePrepaidUsageCompon } /** - * This request will create a component definition of kind **event_based_component** under the - * specified product family. Event-based component can then be added and “allocated” for a - * subscription. Event-based components are similar to other component types, in that you define - * the component parameters (such as name and taxability) and the pricing. A key difference for - * the event-based component is that it must be attached to a metric. This is because the metric - * 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, see our documentation + * Creates an event-based component definition under the specified product family. An + * event-based component can then be added and “allocated” for a subscription. Event-based + * components are similar to other component types, in that you define the component parameters + * (such as name and taxability) and the pricing. A key difference for the event-based component + * is that it must be attached to a metric. This is because the metric 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, 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:` @@ -339,9 +337,8 @@ private ApiCall prepareCreateEventBasedComponen } /** - * This request will return information regarding a component having the handle you provide. You - * can identify your components with a handle so you don't have to save or reference the IDs we - * generate. + * Returns information for a component matching the provided handle. You can identify your + * components with a handle so you don't have to save or reference the IDs we generate. * @param handle Required parameter: The handle of the component to find * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -424,9 +421,8 @@ private ApiCall prepareReadComponentRequest( } /** - * This request will update a component from a specific product family. You may read the - * component by either the component's id or handle. When using the handle, it must be prefixed - * with `handle:`. + * Updates a component from a specific product family. You may read the component by either the + * component's id or handle. When using the handle, it must be prefixed with `handle:`. * @param productFamilyId Required parameter: The Advanced Billing id of the product family to * which the component belongs * @param componentId Required parameter: Either the Advanced Billing id of the component or @@ -481,8 +477,7 @@ private ApiCall prepareUpdateProductFamilyCompo } /** - * Sending a DELETE request to this endpoint will archive the component. All current subscribers - * will be unffected; their subscription/purchase will continue to be charged as usual. + * Archives the component; all current subscribers will continue to be charged as usual. * @param productFamilyId Required parameter: The Advanced Billing id of the product family to * which the component belongs * @param componentId Required parameter: Either the Advanced Billing id of the component or @@ -529,7 +524,7 @@ private ApiCall prepareArchiveComponentRequest( } /** - * This request will return a list of components for a site. + * Lists components for a site. * @param input ListComponentsInput object containing request parameters * @return Returns the List of ComponentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -583,8 +578,8 @@ private ApiCall, ApiException> prepareListComponentsRequ } /** - * This request will update a component. You may read the component by either the component's id - * or handle. When using the handle, it must be prefixed with `handle:`. + * Updates a component. You may read the component by either the component's id or handle. When + * using the handle, it must be prefixed with `handle:`. * @param componentId Required parameter: The id or handle of the component * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call @@ -631,7 +626,7 @@ private ApiCall prepareUpdateComponentRequest( } /** - * This request will return a list of components for a particular product family. + * Lists components for a particular product family. * @param input ListComponentsForProductFamilyInput object containing request parameters * @return Returns the List of ComponentResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java index aa49ad98..981dc565 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java @@ -44,17 +44,16 @@ public CouponsController(GlobalConfiguration globalConfig) { } /** - * ## Coupons Documentation Coupons can be administered in the Advanced Billing application or - * created via API. View our section on [creating + * Creates a coupon under the specified product family. You can create either a flat amount + * coupon by specifying amount_in_cents, or a percentage coupon by specifying percentage You can + * restrict a coupon to only apply to specific products / components by optionally passing in + * `restricted_products` and/or `restricted_components` objects in the format: `{ + * "<product_id/component_id>": boolean_value }` Coupons can be administered in the Advanced + * Billing application or created via API. See [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, 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 - * by specyfing `percentage`. You can restrict a coupon to only apply to specific products / - * components by optionally passing in `restricted_products` and/or `restricted_components` - * objects in the format: `{ "<product_id/component_id>": boolean_value }`. + * for more information. See [Apply Coupons to + * Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) + * for information on applying a coupon to a subscription in the Advanced Billing UI. * @param productFamilyId Required parameter: The Advanced Billing id of the product family to * which the coupon belongs * @param body Optional parameter: @@ -102,7 +101,7 @@ private ApiCall prepareCreateCouponRequest( } /** - * List coupons for a specific Product Family in a Site. + * Lists 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. @@ -148,11 +147,11 @@ private ApiCall, ApiException> prepareListCouponsForProduct } /** - * You can search for a coupon via the API with the find method. By passing a code parameter, - * the find will attempt to locate a coupon that matches that code. If no coupon is found, a 404 - * is returned. If you have more than one product family and if the coupon you are trying to - * find does not belong to the default product family in your site, then you will need to - * specify (either in the url or as a query string param) the product family id. + * Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code + * parameter, the find will attempt to locate a coupon that matches that code. If you have more + * than one product family and if the coupon you are trying to find does not belong to the + * default product family in your site, then you will need to specify (either in the url or as a + * query string param) the product family id. * @param productFamilyId Optional parameter: The Advanced Billing id of the product family to * which the coupon belongs * @param code Optional parameter: The code of the coupon @@ -203,10 +202,10 @@ private ApiCall prepareFindCouponRequest( } /** - * You can retrieve the Coupon via the API with the Show method. You must identify the Coupon in - * this call by the ID parameter that Advanced Billing assigns. If instead you would like to - * find a Coupon using a Coupon code, see the Coupon Find method. When fetching a coupon, if you - * have defined multiple currencies at the site level, you can optionally pass the + * Returns a coupon by its Advanced Billing-assigned ID. You must identify the Coupon in this + * call by the ID parameter that Advanced Billing assigns. If instead you would like to find a + * Coupon using a Coupon code, see the Coupon Find method. When fetching a coupon, if you have + * defined multiple currencies at the site level, you can optionally pass the * `?currency_prices=true` query param to include an array of currency price data in the * response. 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 @@ -261,10 +260,9 @@ private ApiCall prepareReadCouponRequest( } /** - * ## Update Coupon You can update a Coupon via the API with a PUT request to the resource - * endpoint. You can restrict a coupon to only apply to specific products / components by - * optionally passing in hashes of `restricted_products` and/or `restricted_components` in the - * format: `{ "<product/component_id>": boolean_value }`. + * Updates a coupon. You can restrict a coupon to only apply to specific products / components + * by optionally passing in hashes of `restricted_products` and/or `restricted_components` in + * the format: `{ "<product/component_id>": boolean_value }`. * @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 @@ -317,9 +315,10 @@ private ApiCall prepareUpdateCouponRequest( } /** - * You can archive a Coupon via the API with the archive method. Archiving makes that Coupon - * unavailable for future use, but allows it to remain attached and functional on existing - * Subscriptions that are using it. The `archived_at` date and time will be assigned. + * Archives a coupon, making it unavailable for future use while remaining active on existing + * subscriptions. Archiving makes that Coupon unavailable for future use, but allows it to + * remain attached and functional on existing Subscriptions that are using it. The `archived_at` + * date and time will be assigned. * @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 @@ -362,7 +361,7 @@ private ApiCall prepareArchiveCouponRequest( } /** - * You can retrieve a list of coupons. + * Lists coupons for a site. * @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. @@ -406,8 +405,7 @@ private ApiCall, ApiException> prepareListCouponsRequest( } /** - * This request will provide details about the coupon usage as an array of data hashes, one per - * product. + * Lists coupon usage details, one entry 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. @@ -451,16 +449,16 @@ private ApiCall, ApiException> prepareReadCouponUsageRequest( } /** - * You can verify if a specific coupon code is valid using the `validate` method. This method is - * useful for validating coupon codes that are entered by a customer. If the coupon is found and - * is valid, the coupon will be returned with a 200 status code. If the coupon is invalid, the - * status code will be 404 and the response will say why it is invalid. If the coupon is valid, - * the status code will be 200 and the coupon will be returned. The following reasons for - * invalidity are supported: + Coupon not found + Coupon is invalid + Coupon expired If you have - * more than one product family and if the coupon you are validating does not belong to the - * first product family in your site, then you will need to specify the product family, either - * in the url or as a query string param. This can be done by supplying the id or the handle in - * the `handle:my-family` format. Eg. ``` + * Verifies whether a specific coupon code is valid. This method is useful for validating coupon + * codes that are entered by a customer. If the coupon is found and is valid, the coupon will be + * returned with a 200 status code. If the coupon is invalid, the status code will be 404 and + * the response will say why it is invalid. If the coupon is valid, the status code will be 200 + * and the coupon will be returned. The following reasons for invalidity are supported: + Coupon + * not found + Coupon is invalid + Coupon expired If you have more than one product family and + * if the coupon you are validating does not belong to the first product family in your site, + * then you will need to specify the product family, either in the url or as a query string + * param. This can be done by supplying the id or the handle in the `handle:my-family` format. + * Eg. ``` * https://<subdomain>.chargify.com/product_families/handle:<product_family_handle>/coupons/validate.<format>?code=<coupon_code> * ``` Or: ``` * https://<subdomain>.chargify.com/coupons/validate.<format>?code=<coupon_code>&product_family_id=<id> @@ -510,12 +508,11 @@ private ApiCall prepareValidateCouponRequest( } /** - * This endpoint allows you to create and/or update currency prices for an existing coupon. - * Multiple prices can be created or updated in a single request but each of the currencies must - * be defined on the site level already and the coupon must be an amount-based coupon, not - * percentage. Currency pricing for coupons must mirror the setup of the primary coupon pricing - * - if the primary coupon is percentage based, you will not be able to define pricing in - * non-primary currencies. + * Creates and/or updates currency prices for an existing coupon. Multiple prices can be created + * or updated in a single request but each of the currencies must be defined on the site level + * already and the coupon must be an amount-based coupon, not percentage. Currency pricing for + * coupons must mirror the setup of the primary coupon pricing - if the primary coupon is + * percentage based, you will not be able to define pricing in non-primary currencies. * @param couponId Required parameter: The Advanced Billing id of the coupon * @param body Optional parameter: * @return Returns the CouponCurrencyResponse response from the API call @@ -562,14 +559,15 @@ private ApiCall prepareCreateOrUpdateCoupo } /** - * ## Coupon Subcodes Intro Coupon Subcodes allow you to create a set of unique codes that allow - * you to expand the use of one coupon. For example: Master Coupon Code: + SPRING2020 Coupon - * Subcodes: + SPRING90210 + DP80302 + SPRINGBALTIMORE Coupon subcodes can be administered in - * the Admin Interface or via the API. When creating a coupon subcode, you must specify a coupon - * to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain - * only letters and numbers, and do not have any spaces. Lowercase letters will be capitalized - * before the subcode is created. ## Coupon Subcodes Documentation Full documentation on how to - * create coupon subcodes in the Advanced Billing UI can be located + * Creates subcodes for an existing coupon. ## Coupon Subcodes Intro Coupon Subcodes allow you + * to create a set of unique codes that allow you to expand the use of one coupon. For example: + * Master Coupon Code: + SPRING2020 Coupon Subcodes: + SPRING90210 + DP80302 + SPRINGBALTIMORE + * Coupon subcodes can be administered in the Admin Interface or via the API. When creating a + * coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon + * subcodes are all capital letters, contain only letters and numbers, and do not have any + * spaces. Lowercase letters will be capitalized before the subcode is created. ## Coupon + * Subcodes Documentation 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, see our documentation @@ -623,7 +621,7 @@ private ApiCall prepareCreateCouponSubcode } /** - * This request allows you to request the subcodes that are attached to a coupon. + * Lists the subcodes attached to a coupon. * @param input ListCouponSubcodesInput object containing request parameters * @return Returns the CouponSubcodes response from the API call * @throws ApiException Represents error response from the server. @@ -664,11 +662,11 @@ private ApiCall prepareListCouponSubcodesRequest( } /** - * You can update the subcodes for the given Coupon via the API with a PUT request to the - * resource endpoint. Send an array of new coupon subcodes. **Note**: All current subcodes for - * that Coupon will be deleted first, and replaced with the list of subcodes sent to this - * endpoint. The response will contain: + The created subcodes, + Subcodes that were not created - * because they already exist, + Any subcodes not created because they are invalid. + * Updates the subcodes for a coupon, replacing all existing subcodes with the new list. Send an + * array of new coupon subcodes. **Note**: All current subcodes for that Coupon will be deleted + * first, and replaced with the list of subcodes sent to this endpoint. The response will + * contain: + The created subcodes, + Subcodes that were not created because they already exist, + * + Any subcodes not created because they are invalid. * @param couponId Required parameter: The Advanced Billing id of the coupon * @param body Optional parameter: * @return Returns the CouponSubcodesResponse response from the API call @@ -712,8 +710,8 @@ private ApiCall prepareUpdateCouponSubcode } /** - * ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to - * `DELETE` this coupon subcode would be: ``` + * Deletes a specific subcode from a coupon. ## Example Given a coupon with an ID of 567, and a + * coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: ``` * http://subdomain.chargify.com/coupons/567/codes/20OFF.<format> ``` Note: If you are using any * of the allowed special characters (“%”, “{@literal @}”, “+”, “-”, “_”, and “.”), you must encode them * for use in the URL. | Special character | Encoding | |-------------------|----------| | % | diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java index b072cc8c..51dd1413 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java @@ -372,8 +372,8 @@ private ApiCall prepareListMetadataRequest( * 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. + * resource. This means you can have 100 metafields for the Subscription resource and another + * 100 for the Customer resource. * @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 diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java index a99a62bf..01d24b17 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java @@ -37,14 +37,14 @@ public CustomersController(GlobalConfiguration globalConfig) { } /** - * You may create a new Customer at any time, or you may create a Customer at the same time you - * create a Subscription. The only validation restriction is that you may only create one - * customer for a given reference value. If provided, the `reference` value must be unique. It - * represents a unique identifier for the customer from your own app, i.e. the customer’s ID. - * This allows you to retrieve a given customer via a piece of shared information. - * Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique - * ID for the customer, which is in the `id` attribute. Full documentation on how to locate, - * create and edit Customers in the Advanced Billing UI can be located + * Creates a new customer; can also be created alongside a new subscription. The only validation + * restriction is that you may only create one customer for a given reference value. If + * provided, the `reference` value must be unique. It represents a unique identifier for the + * customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given + * customer via a piece of shared information. Alternatively, you may choose to leave + * `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the + * `id` attribute. Full documentation on how to locate, create and edit Customers in the + * Advanced Billing UI can be located * [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 @@ -100,12 +100,12 @@ private ApiCall prepareCreateCustomerRequest( } /** - * This request will by default list all customers associated with your Site. ## Find Customer - * 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, use the - * [lookup + * Lists all customers associated with your site, or filters results using the search parameter. + * ## Find Customer 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, + * use the [lookup * endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference). * @param input ListCustomersInput object containing request parameters * @return Returns the List of CustomerResponse response from the API call @@ -197,7 +197,7 @@ private ApiCall prepareReadCustomerRequest( } /** - * This method allows to update the Customer. + * Updates the customer. * @param id Required parameter: The Advanced Billing id of the customer * @param body Optional parameter: * @return Returns the CustomerResponse response from the API call @@ -247,7 +247,7 @@ private ApiCall prepareUpdateCustomerRequest( } /** - * This method allows you to delete the Customer. + * Deletes the customer. * @param id Required parameter: The Advanced Billing id of the customer * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -280,8 +280,7 @@ private ApiCall prepareDeleteCustomerRequest( } /** - * Use this method to return the customer object if you have the unique **Reference ID (Your - * App)** value handy. It will return a single match. + * Returns a customer by their unique reference ID. It will return a single match. * @param reference Required parameter: Customer reference * @return Returns the CustomerResponse response from the API call * @throws ApiException Represents error response from the server. @@ -318,7 +317,7 @@ private ApiCall prepareReadCustomerByReferenceRe } /** - * This method lists all subscriptions that belong to a customer. + * Lists all subscriptions that belong to a customer. * @param customerId Required parameter: The Chargify id of the customer * @return Returns the List of SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java index 77810854..ea427e59 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java @@ -40,8 +40,8 @@ public EventsBasedBillingSegmentsController(GlobalConfiguration globalConfig) { } /** - * This endpoint creates a new Segment for a Component with segmented Metric. It allows you to - * specify properties to bill upon and prices for each Segment. You can only pass as many + * Creates a new segment for a component with a segmented metric. It allows you to specify + * properties to bill upon and prices for each Segment. You can only pass as many * "property_values" as the related Metric has segmenting properties defined. You may specify * component and/or price point by using either the numeric ID or the `handle:gold` syntax. * @param componentId Required parameter: ID or Handle for the Component @@ -99,11 +99,10 @@ private ApiCall prepareCreateSegmentRequest( } /** - * This endpoint allows you to fetch Segments created for a given Price Point. They will be - * returned in the order of creation. You can pass `page` and `per_page` parameters in order to - * access all of the segments. By default it will return `30` records. You can set `per_page` to - * `200` at most. You may specify component and/or price point by using either the numeric ID or - * the `handle:gold` syntax. + * Lists segments created for a given price point, in order of creation. You can pass `page` and + * `per_page` parameters in order to access all of the segments. By default it will return `30` + * records. You can set `per_page` to `200` at most. You may specify component and/or price + * point by using either the numeric ID or the `handle:gold` syntax. * @param input ListSegmentsForPricePointInput object containing request parameters * @return Returns the ListSegmentsResponse response from the API call * @throws ApiException Represents error response from the server. @@ -154,9 +153,9 @@ private ApiCall prepareListSegmentsForPriceP } /** - * This endpoint updates a single Segment for a Component with a segmented Metric. It allows you - * to update the pricing for the segment. You may specify component and/or price point by using - * either the numeric ID or the `handle:gold` syntax. + * Updates a single segment for a component with a segmented metric. It allows you to update the + * pricing for the segment. You may specify component and/or price point by using either the + * numeric ID or the `handle:gold` syntax. * @param componentId Required parameter: ID or Handle of the Component * @param pricePointId Required parameter: ID or Handle of the Price Point belonging to the * Component @@ -217,8 +216,8 @@ private ApiCall prepareUpdateSegmentRequest( } /** - * This endpoint allows you to delete a Segment with specified ID. You may specify component - * and/or price point by using either the numeric ID or the `handle:gold` syntax. + * Deletes a segment with the specified ID. You may specify component and/or price point by + * using either the numeric ID or the `handle:gold` syntax. * @param componentId Required parameter: ID or Handle of the Component * @param pricePointId Required parameter: ID or Handle of the Price Point belonging to the * Component @@ -268,12 +267,11 @@ private ApiCall prepareDeleteSegmentRequest( } /** - * This endpoint allows you to create multiple segments in one request. The array of segments - * can contain up to `2000` records. If any of the records contain an error the whole request - * would fail and none of the requested segments get created. The error response contains a - * message for only the one segment that failed validation, with the corresponding index in the - * array. You may specify component and/or price point by using either the numeric ID or the - * `handle:gold` syntax. + * Creates multiple segments in one request. The array of segments can contain up to `2000` + * records. If any of the records contain an error the whole request would fail and none of the + * requested segments get created. The error response contains a message for only the one + * segment that failed validation, with the corresponding index in the array. You may specify + * component and/or price point by using either the numeric ID or the `handle:gold` syntax. * @param componentId Required parameter: ID or Handle for the Component * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the * Component @@ -329,12 +327,11 @@ private ApiCall prepareBulkCreateSegmentsReq } /** - * This endpoint allows you to update multiple segments in one request. The array of segments - * can contain up to `1000` records. If any of the records contain an error the whole request - * would fail and none of the requested segments get updated. The error response contains a - * message for only the one segment that failed validation, with the corresponding index in the - * array. You may specify component and/or price point by using either the numeric ID or the - * `handle:gold` syntax. + * Updates multiple segments in one request. The array of segments can contain up to `1000` + * records. If any of the records contain an error the whole request would fail and none of the + * requested segments get updated. The error response contains a message for only the one + * segment that failed validation, with the corresponding index in the array. You may specify + * component and/or price point by using either the numeric ID or the `handle:gold` syntax. * @param componentId Required parameter: ID or Handle for the Component * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the * Component diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java index 22a718ef..d999419f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java @@ -36,11 +36,11 @@ public EventsController(GlobalConfiguration globalConfig) { } /** - * ## Events Intro Advanced Billing Events include various activity that happens around a Site. - * This information is **especially** useful to track down issues that arise when subscriptions - * are not created due to errors. Within the Advanced Billing UI, "Events" are referred to as - * "Site Activity". Full documentation on how to record view Events / Site Activty in the - * Advanced Billing UI can be located + * Lists events for a site. ## Events Intro Advanced Billing Events include various activity + * that happens around a Site. This information is **especially** useful to track down issues + * that arise when subscriptions are not created due to errors. Within the Advanced Billing UI, + * "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site + * Activity in the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). ## List * Events for a Site This method will retrieve a list of events for a site. Use query string * filters to narrow down results. You may use the `key` filter as part of your query string to @@ -119,12 +119,11 @@ private ApiCall, ApiException> prepareListEventsRequest( } /** - * The following request will return a list of events for a subscription. ## Event Key The event - * type is identified by the key property. You can check supported keys [here]($m/Event%20Key). - * ## Event Specific Data Different event types may include additional data in - * `event_specific_data` property. While some events share the same schema for - * `event_specific_data`, others may not include it at all. For precise mappings from key to - * event_specific_data, refer to [Event]($m/Event). + * Lists events for a subscription. ## Event Key The event type is identified by the key + * property. You can check supported keys [here]($m/Event%20Key). ## Event Specific Data + * Different event types may include additional data in `event_specific_data` property. While + * some events share the same schema for `event_specific_data`, others may not include it at + * all. For precise mappings from key to event_specific_data, refer to [Event]($m/Event). * @param input ListSubscriptionEventsInput object containing request parameters * @return Returns the List of EventResponse response from the API call * @throws ApiException Represents error response from the server. @@ -174,7 +173,7 @@ private ApiCall, ApiException> prepareListSubscriptionEvents } /** - * Get a count of all the events for a given site by using this method. + * Returns the total count of events for a given site. * @param input ReadEventsCountInput object containing request parameters * @return Returns the CountResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java index 1594a965..dc892b21 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java @@ -39,10 +39,10 @@ public InsightsController(GlobalConfiguration globalConfig) { } /** - * The Stats API is a very basic view of some Site-level stats. This API call only answers with - * JSON responses. An XML version is not provided. ## Stats Documentation There currently is not - * a complimentary matching set of documentation that compliments this endpoint. However, each - * Site's dashboard will reflect the summary of information provided in the Stats response. ``` + * Returns basic site-level stats. This API call only answers with JSON responses. An XML + * version is not provided. ## Stats Documentation There currently is not a complimentary + * matching set of documentation that compliments this endpoint. However, each Site's dashboard + * will reflect the summary of information provided in the Stats response. ``` * https://subdomain.chargify.com/dashboard ```. * @return Returns the SiteSummary response from the API call * @throws ApiException Represents error response from the server. @@ -75,7 +75,7 @@ private ApiCall prepareReadSiteStatsRequest() { } /** - * This endpoint returns your site's current MRR, including plan and usage breakouts. + * Returns your site's current MRR, including plan and usage breakouts. * @deprecated * * @param atTime Optional parameter: submit a timestamp in ISO8601 format to request MRR for a @@ -122,8 +122,8 @@ private ApiCall prepareReadMrrRequest( } /** - * This endpoint returns your site's MRR movements. ## Understanding MRR movements This endpoint - * will aid in accessing your site's [MRR + * Lists your site's MRR movements. ## Understanding MRR movements This endpoint will aid in + * accessing your site's [MRR * Report](https://maxio.zendesk.com/hc/en-us/articles/24285894587021-MRR-Analytics) data. * Whenever a subscription event occurs that causes your site's MRR to change (such as a signup * or upgrade), we record an MRR movement. These records are accessible via the MRR Movements diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java index 3738cb74..c860b31f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java @@ -57,8 +57,9 @@ public InvoicesController(GlobalConfiguration globalConfig) { /** * Refund an invoice, segment, or consolidated invoice. ## Partial Refund for Consolidated * Invoice A refund less than the total of a consolidated invoice will be split across its - * segments. A $50.00 refund on a $100.00 consolidated invoice with one $60.00 and one $40.00 - * segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00 respectively). + * segments. For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and + * one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, + * respectively). * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. * @param body Optional parameter: @@ -340,7 +341,7 @@ private ApiCall prepareRecordPaymentForInvoiceRequest( /** * This API call should be used when you want to record an external payment against multiple - * invoices. In order apply a payment to multiple invoices, at minimum, specify the `amount` and + * invoices. To apply a payment to multiple invoices, at minimum, specify the `amount` and * `applications` (i.e., `invoice_uid` and `amount`) details. ``` { "payment": { "memo": "to pay * the bills", "details": "check number 8675309", "method": "check", "amount": "250.00", * "applications": [ { "invoice_uid": "inv_8gk5bwkct3gqt", "amount": "100.00" }, { @@ -690,8 +691,8 @@ private ApiCall prepareListConsolidatedInvoic * existing items like products, components. ```json { "invoice": { "line_items": [ { * "product_id": "handle:gold-product", "quantity": 2, } ] } } ``` The price for each line item * will be calculated as well as a total due amount for the invoice. Multiple line items can be - * sent. ### Line items types When defining line item, You can choose one of 3 types for one - * line item: #### Custom item Like in basic behavior example above, You can pass `title` and + * sent. ### Line item types When defining a line item, You can choose one of 3 types for a line + * item: #### Custom item As shown in the basic behavior example, You can pass `title` and * `unit_price` for custom item. #### Product id Product handle (with handle: prefix) or id from * the scope of current subscription's site can be provided with `product_id`. By default * `unit_price` is taken from product's default price point, but can be overwritten by passing @@ -700,8 +701,8 @@ private ApiCall prepareListConsolidatedInvoic * from the scope of current subscription's site can be provided with `component_id`. If * `component_id` is used, following fields cannot be used: `title`, `product_id`. By default * `unit_price` is taken from product's default price point, but can be overwritten by passing - * `unit_price` or `price_point_id`. At this moment price points are supportted only for - * quantity based, on/off and metered components. For prepaid and event based billing components + * `unit_price` or `price_point_id`. At this moment price points are supported only for quantity + * based, on/off and metered components. For prepaid and event based billing components * `unit_price` is required. ### Coupons When creating ad hoc invoice, new discounts can be * applied in following way: ```json { "invoice": { "line_items": [ { "product_id": * "handle:gold-product", "quantity": 1 } ], "coupons": [ { "code": "COUPONCODE", "percentage": @@ -748,17 +749,19 @@ private ApiCall prepareListConsolidatedInvoic * passed `unit_price` cannot be used. It can be used only with catalog items products and * components. #### Description Optional `description` parameter, it will overwrite default * generated description for line item. ### Invoice Options #### Issue Date By default, invoices - * will be created with a issue date set to today. `issue_date` parameter can be send to alter - * that. Only dates in the past can be send. `issue_date` should be send in `YYYY-MM-DD` format. - * #### Net Terms By default, invoices will be created with a due date matching the date of - * 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. 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`. + * will be created with a issue date set to today in your site's time zone. The `issue_date` + * parameter can be sent to alter the default. Only today or dates in the past are accepted. + * This date is interpreted and validated in your site's time zone. The format for `issue_date` + * is `YYYY-MM-DD`. #### Net Terms By default, invoices will be created with a due date matching + * the date of 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. 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_instructions` + * 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 @@ -861,11 +864,11 @@ private ApiCall prepareSendInvoiceRequest( } /** - * Customer information may change after an invoice is issued which may lead to a mismatch - * between customer information that are present on an open invoice and actual customer - * information. This endpoint allows to preview these differences, if any. The endpoint doesn't - * accept a request body. Customer information differences are calculated on the application - * side. + * Customer information may change after an invoice is issued, which may lead to a mismatch + * between customer information that is present on an open invoice and actual customer + * information. This endpoint allows you to preview these differences, if any. The endpoint + * doesn't accept a request body. Customer information differences are calculated on the + * application side. * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. * @return Returns the CustomerChangesPreviewResponse response from the API call @@ -911,7 +914,7 @@ private ApiCall preparePreviewCust /** * This endpoint updates customer information on an open invoice and returns the updated * invoice. If you would like to preview changes that will be applied, use the - * `/invoices/{uid}/customer_information/preview.json` endpoint before. The endpoint doesn't + * `/invoices/{uid}/customer_information/preview.json` endpoint first. The endpoint doesn't * accept a request body. Customer information differences are calculated on the application * side. * @param uid Required parameter: The unique identifier for the invoice, this does not refer @@ -962,11 +965,11 @@ private ApiCall prepareUpdateCustomerInformationRequest( * component and using "accrue charges" option. You cannot issue a pending child invoice that * was created for a member subscription in a group. For Remittance subscriptions, the invoice * will go into "open" status and payment won't be attempted. The value for `on_failed_payment` - * would be rejected if sent. Any prepayments or service credits that exist on subscription will - * be automatically applied. Additionally, if setting is on, an email will be sent for issued - * invoice. For Automatic subscriptions, prepayments and service credits will apply to the - * invoice and before payment is attempted. On successful payment, the invoice will go into - * "paid" status and email will be sent to the customer (if setting applies). When payment + * would be rejected if sent. Any prepayments or service credits that exist on the subscription + * will be automatically applied. Additionally, if the setting is enabled, an email will be sent + * for the issued invoice. For Automatic subscriptions, prepayments and service credits will + * apply to the invoice before payment is attempted. On successful payment, the invoice will go + * into "paid" status and email will be sent to the customer (if setting applies). When payment * fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - * prepayments and credits applied to invoice; invoice status set to "open"; email sent to the * customer for the issued invoice (if setting applies); payment failure recorded in the invoice diff --git a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java index d7414da5..3a346028 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java @@ -36,11 +36,11 @@ public OffersController(GlobalConfiguration globalConfig) { } /** - * Create an offer within your Advanced Billing site by sending a POST request. ## Documentation - * Offers allow you to package complicated combinations of products, components and coupons into - * a convenient package which can then be subscribed to just like products. Once an offer is - * defined it can be used as an alternative to the product when creating subscriptions. Full - * documentation on how to use offers in the Advanced Billing UI can be located + * Creates an offer within your Advanced Billing site. ## Documentation Offers allow you to + * package complicated combinations of products, components and coupons into a convenient + * package which can then be subscribed to just like products. Once an offer is defined it can + * be used as an alternative to the product when creating subscriptions. Full documentation on + * how to use offers in the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview). ## Using * a Product Price Point You can optionally pass in a `product_price_point_id` that corresponds * with the `product_id` and the offer will use that price point. If a `product_price_point_id` @@ -86,7 +86,7 @@ private ApiCall prepareCreateOfferRequest( } /** - * This endpoint will list offers for a site. + * Lists offers for a site. * @param input ListOffersInput object containing request parameters * @return Returns the ListOffersResponse response from the API call * @throws ApiException Represents error response from the server. @@ -130,8 +130,8 @@ private ApiCall prepareListOffersRequest( } /** - * This method allows you to list a specific offer's attributes. This is different than list all - * offers for a site, as it requires an `offer_id`. + * Returns a specific offer's attributes. This is different from listing all offers for a site, + * as it requires an `offer_id`. * @param offerId Required parameter: The Chargify id of the offer * @return Returns the OfferResponse response from the API call * @throws ApiException Represents error response from the server. @@ -168,7 +168,8 @@ private ApiCall prepareReadOfferRequest( } /** - * Archive an existing offer. Please provide an `offer_id` in order to archive the correct item. + * Archives an existing offer. Please provide an `offer_id` in order to archive the correct + * item. * @param offerId Required parameter: The Chargify id of the offer * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -201,7 +202,7 @@ private ApiCall prepareArchiveOfferRequest( } /** - * Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive + * Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive * the correct item. * @param offerId Required parameter: The Chargify id of the offer * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java index 201973fb..b85bbb39 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java @@ -51,8 +51,8 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) { * 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) + * on your end. If your business is not PCI compliant, use [Maxio.js (formerly + * 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) @@ -61,18 +61,19 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) { * credit card updates by Subscriber) + [Public Signup Pages payment * settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings) * + [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 + * [Maxio.js (formerly + * Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) + + * [Maxio.js with GoCardless - minimal * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) - * + [Chargify.js with GoCardless - full + * + [Maxio.js with GoCardless - full * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) - * + [Chargify.js with Stripe Direct Debit - minimal + * + [Maxio.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 + * + [Maxio.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 + * + [Maxio.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 + * + [Maxio.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) + [Full @@ -82,45 +83,13 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) { * 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) - * ## 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). - * 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 - * 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://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com - * will do a POST request to https://localhost:4000 after credit card is authenticated and will - * redirect a customer to https://yourpage.com after 3DS authentication.", "links": { - * "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 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 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. + * ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS + * Authentication to adhere to Strong Customer Authentication (SCA), the request enters a + * post-authentication flow where a 422 Unprocessable Entity status is returned with an + * action_link that will direct the customer through 3DS Authentication. See the [3D Secure + * Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @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 @@ -168,9 +137,8 @@ private ApiCall prepareCreatePaymentProfil } /** - * This method will return all of the active `payment_profiles` for a Site, or for one Customer - * within a site. If no payment profiles are found, this endpoint will return an empty array, - * not a 404. + * Returns all active payment profiles for a site, or for one customer within a site. If no + * payment profiles are found, this endpoint will return an empty array, not a 404. * @param input ListPaymentProfilesInput object containing request parameters * @return Returns the List of PaymentProfileResponse response from the API call * @throws ApiException Represents error response from the server. @@ -212,18 +180,17 @@ private ApiCall, ApiException> prepareListPaymentPr } /** - * 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 } } ```. + * Returns 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 * @return Returns the PaymentProfileResponse response from the API call * @throws ApiException Represents error response from the server. @@ -263,28 +230,28 @@ private ApiCall prepareReadPaymentProfileR } /** - * ## Partial Card Updates In the event that you are using the Authorize.net, Stripe, - * Cybersource, Forte or Braintree Blue payment gateways, you can update just the billing and - * contact information for a payment method. Note the lack of credit-card related data contained - * in the JSON payload. In this case, the following JSON is acceptable: ``` { "payment_profile": - * { "first_name": "Kelly", "last_name": "Test", "billing_address": "789 Juniper Court", - * "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": - * "US", "billing_address_2": null } } ``` The result will be that you have updated the billing - * information for the card, yet retained the original card number data. ## Specific notes on - * updating payment profiles - Merchants with **Authorize.net**, **Cybersource**, **Forte**, - * **Braintree Blue** or **Stripe** as their payment gateway can update their Customer’s credit - * cards without passing in the full credit card number and CVV. - If you are using - * **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or **Stripe**, Advanced - * Billing will ignore the credit card number and CVV when processing an update via the API, and - * attempt a partial update instead. If you wish to change the card number on a payment profile, - * you will need to create a new payment profile for the given customer. - A Payment Profile - * cannot be updated with the attributes of another type of Payment Profile. For example, if the - * payment profile you are attempting to update is a credit card, you cannot pass in bank - * account attributes (like `bank_account_number`), and vice versa. - Updating a payment profile - * directly will not trigger an attempt to capture a past-due balance. If this is the intent, - * update the card details via the Subscription instead. - If you are using Authorize.net or - * Stripe, you may elect to manually trigger a retry for a past due subscription after a partial - * update. + * Updates a payment profile. ## Partial Card Updates In the event that you are using the + * Authorize.net, Stripe, Cybersource, Forte or Braintree Blue payment gateways, you can update + * just the billing and contact information for a payment method. Note the lack of credit-card + * related data contained in the JSON payload. In this case, the following JSON is acceptable: + * ``` { "payment_profile": { "first_name": "Kelly", "last_name": "Test", "billing_address": + * "789 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": + * "80302", "billing_country": "US", "billing_address_2": null } } ``` The result will be that + * you have updated the billing information for the card, yet retained the original card number + * data. ## Specific notes on updating payment profiles - Merchants with **Authorize.net**, + * **Cybersource**, **Forte**, **Braintree Blue** or **Stripe** as their payment gateway can + * update their Customer’s credit cards without passing in the full credit card number and CVV. + * - If you are using **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or + * **Stripe**, Advanced Billing will ignore the credit card number and CVV when processing an + * update via the API, and attempt a partial update instead. If you wish to change the card + * number on a payment profile, you will need to create a new payment profile for the given + * customer. - A Payment Profile cannot be updated with the attributes of another type of + * Payment Profile. For example, if the payment profile you are attempting to update is a credit + * card, you cannot pass in bank account attributes (like `bank_account_number`), and vice + * versa. - Updating a payment profile directly will not trigger an attempt to capture a + * past-due balance. If this is the intent, update the card details via the Subscription + * instead. - If you are using Authorize.net or Stripe, you may elect to manually trigger a + * retry for a past due subscription after a partial update. * @param paymentProfileId Required parameter: The Chargify id of the payment profile * @param body Optional parameter: * @return Returns the PaymentProfileResponse response from the API call @@ -418,8 +385,8 @@ private ApiCall prepareDeleteSubscriptionsPaymentProfileRequ } /** - * Submit the two small deposit amounts the customer received in their bank account in order to - * verify the bank account. (Stripe only). + * Verifies a bank account. Submit the two small deposit amounts the customer received in their + * bank account to verify the bank account. (Stripe only). * @param bankAccountId Required parameter: Identifier of the bank account in the system. * @param body Optional parameter: * @return Returns the BankAccountResponse response from the API call @@ -509,9 +476,9 @@ private ApiCall prepareDeleteSubscriptionGroupPaymentProfile } /** - * This will change the default payment profile on the subscription to the existing payment - * profile with the id specified. You must elect to change the existing payment profile to a new - * payment profile ID in order to receive a satisfactory response from this endpoint. + * Changes the default payment profile on the subscription to the existing payment profile with + * the specified ID. You must elect to change the existing payment profile to a new payment + * profile ID in order to receive a satisfactory response from this endpoint. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param paymentProfileId Required parameter: The Chargify id of the payment profile * @return Returns the PaymentProfileResponse response from the API call diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java index f8ea3b53..faed6dfa 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java @@ -100,7 +100,7 @@ private ApiCall, ApiException> prepareListProductsForProdu /** * 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 + * 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: @@ -144,7 +144,7 @@ private ApiCall prepareCreateProductFamilyR } /** - * Retrieve a list of Product Families for a site. + * Returns 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. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java index c2602ddc..c4d3b7ea 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java @@ -203,8 +203,8 @@ private ApiCall prepareUpdateProductPri } /** - * Use this endpoint to retrieve details for a specific product price point. You can achieve - * this by using either the product price point ID or handle. + * Returns details for a specific product price point. You can achieve this by using either the + * product price point ID or handle. * @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. @@ -310,7 +310,7 @@ private ApiCall prepareArchiveProductPr } /** - * Use this endpoint to unarchive an archived product price point. + * Unarchives an archived product price point. * @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 @@ -549,7 +549,7 @@ private ApiCall prepareUpdateProductCurren } /** - * This method allows retrieval of a list of Products Price Points belonging to a Site. + * Lists Product Price Points belonging to a site. * @param input ListAllProductPricePointsInput object containing request parameters * @return Returns the ListProductPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java index 69592ec1..a190372b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java @@ -36,7 +36,7 @@ public ProductsController(GlobalConfiguration globalConfig) { } /** - * Creates a product in your Advanced Billing site. See the following product docuemation for + * Creates a product in your Advanced Billing site. See the following product documentation for * more information: + [Products * Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview) * + [Changing a Subscription's @@ -176,7 +176,7 @@ private ApiCall prepareUpdateProductRequest( } /** - * Archives the product. All current subscribers will be unffected; their subscription/purchase + * Archives the product. All current subscribers will be unaffected; 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 @@ -255,7 +255,7 @@ private ApiCall prepareReadProductByHandleRequest } /** - * This method allows to retrieve a list of Products belonging to a Site. + * Lists products belonging to a site. * @param input ListProductsInput object containing request parameters * @return Returns the List of 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 dcbeeb5d..ca87056e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java @@ -42,14 +42,13 @@ public ProformaInvoicesController(GlobalConfiguration globalConfig) { } /** - * This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It - * will return a 201 with no message, or a 422 with any errors. To find and view the new - * consolidated proforma invoice, you may poll the subscription group listing for proforma - * invoices; only one consolidated proforma invoice may be created per group at a time. If the - * information becomes outdated, simply void the old consolidated proforma invoice and generate - * a new one. ## Restrictions Proforma invoices are only available on Relationship Invoicing - * sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a - * live state. + * Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, + * or a 422 with any errors. To find and view the new consolidated proforma invoice, you may + * poll the subscription group listing for proforma invoices; only one consolidated proforma + * invoice may be created per group at a time. If the information becomes outdated, simply void + * the old consolidated proforma invoice and generate a new one. ## Restrictions Proforma + * invoices are only available on Relationship Invoicing sites. To create a proforma invoice, + * the subscription must not be prepaid, and must be in a live state. * @param uid Required parameter: The uid of the subscription group * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -85,10 +84,10 @@ private ApiCall prepareCreateConsolidatedProformaInvoiceRequ } /** - * Only proforma invoices with a `consolidation_level` of parent are returned. By default, - * proforma invoices returned on the index will only include totals, not detailed breakdowns for - * `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`. To include - * breakdowns, pass the specific field as a key in the query with a value set to true. + * Lists proforma invoices with a `consolidation_level` of parent for the subscription group. By + * default, proforma invoices returned on the index will only include totals, not detailed + * breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`. To + * include breakdowns, pass the specific field as a key in the query with a value set to true. * @param input ListSubscriptionGroupProformaInvoicesInput object containing request parameters * @return Returns the ListProformaInvoicesResponse response from the API call * @throws ApiException Represents error response from the server. @@ -140,8 +139,8 @@ private ApiCall prepareListSubscript } /** - * Use this endpoint to read the details of an existing proforma invoice. ## Restrictions - * Proforma invoices are only available on Relationship Invoicing sites. + * Returns the details of an existing proforma invoice. ## Restrictions Proforma invoices are + * only available on Relationship Invoicing sites. * @param proformaInvoiceUid Required parameter: The uid of the proforma invoice * @return Returns the ProformaInvoice response from the API call * @throws ApiException Represents error response from the server. @@ -181,12 +180,12 @@ 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, 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. + * Creates a proforma invoice and returns 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, 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. * @return Returns the ProformaInvoice response from the API call * @throws ApiException Represents error response from the server. @@ -226,10 +225,10 @@ private ApiCall prepareCreateProformaInvoiceReque } /** - * By default, proforma invoices returned on the index will only include totals, not detailed - * breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. - * To include breakdowns, pass the specific field as a key in the query with a value set to - * `true`. + * Lists proforma invoices for a subscription. By default, results only include totals, not + * detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or + * `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a + * value set to `true`. * @param input ListProformaInvoicesInput object containing request parameters * @return Returns the ListProformaInvoicesResponse response from the API call * @throws ApiException Represents error response from the server. @@ -290,12 +289,12 @@ private ApiCall prepareListProformaI } /** - * Allows for proforma invoices to be programmatically delivered via email. Supports email - * delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) - * recipients. If `recipient_emails` is omitted, the system will fall back to the primary - * recipient derived from the invoice or subscription. At least one recipient must be present, - * either via the request body or via this default behavior, so an empty body may still succeed - * when defaults are available. + * Delivers a proforma invoice programmatically via email. Supports email delivery to direct + * recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. If + * `recipient_emails` is omitted, the system will fall back to the primary recipient derived + * from the invoice or subscription. At least one recipient must be present, either via the + * request body or via this default behavior, so an empty body may still succeed when defaults + * are available. * @param proformaInvoiceUid Required parameter: The uid of the proforma invoice * @param body Optional parameter: * @return Returns the ProformaInvoice response from the API call @@ -345,12 +344,12 @@ private ApiCall prepareDeliverProformaInvoiceRequ } /** - * This endpoint will void a proforma invoice that has the status "draft". ## Restrictions - * Proforma invoices are only available on Relationship Invoicing sites. Only proforma invoices - * that have the appropriate status may be reopened. If the invoice identified by {uid} does not - * have the appropriate status, the response will have HTTP status code 422 and an error - * message. A reason for the void operation is required to be included in the request body. If - * one is not provided, the response will have HTTP status code 422 and an error message. + * Voids a proforma invoice that has the status "draft". ## Restrictions Proforma invoices are + * only available on Relationship Invoicing sites. Only proforma invoices that have the + * appropriate status may be reopened. If the invoice identified by {uid} does not have the + * appropriate status, the response will have HTTP status code 422 and an error message. A + * reason for the void operation is required to be included in the request body. If one is not + * provided, the response will have HTTP status code 422 and an error message. * @param proformaInvoiceUid Required parameter: The uid of the proforma invoice * @param body Optional parameter: * @return Returns the ProformaInvoice response from the API call @@ -400,10 +399,10 @@ private ApiCall prepareVoidProformaInvoiceRequest } /** - * Return a preview of the data that will be included on a given subscription's proforma invoice - * if one were to be generated. It will have similar line items and totals as a renewal preview, - * but the response will be presented in the format of a proforma invoice. Consequently it will - * include additional information such as the name and addresses that will appear on the + * Returns a preview of the data that will be included on a given subscription's proforma + * invoice if one were to be generated. It will have similar line items and totals as a renewal + * preview, but the response will be presented in the format of a proforma invoice. Consequently + * it will include additional information such as the name and addresses that will appear on the * proforma invoice. The preview endpoint is subject to all the same conditions as the proforma * invoice endpoint. For example, previews are only available on the Relationship Invoicing * architecture, and previews cannot be made for end-of-life subscriptions. If all the data @@ -454,16 +453,16 @@ private ApiCall preparePreviewProformaInvoiceRequ } /** - * This endpoint is only available for Relationship Invoicing sites. It cannot be used to create - * consolidated proforma invoices or preview prepaid subscriptions. Create a proforma invoice to - * preview costs before a subscription's signup. Like other proforma invoices, it can be emailed - * to the customer, voided, and publicly viewed on the chargifypay domain. Pass a payload that - * resembles a subscription create or signup preview request. For example, you can specify - * components, coupons/a referral, offers, custom pricing, and an existing customer or payment - * profile to populate a shipping or billing address. A product and customer first name, last - * name, and email are the minimum requirements. We recommend associating the proforma invoice - * with a customer_id to easily find their proforma invoices, since the subscription_id will - * always be blank. + * Creates a proforma invoice to preview costs before a subscription's signup. This endpoint is + * only available for Relationship Invoicing sites and cannot be used to create consolidated + * proforma invoices or preview prepaid subscriptions. Like other proforma invoices, it can be + * emailed to the customer, voided, and publicly viewed on the chargifypay domain. Pass a + * payload that resembles a subscription create or signup preview request. For example, you can + * specify components, coupons/a referral, offers, custom pricing, and an existing customer or + * payment profile to populate a shipping or billing address. A product and customer first name, + * last name, and email are the minimum requirements. We recommend associating the proforma + * invoice with a customer_id to easily find their proforma invoices, since the subscription_id + * will always be blank. * @param body Optional parameter: * @return Returns the ProformaInvoice response from the API call * @throws ApiException Represents error response from the server. @@ -508,15 +507,15 @@ private ApiCall prepareCreateSignupProformaInvoic } /** - * This endpoint is only available for Relationship Invoicing sites. It cannot be used to create - * consolidated proforma invoice previews or preview prepaid subscriptions. Create a signup - * preview in the format of a proforma invoice to preview costs before a subscription's signup. - * You have the option of optionally previewing the first renewal's costs as well. The proforma - * invoice preview will not be persisted. Pass a payload that resembles a subscription create or - * signup preview request. For example, you can specify components, coupons/a referral, offers, - * custom pricing, and an existing customer or payment profile to populate a shipping or billing - * address. A product and customer first name, last name, and email are the minimum - * requirements. + * Creates a signup preview in the format of a proforma invoice to preview costs before a + * subscription's signup. This endpoint is only available for Relationship Invoicing sites and + * cannot be used to create consolidated proforma invoice previews or preview prepaid + * subscriptions. You have the option of previewing the first renewal's costs as well. The + * proforma invoice preview will not be persisted. Pass a payload that resembles a subscription + * create or signup preview request. For example, you can specify components, coupons/a + * referral, offers, custom pricing, and an existing customer or payment profile to populate a + * shipping or billing address. A product and customer first name, last name, and email are the + * minimum requirements. * @param include Optional parameter: Choose to include a proforma invoice preview for the * first renewal. Use in query `include=next_proforma_invoice`. * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java index 6b88d4e2..6dc279ec 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java @@ -37,15 +37,15 @@ public ReasonCodesController(GlobalConfiguration globalConfig) { } /** - * # Reason Codes Intro ReasonCodes are a way to gain a high level view of why your customers - * are cancelling the subscription to your product or service. Add a set of churn reason codes - * to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel - * their subscription, learn why they decided to cancel. ## Reason Code Documentation Full - * documentation on how Reason Codes operate within Advanced Billing can be located under the - * following links. [Churn Reason + * Creates a reason code for a given site. # Reason Codes Intro Reason Codes are a way to gain a + * high-level view of why your customers are cancelling the subscription to your product or + * service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing + * Portal. As your subscribers decide to cancel their subscription, learn why they decided to + * cancel. ## Reason Code Documentation Full documentation on how Reason Codes operate within + * Advanced Billing can be located under the following links. [Churn Reason * Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes) ## - * Create Reason Code This method gives a merchant the option to create a reason codes for a - * given Site. + * Create Reason Code This method gives a merchant the option to create reason codes for a given + * site. * @param body Optional parameter: * @return Returns the ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. @@ -87,8 +87,7 @@ private ApiCall prepareCreateReasonCodeRequest } /** - * This method gives a merchant the option to retrieve a list of all of the current churn codes - * for a given site. + * Lists all current churn codes for a given site. * @param input ListReasonCodesInput object containing request parameters * @return Returns the List of ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. @@ -131,8 +130,7 @@ private ApiCall, ApiException> prepareListReasonCodesRe } /** - * This method gives a merchant the option to retrieve a list of a particular code for a given - * Site by providing the unique numerical ID of the code. + * Returns a particular churn reason code for a given site by its unique ID. * @param reasonCodeId Required parameter: The Advanced Billing id of the reason code * @return Returns the ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. @@ -172,7 +170,7 @@ private ApiCall prepareReadReasonCodeRequest( } /** - * This method gives a merchant the option to update an existing reason code for a given site. + * Updates an existing reason code for a given site. * @param reasonCodeId Required parameter: The Advanced Billing id of the reason code * @param body Optional parameter: * @return Returns the ReasonCodeResponse response from the API call @@ -222,8 +220,8 @@ private ApiCall prepareUpdateReasonCodeRequest } /** - * This method gives a merchant the option to delete one reason code from the Churn Reason - * Codes. This code will be immediately removed. This action is not reversible. + * Deletes a reason code from the Churn Reason Codes. This code will be immediately removed. + * This action is not reversible. * @param reasonCodeId Required parameter: The Advanced Billing id of the reason code * @return Returns the OkResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java index fc31e0ac..272c5ef3 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java @@ -32,10 +32,10 @@ public ReferralCodesController(GlobalConfiguration globalConfig) { } /** - * Use this method to determine if the referral code is valid and applicable within your Site. - * This method is useful for validating referral codes that are entered by a customer. ## - * Referrals Documentation Full documentation on how to use the referrals feature in the - * Advanced Billing UI can be located + * Validates whether a referral code is valid and applicable within your site. This method is + * useful for validating referral codes that are entered by a customer. ## Referrals + * Documentation Full documentation on how to use the referrals feature in the Advanced Billing + * UI can be located * [here](https://maxio.zendesk.com/hc/en-us/sections/24286965611405-Referrals). ## Server * Response If the referral code is valid the status code will be `200` and the referral code * will be returned. If the referral code is invalid, a `404` response will be returned. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java index 23160763..724aa713 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java @@ -35,13 +35,12 @@ public SalesCommissionsController(GlobalConfiguration globalConfig) { } /** - * Endpoint returns subscriptions with associated sales reps ## Modified Authentication Process - * 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 + * Lists subscriptions with associated sales reps. ## Modified Authentication Process 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 @@ -92,7 +91,7 @@ private ApiCall, ApiException> prepareListSalesCommissionS } /** - * Endpoint returns sales rep list with details ## Modified Authentication Process The Sales + * Returns a sales rep list with details. ## Modified Authentication Process 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 @@ -148,13 +147,13 @@ private ApiCall, ApiException> prepareListSalesRepsRequest } /** - * Endpoint returns sales rep and attached subscriptions details. ## Modified Authentication - * Process 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 + * Returns a sales rep and attached subscription details. ## Modified Authentication Process 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 diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java index 3e913580..9053aa1c 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java @@ -33,13 +33,12 @@ public SitesController(GlobalConfiguration globalConfig) { } /** - * This endpoint allows you to fetch some site data. Full documentation on Sites in the Advanced - * Billing UI can be located + * Retrieves site data. Full documentation on Sites in the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites). Specifically, the * [Clearing Site * Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section - * is extremely relevant to this endpoint documentation. #### Relationship invoicing enabled If - * site has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, + * is relevant to this endpoint documentation. #### Relationship invoicing enabled If the site + * has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, * "whopays_enabled": true, "whopays_default_payer": "self" You can read more about these * settings here: [Who Pays & Customer * Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays). @@ -74,11 +73,11 @@ private ApiCall prepareReadSiteRequest() { } /** - * This call is asynchronous and there may be a delay before the site data is fully deleted. If - * you are clearing site data for an automated test, you will need to build in a delay and/or - * check that there are no products, etc., in the site before proceeding. **This functionality - * will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will - * result in a response of 403 FORBIDDEN.**. + * Clears all data from a test site asynchronously. This call is asynchronous and there may be a + * delay before the site data is fully deleted. If you are clearing site data for an automated + * test, you will need to build in a delay and/or check that there are no products, etc., in the + * site before proceeding. **This functionality will only work on sites in TEST mode. Attempts + * to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.**. * @param cleanupScope Optional parameter: `all`: Will clear all products, customers, and * related subscriptions from the site. `customers`: Will clear only customers and * related subscriptions (leaving the products untouched) for the site. Revenue will @@ -114,7 +113,7 @@ private ApiCall prepareClearSiteRequest( } /** - * This endpoint returns public keys used for Chargify.js. + * Returns public keys used for Maxio.js (formerly Chargify.js). * @param input ListChargifyJsPublicKeysInput object containing request parameters * @return Returns the ListPublicKeysResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 5c24c3b3..476d4a5a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -57,7 +57,7 @@ public SubscriptionComponentsController(GlobalConfiguration globalConfig) { } /** - * This request will list information regarding a specific component owned by a subscription. + * Returns information for a specific component on a subscription. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component. * Alternatively, the component's handle prefixed by `handle:` @@ -103,9 +103,9 @@ private ApiCall prepareReadSubscrip } /** - * This request will list a subscription's applied components. ## Archived Components When - * requesting to list components for a given subscription, if the subscription contains - * **archived** components they will be listed in the server response. + * Lists a subscription's applied components. ## Archived Components When requesting to list + * components for a given subscription, if the subscription contains **archived** components + * they will be listed in the server response. * @param input ListSubscriptionComponentsInput object containing request parameters * @return Returns the List of SubscriptionComponentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -259,8 +259,8 @@ private ApiCall prepareBulkResetSubscription * Creates an allocation, sets the current allocated quantity for the component, and records a * memo. Allocations can only be updated for Quantity, On/Off, and Prepaid Components. When * creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, - * and `accrue_charge` to be applied. > **Note:** These proration and accural fields are ignored - * for Prepaid Components since this component type always generate charges immediately without + * and `accrue_charge` to be applied. > **Note:** These proration and accrual fields are ignored + * for Prepaid Components since this component type always generates charges immediately without * proration. For information on prorated components and upgrade/downgrade schemes, see [Setting * Component * Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) @@ -274,7 +274,7 @@ private ApiCall prepareBulkResetSubscription * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) * > **Note:** Proration uses the current price of the component as well as the current tax * rates. Changes to either may cause the prorated charge/credit to be wrong. For more - * informaiton see the [Component + * information, see the [Component * Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) * product Documentation. * @param subscriptionId Required parameter: The Chargify id of the subscription. @@ -328,9 +328,9 @@ private ApiCall prepareAllocateComponentReques } /** - * This endpoint returns the 50 most recent Allocations, ordered by most recent first. ## On/Off - * Components When a subscription's on/off component has been toggled to on (`1`) or off (`0`), - * usage will be logged in this response. + * Returns the 50 most recent Allocations, ordered by most recent first. ## On/Off Components + * When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will + * be logged in this response. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component * @param page Optional parameter: Result records are organized in pages. By default, the @@ -390,7 +390,7 @@ private ApiCall, ApiException> prepareListAllocationsRe /** * Creates multiple allocations, sets the current allocated quantity for each of the components, - * and recording a memo. A `component_id` is required for each allocation. The charges and/or + * and records a memo. A `component_id` is required for each allocation. The charges and/or * credits that are created will be rolled up into a single total which is used to determine * whether this is an upgrade or a downgrade. ### Order of Resolution for upgrade_charge and * downgrade_credit 1. Per allocation in API call (within a single allocation of the @@ -403,9 +403,9 @@ private ApiCall, ApiException> prepareListAllocationsRe * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) * > **Note:** Proration uses the current price of the component as well as the current tax * rates. Changes to either may cause the prorated charge/credit to be wrong. For more - * informaiton see the [Component + * information, see the [Component * Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) - * product Documentation. + * product documentation. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the List of AllocationResponse response from the API call @@ -456,15 +456,15 @@ private ApiCall, ApiException> prepareAllocateComponent } /** - * Advanced Billing offers the ability to preview a potential subscription's **quantity-based** - * or **on/off** component allocation in the middle of the current billing period. This is - * useful if you want users to be able to see the effect of a component operation before - * actually doing it. ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or - * `downgrade_credits` When the allocation uses multiple different types of `upgrade_charge`s or - * `downgrade_credit`s, the Allocation is viewed as an Allocation which uses "Fine-Grained - * Component Control". As a result, the response will not include `direction` and `proration` - * within the `allocation_preview`, but at the `line_items` and `allocations` level - * respectfully. See example below for Fine-Grained Component Control response. + * Previews a potential subscription's **quantity-based** or **on/off** component allocation in + * the middle of the current billing period. This is useful if you want users to be able to see + * the effect of a component operation before actually doing it. ## Fine-grained Component + * Control: Use with multiple `upgrade_charge`s or `downgrade_credits` When the allocation uses + * multiple different types of `upgrade_charge`s or `downgrade_credit`s, the Allocation is + * viewed as an Allocation which uses "Fine-Grained Component Control". As a result, the + * response will not include `direction` and `proration` within the `allocation_preview`, but at + * the `line_items` and `allocations` level respectfully. See example below for Fine-Grained + * Component Control response. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the AllocationPreviewResponse response from the API call @@ -511,14 +511,13 @@ private ApiCall preparePreviewAllocatio } /** - * When the expiration interval options are selected on a prepaid usage component price point, - * all allocations will be created with an expiration date. This expiration date can be changed - * after the fact to allow for extending or shortening the allocation's active window. In order - * to change a prepaid usage allocation's expiration date, a PUT call must be made to the - * allocation's endpoint with a new expiration date. ## Limitations A few limitations exist when - * changing an allocation's expiration date: - An expiration date can only be changed for an - * allocation that belongs to a price point with expiration interval options explicitly set. - - * An expiration date can be changed towards the future with no limitations. - An expiration + * Updates the expiration date for a prepaid usage allocation. This expiration date can be + * changed after the fact to allow for extending or shortening the allocation's active window. + * In order to change a prepaid usage allocation's expiration date, a PUT call must be made to + * the allocation's endpoint with a new expiration date. ## Limitations A few limitations exist + * when changing an allocation's expiration date: - An expiration date can only be changed for + * an allocation that belongs to a price point with expiration interval options explicitly set. + * - An expiration date can be changed towards the future with no limitations. - An expiration * date can be changed towards the past (essentially expiring it) up to the subscription's * current period beginning date. * @param subscriptionId Required parameter: The Chargify id of the subscription. @@ -577,17 +576,17 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio } /** - * Prepaid Usage components are unique in that their allocations are always additive. In order - * to reduce a subscription's allocated quantity for a prepaid usage component each allocation - * must be destroyed individually via this endpoint. ## Credit Scheme By default, destroying an - * allocation will generate a service credit on the subscription. This behavior can be modified - * with the optional `credit_scheme` parameter on this endpoint. The accepted values are: 1. - * `none`: The allocation will be destroyed and the balances will be updated but no service - * credit or refund will be created. 2. `credit`: The allocation will be destroyed and the - * balances will be updated and a service credit will be generated. This is also the default - * behavior if the `credit_scheme` param is not passed. 3. `refund`: The allocation will be - * destroyed and the balances will be updated and a refund will be issued along with a Credit - * Note. + * Deletes a prepaid usage allocation. Prepaid Usage components are unique in that their + * allocations are always additive. In order to reduce a subscription's allocated quantity for a + * prepaid usage component, each allocation must be destroyed individually via this endpoint. ## + * Credit Scheme By default, destroying an allocation will generate a service credit on the + * subscription. This behavior can be modified with the optional `credit_scheme` parameter on + * this endpoint. The accepted values are: 1. `none`: The allocation will be destroyed and the + * balances will be updated but no service credit or refund will be created. 2. `credit`: The + * allocation will be destroyed and the balances will be updated and a service credit will be + * generated. This is also the default behavior if the `credit_scheme` param is not passed. 3. + * `refund`: The allocation will be destroyed and the balances will be updated and a refund will + * be issued along with a Credit Note. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component * @param allocationId Required parameter: The Advanced Billing id of the allocation @@ -651,12 +650,12 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest( * [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: 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 + * 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 + * Email, send an API call for each. See the following product documentation 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 + * Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components) + * - [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) @@ -730,15 +729,15 @@ private ApiCall prepareCreateUsageRequest( } /** - * This request will return a list of the usages associated with a subscription for a particular - * metered component. This will display the previously recorded components for a subscription. - * This endpoint is not compatible with quantity-based components. ## Since Date and Until Date - * Usage Note: The `since_date` and `until_date` attributes each default to midnight on the date - * specified. For example, in order to list usages for January 20th, you would need to append - * the following to the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage - * by Handle Use this endpoint to read the previously recorded components for a subscription. - * You can now specify either the component id (integer) or the component handle prefixed by - * "handle:" to specify the unique identifier for the component you are working with. + * Returns a list of usages associated with a subscription for a particular metered component. + * This will display the previously recorded components for a subscription. This endpoint is not + * compatible with quantity-based components. ## Since Date and Until Date Usage Note: The + * `since_date` and `until_date` attributes each default to midnight on the date specified. For + * example, in order to list usages for January 20th, you would need to append the following to + * the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage by Handle Use + * this endpoint to read the previously recorded components for a subscription. You can now + * specify either the component id (integer) or the component handle prefixed by "handle:" to + * specify the unique identifier for the component you are working with. * @param input ListUsagesInput object containing request parameters * @return Returns the List of UsageResponse response from the API call * @throws ApiException Represents error response from the server. @@ -790,9 +789,10 @@ private ApiCall, ApiException> prepareListUsagesRequest( } /** - * In order to bill your subscribers on your Events data under the Events-Based Billing feature, - * the components must be activated for the subscriber. Learn more about the role of activation - * in the [Events-Based Billing + * Activates an event-based component for a single subscription. In order to bill your + * subscribers on your Events data under the Events-Based Billing feature, the components must + * be activated for the subscriber. Learn more about the role of activation in the [Events-Based + * Billing * docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). * Use this endpoint to activate an event-based component for a single subscription. Activating * an event-based component causes Advanced Billing to bill for events when the subscription is @@ -843,9 +843,8 @@ private ApiCall prepareActivateEventBasedComponentRequest( } /** - * Use this endpoint to deactivate an event-based component for a single subscription. - * Deactivating the event-based component causes Advanced Billing to ignore related events at - * subscription renewal. + * Deactivates an event-based component for a single subscription. Deactivating the event-based + * component causes Advanced Billing to ignore related events at subscription renewal. * @param subscriptionId Required parameter: The Advanced Billing id of the subscription * @param componentId Required parameter: The Advanced Billing id of the component * @throws ApiException Represents error response from the server. @@ -883,11 +882,12 @@ private ApiCall prepareDeactivateEventBasedComponentRequest( } /** - * ## Documentation Events-Based Billing is an evolved form of metered billing that is based on - * data-rich events streamed in real-time from your system to Advanced Billing. These events can - * then be transformed, enriched, or analyzed to form the computed totals of usage charges - * billed to your customers. This API allows you to stream events into the Advanced Billing data - * ingestion engine. Learn more about the feature in general in the [Events-Based Billing help + * Records a single event for Events-Based Billing. ## Documentation Events-Based Billing is an + * evolved form of metered billing that is based on data-rich events streamed in real-time from + * your system to Advanced Billing. These events can then be transformed, enriched, or analyzed + * to form the computed totals of usage charges billed to your customers. This API allows you to + * stream events into the Advanced Billing data ingestion engine. Learn more about the feature + * in general in the [Events-Based Billing help * docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). * ## Record Event Use this endpoint to record a single event. *Note: this endpoint differs from * the standard Chargify API endpoints in that the URL subdomain will be `events` and your site @@ -939,10 +939,10 @@ private ApiCall prepareRecordEventRequest( } /** - * Use this endpoint to record a collection of events. *Note: this endpoint differs from the - * standard Chargify API endpoints in that the subdomain will be `events` and your site - * subdomain will be included in the URL path.* A maximum of 1000 events can be published in a - * single request. A 422 will be returned if this limit is exceeded. + * Records a collection of events. *Note: this endpoint differs from the standard Chargify API + * endpoints in that the subdomain will be `events` and your site subdomain will be included in + * the URL path.* A maximum of 1000 events can be published in a single request. A 422 will be + * returned if this limit is exceeded. * @param apiHandle Required parameter: Identifies the Stream for which the events should be * published. * @param storeUid Optional parameter: If you've attached your own Keen project as an Advanced @@ -989,7 +989,7 @@ private ApiCall prepareBulkRecordEventsRequest( } /** - * This request will list components applied to each subscription. + * Lists components applied to each subscription. * @param input ListSubscriptionComponentsForSiteInput object containing request parameters * @return Returns the ListSubscriptionComponentsResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java index 160b26b0..794f74c2 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java @@ -39,9 +39,9 @@ public SubscriptionGroupInvoiceAccountController(GlobalConfiguration globalConfi } /** - * A prepayment can be added for a subscription group identified by the group's `uid`. This - * endpoint requires a `amount`, `details`, `method`, and `memo`. On success, the prepayment - * will be added to the group's prepayment balance. + * Adds a prepayment for a subscription group. This endpoint requires an `amount`, `details`, + * `method`, and `memo`. On success, the prepayment will be added to the group's prepayment + * balance. * @param uid Required parameter: The uid of the subscription group * @param body Optional parameter: * @return Returns the SubscriptionGroupPrepaymentResponse response from the API call @@ -88,7 +88,7 @@ private ApiCall prepareCreate } /** - * This request will list a subscription group's prepayments. + * Lists a subscription group's prepayments. * @param input ListPrepaymentsForSubscriptionGroupInput object containing request parameters * @return Returns the ListSubscriptionGroupPrepaymentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -134,9 +134,9 @@ private ApiCall prepareLi } /** - * Credit can be issued for a subscription group identified by the group's `uid`. Credit will be - * added to the group in the amount specified in the request body. The credit will be applied to - * group member invoices as they are generated. + * Issues service credit for a subscription group. Credit will be added to the group in the + * amount specified in the request body. The credit will be applied to group member invoices as + * they are generated. * @param uid Required parameter: The uid of the subscription group * @param body Optional parameter: * @return Returns the ServiceCreditResponse response from the API call @@ -183,8 +183,8 @@ private ApiCall prepareIssueSubscriptionGro } /** - * Credit can be deducted for a subscription group identified by the group's `uid`. Credit will - * be deducted from the group in the amount specified in the request body. + * Deducts service credit for a subscription group. Credit will be deducted from the group in + * the amount specified in the request body. * @param uid Required parameter: The uid of the subscription group * @param body Optional parameter: * @return Returns the ServiceCredit response from the API call diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java index a9aafda2..a414552e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java @@ -82,10 +82,10 @@ 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 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. + * Schedules 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. * @param uid Required parameter: The uid of the subscription group * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -121,9 +121,10 @@ private ApiCall prepareInitiateDelayedCancellationForGroupRe } /** - * Removing the delayed cancellation on a subscription group will ensure that the subscriptions - * do not get canceled at the end of the period. The request will reset the - * `cancel_at_end_of_period` flag to false on each member in the group. + * Removes the delayed cancellation on a subscription group. Removing the delayed cancellation + * on a subscription group will ensure that the subscriptions do not get canceled at the end of + * the period. The request will reset the `cancel_at_end_of_period` flag to false on each member + * in the group. * @param uid Required parameter: The uid of the subscription group * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -159,30 +160,36 @@ private ApiCall prepareCancelDelayedCancellationForGroupRequ } /** - * This endpoint will attempt to reactivate or resume a cancelled subscription group. Upon - * reactivation, any canceled invoices created after the beginning of the primary subscription's - * billing period will be reopened and payment will be attempted on them. If the subscription - * group is being reactivated (as opposed to resumed), new charges will also be assessed for the - * new billing period. Whether a subscription group is reactivated (a new billing period is - * created) or resumed (the current billing period is respected) will depend on the parameters - * that are sent with the request as well as the date of the request relative to the primary - * subscription's period. ## Reactivating within the current period If a subscription group is - * cancelled and reactivated within the primary subscription's current period, we can choose to - * either start a new billing period or maintain the existing one. If we want to maintain the - * existing billing period the `resume=true` option must be passed in request parameters. An - * exception to the above are subscriptions that are on calendar billing. These subscriptions - * cannot be reactivated within the current period. If the `resume=true` option is not passed - * the request will return an error. The `resume_members` option is ignored in this case. All - * eligible group members will be automatically resumed. ## Reactivating beyond the current - * period In this case, a subscription group can only be reactivated with a new billing period. - * If the `resume=true` option is passed it will be ignored. Member subscriptions can have - * billing periods that are longer than the primary (e.g. a monthly primary with annual group - * members). If the primary subscription in a group cannot be reactivated within the current - * period, but other group members can be, passing `resume_members=true` will resume the - * existing billing period for eligible group members. The primary subscription will begin a new - * billing period. For calendar billing subscriptions, the new billing period created will be a - * partial one, spanning from the date of reactivation to the next corresponding calendar - * renewal date. + * Reactivates or resumes a cancelled subscription group. Upon reactivation, any canceled + * invoices created after the beginning of the primary subscription's billing period will be + * reopened and payment will be attempted on them. If the subscription group is being + * reactivated (as opposed to resumed), new charges will also be assessed for the new billing + * period. Whether a subscription group is reactivated (a new billing period is created) or + * resumed (the current billing period is respected) will depend on the parameters that are sent + * with the request as well as the date of the request relative to the primary subscription's + * period. ## Reactivating within the current period If a subscription group is cancelled and + * reactivated within the primary subscription's current period, we can choose to either start a + * new billing period or maintain the existing one. If we want to maintain the existing billing + * period, the `resume=true` option must be passed in request parameters. An exception to the + * above are subscriptions that are on calendar billing. These subscriptions cannot be + * reactivated within the current period. If the `resume=true` option is not passed, the request + * will return an error. The `resume_members` option is ignored in this case. All eligible group + * members will be automatically resumed. ## Reactivating beyond the current period In this + * case, a subscription group can only be reactivated with a new billing period. If the + * `resume=true` option is passed it will be ignored. Member subscriptions can have billing + * periods that are longer than the primary (e.g. a monthly primary with annual group members). + * If the primary subscription in a group cannot be reactivated within the current period, but + * other group members can be, passing `resume_members=true` will resume the existing billing + * period for eligible group members. The primary subscription will begin a new billing period. + * For calendar billing subscriptions, the new billing period created will be a partial one, + * spanning from the date of reactivation to the next corresponding calendar renewal date. ## 3D + * Secure (3DS) Authentication post-authentication flow When a payment requires 3DS + * Authentication to adhere to Strong Customer Authentication (SCA), the request enters a + * post-authentication flow where a 422 Unprocessable Entity status is returned with an + * action_link that will direct the customer through 3DS Authentication. See the [3D Secure + * Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param uid Required parameter: The uid of the subscription group * @param body Optional parameter: * @return Returns the ReactivateSubscriptionGroupResponse response from the API call diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index 030140ae..e85b0913 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -47,18 +47,18 @@ public SubscriptionGroupsController(GlobalConfiguration globalConfig) { } /** - * Create multiple subscriptions at once under the same customer and consolidate them into a + * Creates multiple subscriptions at once under the same customer and consolidates them into a * subscription group. You must provide one and only one of the * `payer_id`/`payer_reference`/`payer_attributes` for the customer attached to the group. You * must provide one and only one of the * `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 + * attribute set. When passing a 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. + * secure chargify_token generated by Maxio.js (formerly Chargify.js). * @param body Optional parameter: * @return Returns the SubscriptionGroupSignupResponse response from the API call * @throws ApiException Represents error response from the server. @@ -187,10 +187,9 @@ private ApiCall prepareListSubscri } /** - * Use this endpoint to find subscription group details. #### Current Billing Amount in Cents - * Current billing amount for the subscription group is not returned by default. If this - * information is desired, the `include[]=current_billing_amount_in_cents` parameter must be - * provided with the request. + * Returns subscription group details. #### Current Billing Amount in Cents Current billing + * amount for the subscription group is not returned by default. If this information is desired, + * the `include[]=current_billing_amount_in_cents` parameter must be provided with the request. * @param uid Required parameter: The uid of the subscription group * @param include Optional parameter: Allows including additional data in the response. Use in * query: `include[]=current_billing_amount_in_cents`. @@ -233,10 +232,10 @@ private ApiCall prepareReadSubscrip } /** - * Use this endpoint to update subscription group members. `"member_ids"` should contain an - * array of both subscription IDs to set as group members and subscription IDs already present - * in the groups. Not including them will result in removing them from subscription group. To - * clean up members, just leave the array empty. + * Updates subscription group members. `"member_ids"` should contain an array of both + * subscription IDs to set as group members and subscription IDs already present in the groups. + * Not including them will result in removing them from the subscription group. To clean up + * members, just leave the array empty. * @param uid Required parameter: The uid of the subscription group * @param body Optional parameter: * @return Returns the SubscriptionGroupResponse response from the API call @@ -323,8 +322,8 @@ private ApiCall prepareDeleteSubs } /** - * Use this endpoint to find subscription group associated with subscription. If the - * subscription is not in a group endpoint will return 404 code. + * Finds the subscription group associated with a subscription. If the subscription is not in a + * group, the endpoint will return a 404 code. * @param subscriptionId Required parameter: The Advanced Billing id of the subscription * associated with the subscription group * @return Returns the FullSubscriptionGroupResponse response from the API call @@ -433,7 +432,7 @@ private ApiCall prepareAddSubscriptionT * 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#customer-hierarchies) - * features, it is possible to remove existing subscription from subscription group. + * features, it is possible to remove an existing subscription from a subscription group. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index a3564fa1..d966800c 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -82,11 +82,18 @@ private ApiCall prepareReadAccountBalancesRequest } /** - * ## Create Prepayment In order to specify a prepayment made against a subscription, specify - * 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. Note that passing `amount_in_cents` is now allowed. + * Creates a prepayment for a subscription. In order to specify a prepayment made against a + * subscription, specify 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. Note that passing `amount_in_cents` is now + * allowed. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires + * 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a + * post-authentication flow where a 422 Unprocessable Entity status is returned with an + * action_link that will direct the customer through 3DS Authentication. See the [3D Secure + * Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the CreatePrepaymentResponse response from the API call @@ -133,7 +140,7 @@ private ApiCall prepareCreatePrepaymentR } /** - * This request will list a subscription's prepayments. + * Lists a subscription's prepayments. * @param input ListPrepaymentsInput object containing request parameters * @return Returns the PrepaymentsResponse response from the API call * @throws ApiException Represents error response from the server. @@ -179,8 +186,8 @@ private ApiCall prepareListPrepaymentsRequest } /** - * Credit will be added to the subscription in the amount specified in the request body. The - * credit is subsequently applied to the next generated invoice. + * Adds a service credit to the subscription in the specified amount. The credit is subsequently + * applied to the next generated invoice. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the ServiceCredit response from the API call @@ -227,8 +234,8 @@ private ApiCall prepareIssueServiceCreditRequest( } /** - * Credit will be removed from the subscription in the amount specified in the request body. The - * credit amount being deducted must be equal to or less than the current credit balance. + * Deducts a service credit from the subscription in the specified amount. The credit amount + * being deducted must be equal to or less than the current credit balance. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @throws ApiException Represents error response from the server. @@ -271,7 +278,7 @@ private ApiCall prepareDeductServiceCreditRequest( } /** - * This request will list a subscription's service credits. + * Lists a subscription's service credits. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param page Optional parameter: Result records are organized in pages. By default, the * first page of results is displayed. The page parameter specifies a page number of @@ -337,10 +344,10 @@ private ApiCall prepareListServiceCred } /** - * This endpoint will refund, completely or partially, a particular prepayment applied to a - * subscription. The `prepayment_id` will be the account transaction ID of the original payment. - * The prepayment must have some amount remaining in order to be refunded. The amount may be - * passed either as a decimal, with `amount`, or an integer in cents, with `amount_in_cents`. + * Refunds a prepayment applied to a subscription, either fully or partially. The + * `prepayment_id` will be the account transaction ID of the original payment. The prepayment + * must have some amount remaining in order to be refunded. The amount may be passed either as a + * decimal, with `amount`, or an integer in cents, with `amount_in_cents`. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param prepaymentId Required parameter: id of prepayment * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java index 03243e65..58610c1e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java @@ -35,10 +35,10 @@ public SubscriptionNotesController(GlobalConfiguration globalConfig) { } /** - * Use the following method to create a note for a subscription. ## How to Use Subscription - * Notes Notes allow you to record information about a particular Subscription in a free text - * format. If you have structured data such as birth date, color, etc., consider using Metadata - * instead. Full documentation on how to use Notes in the Advanced Billing UI can be located + * Creates a note for a subscription. ## How to Use Subscription Notes Notes allow you to record + * information about a particular Subscription in a free text format. If you have structured + * data such as birth date, color, etc., consider using Metadata instead. Full documentation on + * how to use Notes in the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24251712214413-Subscription-Summary-Overview). * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: @@ -86,8 +86,8 @@ private ApiCall prepareCreateSubscriptio } /** - * Use this method to retrieve a list of Notes associated with a Subscription. The response will - * be an array of Notes. + * Retrieves a list of notes associated with a subscription. The response will be an array of + * Notes. * @param input ListSubscriptionNotesInput object containing request parameters * @return Returns the List of SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. @@ -132,8 +132,7 @@ private ApiCall, ApiException> prepareListSubscri } /** - * Once you have obtained the ID of the note you wish to read, use this method to show a - * particular note attached to a subscription. + * Retrieves a specific note attached to a subscription. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param noteId Required parameter: The Advanced Billing id of the note * @return Returns the SubscriptionNoteResponse response from the API call @@ -175,7 +174,7 @@ private ApiCall prepareReadSubscriptionN } /** - * Use the following method to update a note for a Subscription. + * Updates a note for a subscription. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param noteId Required parameter: The Advanced Billing id of the note * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java index cb25ad39..c3222148 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java @@ -35,60 +35,27 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) { } /** - * In order to create a migration, you must pass the `product_id` or `product_handle` in the - * object when you send a POST request. You may also pass either a `product_price_point_id` or - * `product_price_point_handle` to choose which price point the subscription is moved to. If no - * price point identifier is passed the subscription will be moved to the products default price - * point. The response will be the updated subscription. ## Valid Subscriptions Subscriptions - * should be in the `active` or `trialing` state in order to be migrated. (For backwards - * compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` - * state via the API, however this is not recommended. Since `trial_ended` is an end-of-life - * state, the subscription should be canceled, the product changed, and then the subscription - * can be reactivated.) ## Migrations Documentation Full documentation on how to record - * Migrations in the Advanced Billing UI can be located + * Migrates a subscription to a different product. In order to create a migration, you must pass + * the `product_id` or `product_handle` in the object when you send a POST request. You may also + * pass either a `product_price_point_id` or `product_price_point_handle` to choose which price + * point the subscription is moved to. If no price point identifier is passed the subscription + * will be moved to the products default price point. The response will be the updated + * subscription. ## Valid Subscriptions Subscriptions should be in the `active` or `trialing` + * state in order to be migrated. (For backwards compatibility reasons, it is possible to + * migrate a subscription that is in the `trial_ended` state via the API, however this is not + * recommended. Since `trial_ended` is an end-of-life state, the subscription should be + * canceled, the product changed, and then the subscription 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 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 - * 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` - * ### Example Redirect Flow 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. 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. + * ## Failed Migrations Important 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. ## 3D Secure (3DS) + * Authentication post-authentication flow When a payment requires 3DS Authentication to adhere + * to Strong Customer Authentication (SCA), the request enters a post-authentication flow where + * a 422 Unprocessable Entity status is returned with an action_link that will direct the + * customer through 3DS Authentication. See the [3D Secure Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call @@ -135,11 +102,13 @@ private ApiCall prepareMigrateSubscriptionPr } /** - * ## Previewing a future date It is also possible to preview the migration for a date in the + * Previews the charges resulting from migrating a subscription to a different product. ## + * Previewing a future date It is also possible to preview the migration for a date in the * future, as long as it's still within the subscription's current billing period, by passing a - * `proration_date` along with the request (eg: `"proration_date": "2020-12-18T18:25:43.511Z"`). - * This will calculate the prorated adjustment, charge, payment and credit applied values - * assuming the migration is done at that date in the future as opposed to right now. + * `proration_date` along with the request (e.g., `"proration_date": + * "2020-12-18T18:25:43.511Z"`). This will calculate the prorated adjustment, charge, payment + * and credit applied values assuming the migration is done at that date in the future as + * opposed to right now. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionMigrationPreviewResponse response from the API call diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java index 79f86268..5e2cf14a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java @@ -39,10 +39,14 @@ public SubscriptionStatusController(GlobalConfiguration globalConfig) { } /** - * Advanced Billing offers the ability to retry collecting the balance due on a past due - * Subscription without waiting for the next scheduled attempt. ## Successful Reactivation The - * response will be `200 OK` with the updated Subscription. ## Failed Reactivation The response - * will be `422 "Unprocessable Entity`. + * Retries collecting the balance due on a past-due subscription without waiting for the next + * scheduled attempt. ## 3D Secure (3DS) Authentication post-authentication flow When a payment + * requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request + * enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an + * action_link that will direct the customer through 3DS Authentication. See the [3D Secure + * Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -135,7 +139,7 @@ private ApiCall prepareCancelSubscriptionReq } /** - * Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the + * Resumes a paused (on-hold) subscription. If the normal next renewal date has not passed, the * subscription will return to active and will renew on that date. Otherwise, it will behave * like a reactivation, setting the billing date to 'now' and charging the subscriber. * @param subscriptionId Required parameter: The Chargify id of the subscription. @@ -184,8 +188,8 @@ 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_at` date is within 24 hours. + * Places the subscription on hold, preventing it from renewing. ## Limitations 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 @@ -232,11 +236,10 @@ private ApiCall preparePauseSubscriptionRequ } /** - * Once a subscription has been paused / put on hold, you can update the date which was - * specified to automatically resume the subscription. To update a subscription's resume date, - * use this method to change or update the `automatically_resume_at` date. ### Remove the resume - * date Alternately, you can change the `automatically_resume_at` to `null` if you would like - * the subscription to not have a resume date. + * Updates the date on which a paused subscription will automatically resume. To update a + * subscription's resume date, use this method to change or update the `automatically_resume_at` + * date. ### Remove the resume date Alternatively, you can change the `automatically_resume_at` + * to `null` if you would like the subscription to not have a resume date. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call @@ -283,8 +286,8 @@ private ApiCall prepareUpdateAutomaticSubscr } /** - * Reactivate a previously canceled subscription. For details on how the reactivation works, and - * how to reactivate subscriptions through the application, see + * Reactivates 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). * **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 @@ -303,9 +306,9 @@ private ApiCall prepareUpdateAutomaticSubscr * 1st, then Advanced Billing would resume the subscription. If a reactivation with `resume: * true` were attempted _after_ what would have been the next billing date of July 1st, then * Advanced Billing would not resume the subscription, and instead it would be reactivated with - * a new billing period. If a reactivation with `resume: false`, or where 'resume" is omited + * a new billing period. If a reactivation with `resume: false`, or where 'resume' is omitted * were attempted, then Advanced Billing would reactivate the subscription with a new billing - * period regardless of whether or not resuming the previous billing period were possible. | + * period regardless of whether or not resuming the previous billing period was possible. | * Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June 28 | Yes | | Jun 15 | * July 2 | No | ## Reactivation Scenarios ### Reactivating Canceled Subscription While * Preserving Balance + Given you have a product that costs $20 + Given you have a canceled @@ -354,7 +357,13 @@ private ApiCall prepareUpdateAutomaticSubscr * subscription, and it is resumable + Send a PUT request to * `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### * Results + The subscription will transition to active + The next billing date should not have - * changed + Any product-related charges should have been collected. + * changed + Any product-related charges should have been collected ## 3D Secure (3DS) + * Authentication post-authentication flow When a payment requires 3DS Authentication to adhere + * to Strong Customer Authentication (SCA), the request enters a post-authentication flow where + * a 422 Unprocessable Entity status is returned with an action_link that will direct the + * customer through 3DS Authentication. See the [3D Secure Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call @@ -453,10 +462,10 @@ private ApiCall prepareInitiateDelaye } /** - * Removing the delayed cancellation on a subscription will ensure that it doesn't get canceled - * at the end of the period that it is in. The request will reset the `cancel_at_end_of_period` - * flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in - * the future, removing the delayed cancellation has no effect and the call will be successful. + * Removes the delayed cancellation from a subscription, ensuring it is not canceled at the end + * of the current period. The request will reset the `cancel_at_end_of_period` flag to `false`. + * This endpoint is idempotent. If the subscription was not set to cancel in the future, + * removing the delayed cancellation has no effect and the call will be successful. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the DelayedCancellationResponse response from the API call * @throws ApiException Represents error response from the server. @@ -496,8 +505,7 @@ private ApiCall prepareCancelDelayedC } /** - * If a subscription is currently in dunning, the subscription will be set to active and the - * active Dunner will be resolved. + * Cancels the active dunning process for a subscription and sets it to active. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -537,11 +545,11 @@ private ApiCall prepareCancelDunningRequest( } /** - * 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, see our documentation + * Previews a subscription’s next renewal assessment. 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, + * 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 36fbbfd4..3d0be6d6 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -51,14 +51,17 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { } /** - * 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 + * Creates a Subscription for a customer and product. Specify the product with `product_id` or + * `product_handle`. To set a specific product price point, 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 + * common scenarios for creating subscriptions. See the [Subscription + * Signups](page:introduction/basic-concepts/subscription-signup) article for more information + * on working with subscriptions in Advanced Billing. ## Payment information 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 @@ -67,11 +70,15 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * 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. + * on your end. If your business is not PCI compliant, use [Maxio.js (formerly + * 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. ## 3D Secure (3DS) Authentication + * post-authentication flow When a payment requires 3DS Authentication to adhere to Strong + * Customer Authentication (SCA), the request enters a post-authentication flow where a 422 + * Unprocessable Entity status is returned with an action_link that will direct the customer + * through 3DS Authentication. See the [3D Secure Post-Authentication + * Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) + * article in the product documentation to learn how to manage the redirect flow. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -113,7 +120,7 @@ private ApiCall prepareCreateSubscriptionReq } /** - * returns an array of subscriptions from a Site. Pay close attention to query string filters + * Returns an array of subscriptions from a Site. Pay close attention to query string filters * and pagination in order to control responses from the server. ## Search for a subscription * Use the query strings below to search for a subscription using the criteria available. The * return value will be an array. ## Self-Service Page token Self-Service Page token for the @@ -218,21 +225,21 @@ private ApiCall, ApiException> prepareListSubscriptio * 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` + * update dates for a subscription. ### 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. + * automatically set to the 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 reset to null on the next billing cycle. This is because a + * product change is instantaneous 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 @@ -324,24 +331,23 @@ private ApiCall prepareReadSubscriptionReque } /** - * This API endpoint allows you to set certain subscription fields that are usually managed for - * you automatically. Some of the fields can be set via the normal Subscriptions Update API, but - * others can only be set using this endpoint. This endpoint is provided for cases where you - * need to “align” Advanced Billing data with data that happened in your system, perhaps before - * you started using Advanced Billing. For example, you may choose to import your historical - * subscription data, and would like the activation and cancellation dates in Advanced Billing - * to match your existing historical dates. Advanced Billing does not backfill historical events - * (i.e. from the Events API), but some static data can be changed via this API. Why are some - * fields only settable from this endpoint, and not the normal subscription create and update - * endpoints? Because we want users of this endpoint to be aware that these fields are usually - * managed by Advanced Billing, and using this API means **you are stepping out on your own.** - * Changing these fields will not affect any other attributes. For example, adding an expiration - * date will not affect the next assessment date on the subscription. If you regularly need to - * override the current_period_starts_at for new subscriptions, this can also be accomplished by - * setting both `previous_billing_at` and `next_billing_at` at subscription creation. See the - * documentation on [Importing - * Subscriptions](./b3A6MTQxMDgzODg-create-subscription#subscriptions-import) for more - * information. ## Limitations When passing `current_period_starts_at` some validations are + * Sets certain subscription fields that are usually managed automatically. Some of the fields + * can be set via the normal Subscriptions Update API, but others can only be set using this + * endpoint. This endpoint is provided for cases where you need to “align” Advanced Billing data + * with data that happened in your system, perhaps before you started using Advanced Billing. + * For example, you may choose to import your historical subscription data, and would like the + * activation and cancellation dates in Advanced Billing to match your existing historical + * dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but + * some static data can be changed via this API. Why are some fields only settable from this + * endpoint, and not the normal subscription create and update endpoints? Because we want users + * of this endpoint to be aware that these fields are usually managed by Advanced Billing, and + * using this API means **you are stepping out on your own.** Changing these fields will not + * affect any other attributes. For example, adding an expiration date will not affect the next + * assessment date on the subscription. If you regularly need to override the + * current_period_starts_at for new subscriptions, this can also be accomplished by setting both + * `previous_billing_at` and `next_billing_at` at subscription creation. See the documentation + * on [Importing Subscriptions](./b3A6MTQxMDgzODg-create-subscription#subscriptions-import) for + * more information. ## Limitations When passing `current_period_starts_at` some validations are * made: 1. The subscription needs to be unbilled (no statements or invoices). 2. The value * passed must be a valid date/time. We recommend using the iso 8601 format. 3. The value passed * must be before the current date/time. If unpermitted parameters are sent, a 400 HTTP response @@ -388,7 +394,7 @@ private ApiCall prepareOverrideSubscriptionRequest( } /** - * Use this endpoint to find a subscription by its reference. + * Finds a subscription by its reference. * @param reference Optional parameter: Subscription reference * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -428,9 +434,9 @@ private ApiCall prepareFindSubscriptionReque } /** - * 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 + * Purges an individual subscription for sites in test mode. 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, * contact support to discuss your use case. ### Delete customer and payment profile The query @@ -485,7 +491,7 @@ private ApiCall preparePurgeSubscriptionRequ } /** - * Use this endpoint to update a subscription's prepaid configuration. + * Updates a subscription's prepaid configuration. * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the PrepaidConfigurationResponse response from the API call @@ -532,10 +538,10 @@ 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, see our documentation + * Previews 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, 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 @@ -591,9 +597,9 @@ private ApiCall preparePreviewSubscri } /** - * An existing subscription can accommodate multiple discounts/coupon codes. This is only - * applicable if each coupon is stackable. For more information on stackable coupons, we - * recommend reviewing our [coupon + * Applies one or more coupon codes to an existing subscription. An existing subscription can + * accommodate multiple discounts/coupon codes. This is only applicable if each coupon is + * stackable. For more information on stackable coupons, we recommend reviewing our [coupon * documentation.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#stackability-rules) * ## Query Parameters vs Request Body Parameters Passing in a coupon code as a query parameter * will add the code to the subscription, completely replacing all existing coupon codes on the @@ -653,8 +659,8 @@ 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, See our documentation + * Removes a coupon from an existing subscription. For more information on the expected behavior + * 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 @@ -699,28 +705,27 @@ private ApiCall prepareRemoveCouponFromSubscriptionRequest } /** - * Advanced Billing offers the ability to activate awaiting signup and trialing subscriptions. - * This feature is only available on the Relationship Invoicing architecture. Subscriptions in a - * group may not be activated immediately. For details on how the activation works, and how to - * activate subscriptions through the application, see [activation](#). The `revert_on_failure` - * parameter controls the behavior upon activation failure. - If set to `true` and something - * goes wrong i.e. payment fails, then Advanced Billing will not change the subscription's - * state. The subscription’s billing period will also remain the same. - If set to `false` and - * something goes wrong i.e. payment fails, then Advanced Billing will continue through with the - * activation and enter an end of life state. For trialing subscriptions, that will either be - * trial ended (if the trial is no obligation), past due (if the trial has an obligation), or - * canceled (if the site has no dunning strategy, or has a strategy that says to cancel - * immediately). For awaiting signup subscriptions, that will always be canceled. The default - * activation failure behavior can be configured per activation attempt, or you may set a - * default value under Config > Settings > Subscription Activation Settings. ## Activation - * Scenarios ### Activate Awaiting Signup subscription - Given you have a product without trial - * - Given you have a site without dunning strategy ```mermaid flowchart LR AS[Awaiting Signup] - * --> A{Activate} A -->|Success| Active A -->|Failure| ROF{revert_on_failure} ROF -->|true| AS - * ROF -->|false| Canceled ``` - Given you have a product with trial - Given you have a site - * with dunning strategy ```mermaid flowchart LR AS[Awaiting Signup] --> A{Activate} A - * -->|Success| Trialing A -->|Failure| ROF{revert_on_failure} ROF -->|true| AS ROF -->|false| - * PD[Past Due] ``` ### Activate Trialing subscription You can read more about the behavior of - * trialing subscriptions + * Activates awaiting signup and trialing subscriptions. This feature is only available on the + * Relationship Invoicing architecture. Subscriptions in a group may not be activated + * immediately. For details on how the activation works, and how to activate subscriptions + * through the application, see [activation](#). The `revert_on_failure` parameter controls the + * behavior upon activation failure. - If set to `true` and something goes wrong i.e. payment + * fails, then Advanced Billing will not change the subscription's state. The subscription’s + * billing period will also remain the same. - If set to `false` and something goes wrong i.e. + * payment fails, then Advanced Billing will continue through with the activation and enter an + * end of life state. For trialing subscriptions, that will either be trial ended (if the trial + * is no obligation), past due (if the trial has an obligation), or canceled (if the site has no + * dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup + * subscriptions, that will always be canceled. The default activation failure behavior can be + * configured per activation attempt, or you may set a default value under Config > Settings > + * Subscription Activation Settings. ## Activation Scenarios ### Activate Awaiting Signup + * subscription - Given you have a product without trial - Given you have a site without dunning + * strategy ```mermaid flowchart LR AS[Awaiting Signup] --> A{Activate} A -->|Success| Active A + * -->|Failure| ROF{revert_on_failure} ROF -->|true| AS ROF -->|false| Canceled ``` - Given you + * have a product with trial - Given you have a site with dunning strategy ```mermaid flowchart + * LR AS[Awaiting Signup] --> A{Activate} A -->|Success| Trialing A -->|Failure| + * ROF{revert_on_failure} ROF -->|true| AS ROF -->|false| PD[Past Due] ``` ### Activate Trialing + * subscription You can read more about the behavior of trialing subscriptions * [here](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). * When the `revert_on_failure` parameter is set to `true`, the subscription's state will remain * as Trialing, we will void the invoice from activation and return any prepayments and credits diff --git a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java index b976c46c..b7a69eae 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java @@ -41,9 +41,8 @@ public WebhooksController(GlobalConfiguration globalConfig) { } /** - * Allows you to view a list of webhooks. You can pass query parameters if you want to filter - * webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more - * information. + * Retrieves a list of webhooks. You can pass query parameters if you want to filter webhooks. + * See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. * @param input ListWebhooksInput object containing request parameters * @return Returns the List of WebhookResponse response from the API call * @throws ApiException Represents error response from the server. @@ -93,7 +92,7 @@ private ApiCall, ApiException> prepareListWebhooksRequest( } /** - * Allows you to enable webhooks for your site. + * Enables webhooks for your site. * @param body Optional parameter: * @return Returns the EnableWebhooksResponse response from the API call * @throws ApiException Represents error response from the server. @@ -173,7 +172,7 @@ private ApiCall prepareReplayWebhooksReque } /** - * Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. See the + * Creates an endpoint and assigns a list of webhook subscriptions (events) to it. See the * [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available * events. * @param body Optional parameter: @@ -255,8 +254,8 @@ private ApiCall, ApiException> prepareListEndpointsRequest() { * Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. * Always send a complete list of events to which you want to subscribe. Sending a PUT request * for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all - * events. If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` - * without the specific event key. + * events. If you want to unsubscribe from a specific event, send a list of + * `webhook_subscriptions` without the specific event key. * @param endpointId Required parameter: The Advanced Billing id for the endpoint that should * be updated * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java b/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java index 814d78fd..53cbc8f8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java @@ -64,9 +64,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @return Returns the BillingSchedule */ @JsonGetter("billing_schedule") @@ -77,9 +77,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @param billingSchedule Value for BillingSchedule */ @JsonSetter("billing_schedule") diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java index 358346ba..c04e7e25 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java @@ -37,8 +37,8 @@ public class BankAccountPaymentProfile private OptionalNullable customerVaultToken; private OptionalNullable billingAddress2; private String bankName; - private String maskedBankRoutingNumber; - private String maskedBankAccountNumber; + private OptionalNullable maskedBankRoutingNumber; + private OptionalNullable maskedBankAccountNumber; private BankAccountType bankAccountType; private BankAccountHolderType bankAccountHolderType; private PaymentType paymentType; @@ -58,7 +58,6 @@ public BankAccountPaymentProfile() { /** * Initialization constructor. - * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param paymentType PaymentType value for paymentType. * @param id Integer value for id. * @param firstName String value for firstName. @@ -75,6 +74,7 @@ public BankAccountPaymentProfile() { * @param billingAddress2 String value for billingAddress2. * @param bankName String value for bankName. * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param bankAccountType BankAccountType value for bankAccountType. * @param bankAccountHolderType BankAccountHolderType value for bankAccountHolderType. * @param verified Boolean value for verified. @@ -84,7 +84,6 @@ public BankAccountPaymentProfile() { * @param updatedAt ZonedDateTime value for updatedAt. */ public BankAccountPaymentProfile( - String maskedBankAccountNumber, PaymentType paymentType, Integer id, String firstName, @@ -101,6 +100,7 @@ public BankAccountPaymentProfile( String billingAddress2, String bankName, String maskedBankRoutingNumber, + String maskedBankAccountNumber, BankAccountType bankAccountType, BankAccountHolderType bankAccountHolderType, Boolean verified, @@ -122,8 +122,8 @@ public BankAccountPaymentProfile( this.customerVaultToken = OptionalNullable.of(customerVaultToken); this.billingAddress2 = OptionalNullable.of(billingAddress2); this.bankName = bankName; - this.maskedBankRoutingNumber = maskedBankRoutingNumber; - this.maskedBankAccountNumber = maskedBankAccountNumber; + this.maskedBankRoutingNumber = OptionalNullable.of(maskedBankRoutingNumber); + this.maskedBankAccountNumber = OptionalNullable.of(maskedBankAccountNumber); this.bankAccountType = bankAccountType; this.bankAccountHolderType = bankAccountHolderType; this.paymentType = paymentType; @@ -136,7 +136,6 @@ public BankAccountPaymentProfile( /** * Initialization constructor. - * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param paymentType PaymentType value for paymentType. * @param id Integer value for id. * @param firstName String value for firstName. @@ -153,6 +152,7 @@ public BankAccountPaymentProfile( * @param billingAddress2 String value for billingAddress2. * @param bankName String value for bankName. * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param bankAccountType BankAccountType value for bankAccountType. * @param bankAccountHolderType BankAccountHolderType value for bankAccountHolderType. * @param verified Boolean value for verified. @@ -162,14 +162,14 @@ public BankAccountPaymentProfile( * @param updatedAt ZonedDateTime value for updatedAt. */ - protected BankAccountPaymentProfile(String maskedBankAccountNumber, PaymentType paymentType, - Integer id, String firstName, String lastName, Integer customerId, - BankAccountVault currentVault, String vaultToken, + protected BankAccountPaymentProfile(PaymentType paymentType, Integer id, String firstName, + String lastName, Integer customerId, BankAccountVault currentVault, String vaultToken, OptionalNullable billingAddress, OptionalNullable billingCity, OptionalNullable billingState, OptionalNullable billingZip, OptionalNullable billingCountry, OptionalNullable customerVaultToken, OptionalNullable billingAddress2, String bankName, - String maskedBankRoutingNumber, BankAccountType bankAccountType, + OptionalNullable maskedBankRoutingNumber, + OptionalNullable maskedBankAccountNumber, BankAccountType bankAccountType, BankAccountHolderType bankAccountHolderType, Boolean verified, OptionalNullable siteGatewaySettingId, OptionalNullable gatewayHandle, ZonedDateTime createdAt, ZonedDateTime updatedAt) { @@ -201,18 +201,16 @@ protected BankAccountPaymentProfile(String maskedBankAccountNumber, PaymentType /** * Initialization constructor. - * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param paymentType PaymentType value for paymentType. */ @JsonCreator protected BankAccountPaymentProfile( - @JsonProperty("masked_bank_account_number") String maskedBankAccountNumber, @JsonProperty("payment_type") PaymentType paymentType) { - this(maskedBankAccountNumber, paymentType, null, null, null, null, null, null, + this(paymentType, null, null, null, null, null, null, OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), - OptionalNullable.of(null), null, null, null, null, null, OptionalNullable.of(null), - OptionalNullable.of(null), null, null); + null, OptionalNullable.of(null), OptionalNullable.of(null), null, null, null, + OptionalNullable.of(null), OptionalNullable.of(null), null, null); unsetBillingAddress(); unsetBillingCity(); unsetBillingState(); @@ -220,6 +218,8 @@ protected BankAccountPaymentProfile( unsetBillingCountry(); unsetCustomerVaultToken(); unsetBillingAddress2(); + unsetMaskedBankRoutingNumber(); + unsetMaskedBankAccountNumber(); unsetSiteGatewaySettingId(); unsetGatewayHandle(); } @@ -337,7 +337,7 @@ public void setCurrentVault(BankAccountVault currentVault) { /** * Getter for VaultToken. - * The “token” provided by your vault storage for an already stored payment profile + * The "token" provided by your vault storage for an already stored payment profile * @return Returns the String */ @JsonGetter("vault_token") @@ -348,7 +348,7 @@ public String getVaultToken() { /** * Setter for VaultToken. - * The “token” provided by your vault storage for an already stored payment profile + * The "token" provided by your vault storage for an already stored payment profile * @param vaultToken Value for String */ @JsonSetter("vault_token") @@ -655,48 +655,89 @@ public void setBankName(String bankName) { } /** - * Getter for MaskedBankRoutingNumber. + * Internal Getter for MaskedBankRoutingNumber. * A string representation of the stored bank routing number with all but the last 4 digits - * marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be bank_account - * @return Returns the String + * marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account + * @return Returns the Internal String */ @JsonGetter("masked_bank_routing_number") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMaskedBankRoutingNumber() { + return this.maskedBankRoutingNumber; + } + + /** + * Getter for MaskedBankRoutingNumber. + * A string representation of the stored bank routing number with all but the last 4 digits + * marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account + * @return Returns the String + */ public String getMaskedBankRoutingNumber() { - return maskedBankRoutingNumber; + return OptionalNullable.getFrom(maskedBankRoutingNumber); } /** * Setter for MaskedBankRoutingNumber. * A string representation of the stored bank routing number with all but the last 4 digits - * marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be bank_account + * marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account * @param maskedBankRoutingNumber Value for String */ @JsonSetter("masked_bank_routing_number") public void setMaskedBankRoutingNumber(String maskedBankRoutingNumber) { - this.maskedBankRoutingNumber = maskedBankRoutingNumber; + this.maskedBankRoutingNumber = OptionalNullable.of(maskedBankRoutingNumber); + } + + /** + * UnSetter for MaskedBankRoutingNumber. + * A string representation of the stored bank routing number with all but the last 4 digits + * marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account + */ + public void unsetMaskedBankRoutingNumber() { + maskedBankRoutingNumber = null; + } + + /** + * Internal Getter for MaskedBankAccountNumber. + * A string representation of the stored bank account number with all but the last 4 digits + * marked with X's (i.e. 'XXXXXXX1111') + * @return Returns the Internal String + */ + @JsonGetter("masked_bank_account_number") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMaskedBankAccountNumber() { + return this.maskedBankAccountNumber; } /** * Getter for MaskedBankAccountNumber. * A string representation of the stored bank account number with all but the last 4 digits - * marked with X’s (i.e. ‘XXXXXXX1111’) + * marked with X's (i.e. 'XXXXXXX1111') * @return Returns the String */ - @JsonGetter("masked_bank_account_number") public String getMaskedBankAccountNumber() { - return maskedBankAccountNumber; + return OptionalNullable.getFrom(maskedBankAccountNumber); } /** * Setter for MaskedBankAccountNumber. * A string representation of the stored bank account number with all but the last 4 digits - * marked with X’s (i.e. ‘XXXXXXX1111’) + * marked with X's (i.e. 'XXXXXXX1111') * @param maskedBankAccountNumber Value for String */ @JsonSetter("masked_bank_account_number") public void setMaskedBankAccountNumber(String maskedBankAccountNumber) { - this.maskedBankAccountNumber = maskedBankAccountNumber; + this.maskedBankAccountNumber = OptionalNullable.of(maskedBankAccountNumber); + } + + /** + * UnSetter for MaskedBankAccountNumber. + * A string representation of the stored bank account number with all but the last 4 digits + * marked with X's (i.e. 'XXXXXXX1111') + */ + public void unsetMaskedBankAccountNumber() { + maskedBankAccountNumber = null; } /** @@ -904,19 +945,19 @@ public void setUpdatedAt(ZonedDateTime updatedAt) { */ @Override public String toString() { - return "BankAccountPaymentProfile [" + "maskedBankAccountNumber=" + maskedBankAccountNumber - + ", paymentType=" + paymentType + ", id=" + id + ", firstName=" + firstName - + ", lastName=" + lastName + ", customerId=" + customerId + ", currentVault=" - + currentVault + ", vaultToken=" + vaultToken + ", billingAddress=" + billingAddress - + ", billingCity=" + billingCity + ", billingState=" + billingState - + ", billingZip=" + billingZip + ", billingCountry=" + billingCountry - + ", customerVaultToken=" + customerVaultToken + ", billingAddress2=" - + billingAddress2 + ", bankName=" + bankName + ", maskedBankRoutingNumber=" - + maskedBankRoutingNumber + ", bankAccountType=" + bankAccountType - + ", bankAccountHolderType=" + bankAccountHolderType + ", verified=" + verified - + ", siteGatewaySettingId=" + siteGatewaySettingId + ", gatewayHandle=" - + gatewayHandle + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt - + ", additionalProperties=" + getAdditionalProperties() + "]"; + return "BankAccountPaymentProfile [" + "paymentType=" + paymentType + ", id=" + id + + ", firstName=" + firstName + ", lastName=" + lastName + ", customerId=" + + customerId + ", currentVault=" + currentVault + ", vaultToken=" + vaultToken + + ", billingAddress=" + billingAddress + ", billingCity=" + billingCity + + ", billingState=" + billingState + ", billingZip=" + billingZip + + ", billingCountry=" + billingCountry + ", customerVaultToken=" + + customerVaultToken + ", billingAddress2=" + billingAddress2 + ", bankName=" + + bankName + ", maskedBankRoutingNumber=" + maskedBankRoutingNumber + + ", maskedBankAccountNumber=" + maskedBankAccountNumber + ", bankAccountType=" + + bankAccountType + ", bankAccountHolderType=" + bankAccountHolderType + + ", verified=" + verified + ", siteGatewaySettingId=" + siteGatewaySettingId + + ", gatewayHandle=" + gatewayHandle + ", createdAt=" + createdAt + ", updatedAt=" + + updatedAt + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -925,7 +966,7 @@ public String toString() { * @return a new {@link BankAccountPaymentProfile.Builder} object */ public Builder toBuilder() { - Builder builder = new Builder(maskedBankAccountNumber, paymentType) + Builder builder = new Builder(paymentType) .id(getId()) .firstName(getFirstName()) .lastName(getLastName()) @@ -933,7 +974,6 @@ public Builder toBuilder() { .currentVault(getCurrentVault()) .vaultToken(getVaultToken()) .bankName(getBankName()) - .maskedBankRoutingNumber(getMaskedBankRoutingNumber()) .bankAccountType(getBankAccountType()) .bankAccountHolderType(getBankAccountHolderType()) .verified(getVerified()) @@ -946,6 +986,8 @@ public Builder toBuilder() { builder.billingCountry = internalGetBillingCountry(); builder.customerVaultToken = internalGetCustomerVaultToken(); builder.billingAddress2 = internalGetBillingAddress2(); + builder.maskedBankRoutingNumber = internalGetMaskedBankRoutingNumber(); + builder.maskedBankAccountNumber = internalGetMaskedBankAccountNumber(); builder.siteGatewaySettingId = internalGetSiteGatewaySettingId(); builder.gatewayHandle = internalGetGatewayHandle(); return builder; @@ -955,7 +997,6 @@ public Builder toBuilder() { * Class to build instances of {@link BankAccountPaymentProfile}. */ public static class Builder { - private String maskedBankAccountNumber; private PaymentType paymentType = PaymentType.BANK_ACCOUNT; private Integer id; private String firstName; @@ -971,7 +1012,8 @@ public static class Builder { private OptionalNullable customerVaultToken; private OptionalNullable billingAddress2; private String bankName; - private String maskedBankRoutingNumber; + private OptionalNullable maskedBankRoutingNumber; + private OptionalNullable maskedBankAccountNumber; private BankAccountType bankAccountType; private BankAccountHolderType bankAccountHolderType; private Boolean verified = false; @@ -988,24 +1030,12 @@ public Builder() { /** * Initialization constructor. - * @param maskedBankAccountNumber String value for maskedBankAccountNumber. * @param paymentType PaymentType value for paymentType. */ - public Builder(String maskedBankAccountNumber, PaymentType paymentType) { - this.maskedBankAccountNumber = maskedBankAccountNumber; + public Builder(PaymentType paymentType) { this.paymentType = paymentType; } - /** - * Setter for maskedBankAccountNumber. - * @param maskedBankAccountNumber String value for maskedBankAccountNumber. - * @return Builder - */ - public Builder maskedBankAccountNumber(String maskedBankAccountNumber) { - this.maskedBankAccountNumber = maskedBankAccountNumber; - return this; - } - /** * Setter for paymentType. * @param paymentType PaymentType value for paymentType. @@ -1225,7 +1255,35 @@ public Builder bankName(String bankName) { * @return Builder */ public Builder maskedBankRoutingNumber(String maskedBankRoutingNumber) { - this.maskedBankRoutingNumber = maskedBankRoutingNumber; + this.maskedBankRoutingNumber = OptionalNullable.of(maskedBankRoutingNumber); + return this; + } + + /** + * UnSetter for maskedBankRoutingNumber. + * @return Builder + */ + public Builder unsetMaskedBankRoutingNumber() { + maskedBankRoutingNumber = null; + return this; + } + + /** + * Setter for maskedBankAccountNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. + * @return Builder + */ + public Builder maskedBankAccountNumber(String maskedBankAccountNumber) { + this.maskedBankAccountNumber = OptionalNullable.of(maskedBankAccountNumber); + return this; + } + + /** + * UnSetter for maskedBankAccountNumber. + * @return Builder + */ + public Builder unsetMaskedBankAccountNumber() { + maskedBankAccountNumber = null; return this; } @@ -1322,10 +1380,10 @@ public Builder updatedAt(ZonedDateTime updatedAt) { * @return {@link BankAccountPaymentProfile} */ public BankAccountPaymentProfile build() { - return new BankAccountPaymentProfile(maskedBankAccountNumber, paymentType, id, - firstName, lastName, customerId, currentVault, vaultToken, billingAddress, - billingCity, billingState, billingZip, billingCountry, customerVaultToken, - billingAddress2, bankName, maskedBankRoutingNumber, bankAccountType, + return new BankAccountPaymentProfile(paymentType, id, firstName, lastName, customerId, + currentVault, vaultToken, billingAddress, billingCity, billingState, billingZip, + billingCountry, customerVaultToken, billingAddress2, bankName, + maskedBankRoutingNumber, maskedBankAccountNumber, bankAccountType, bankAccountHolderType, verified, siteGatewaySettingId, gatewayHandle, createdAt, updatedAt); } diff --git a/src/main/java/com/maxio/advancedbilling/models/BillingSchedule.java b/src/main/java/com/maxio/advancedbilling/models/BillingSchedule.java index 1a783ed1..0c0c490c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BillingSchedule.java +++ b/src/main/java/com/maxio/advancedbilling/models/BillingSchedule.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.DateTimeHelper; import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; import java.time.LocalDate; /** @@ -20,7 +21,7 @@ */ public class BillingSchedule extends BaseModel { - private LocalDate initialBillingAt; + private OptionalNullable initialBillingAt; /** * Default constructor. @@ -34,34 +35,64 @@ public BillingSchedule() { */ public BillingSchedule( LocalDate initialBillingAt) { + this.initialBillingAt = OptionalNullable.of(initialBillingAt); + } + + /** + * Initialization constructor. + * @param initialBillingAt LocalDate value for initialBillingAt. + */ + + protected BillingSchedule(OptionalNullable initialBillingAt) { this.initialBillingAt = initialBillingAt; } /** - * Getter for InitialBillingAt. - * The initial_billing_at attribute in Maxio allows you to specify a custom starting date for - * billing cycles associated with components that have their own billing frequency set. Only - * ISO8601 format is supported. - * @return Returns the LocalDate + * Internal Getter for InitialBillingAt. + * Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If + * omitted or null, billing aligns with the product schedule. If provided, date must be on or + * after the minimum allowed date for the subscription or component. + * @return Returns the Internal LocalDate */ @JsonGetter("initial_billing_at") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + @JsonSerialize(using = OptionalNullable.SimpleDateSerializer.class) + protected OptionalNullable internalGetInitialBillingAt() { + return this.initialBillingAt; + } + + /** + * Getter for InitialBillingAt. + * Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If + * omitted or null, billing aligns with the product schedule. If provided, date must be on or + * after the minimum allowed date for the subscription or component. + * @return Returns the LocalDate + */ public LocalDate getInitialBillingAt() { - return initialBillingAt; + return OptionalNullable.getFrom(initialBillingAt); } /** * Setter for InitialBillingAt. - * The initial_billing_at attribute in Maxio allows you to specify a custom starting date for - * billing cycles associated with components that have their own billing frequency set. Only - * ISO8601 format is supported. + * Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If + * omitted or null, billing aligns with the product schedule. If provided, date must be on or + * after the minimum allowed date for the subscription or component. * @param initialBillingAt Value for LocalDate */ @JsonSetter("initial_billing_at") @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) public void setInitialBillingAt(LocalDate initialBillingAt) { - this.initialBillingAt = initialBillingAt; + this.initialBillingAt = OptionalNullable.of(initialBillingAt); + } + + /** + * UnSetter for InitialBillingAt. + * Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If + * omitted or null, billing aligns with the product schedule. If provided, date must be on or + * after the minimum allowed date for the subscription or component. + */ + public void unsetInitialBillingAt() { + initialBillingAt = null; } /** @@ -80,8 +111,8 @@ public String toString() { * @return a new {@link BillingSchedule.Builder} object */ public Builder toBuilder() { - Builder builder = new Builder() - .initialBillingAt(getInitialBillingAt()); + Builder builder = new Builder(); + builder.initialBillingAt = internalGetInitialBillingAt(); return builder; } @@ -89,7 +120,7 @@ public Builder toBuilder() { * Class to build instances of {@link BillingSchedule}. */ public static class Builder { - private LocalDate initialBillingAt; + private OptionalNullable initialBillingAt; @@ -99,7 +130,16 @@ public static class Builder { * @return Builder */ public Builder initialBillingAt(LocalDate initialBillingAt) { - this.initialBillingAt = initialBillingAt; + this.initialBillingAt = OptionalNullable.of(initialBillingAt); + return this; + } + + /** + * UnSetter for initialBillingAt. + * @return Builder + */ + public Builder unsetInitialBillingAt() { + initialBillingAt = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationFailure.java b/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationFailure.java new file mode 100644 index 00000000..9cf4aaf3 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationFailure.java @@ -0,0 +1,164 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ChjsTokenizationFailure type. + */ +public class ChjsTokenizationFailure + extends BaseModel { + private String errors; + private PaymentProfileParams paymentProfileParams; + + /** + * Default constructor. + */ + public ChjsTokenizationFailure() { + } + + /** + * Initialization constructor. + * @param errors String value for errors. + * @param paymentProfileParams PaymentProfileParams value for paymentProfileParams. + */ + public ChjsTokenizationFailure( + String errors, + PaymentProfileParams paymentProfileParams) { + this.errors = errors; + this.paymentProfileParams = paymentProfileParams; + } + + /** + * Initialization constructor. + * @param errors String value for errors. + */ + @JsonCreator + protected ChjsTokenizationFailure( + @JsonProperty("errors") String errors) { + this(errors, null); + } + + /** + * Getter for Errors. + * @return Returns the String + */ + @JsonGetter("errors") + public String getErrors() { + return errors; + } + + /** + * Setter for Errors. + * @param errors Value for String + */ + @JsonSetter("errors") + public void setErrors(String errors) { + this.errors = errors; + } + + /** + * Getter for PaymentProfileParams. + * PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never + * included. + * @return Returns the PaymentProfileParams + */ + @JsonGetter("payment_profile_params") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PaymentProfileParams getPaymentProfileParams() { + return paymentProfileParams; + } + + /** + * Setter for PaymentProfileParams. + * PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never + * included. + * @param paymentProfileParams Value for PaymentProfileParams + */ + @JsonSetter("payment_profile_params") + public void setPaymentProfileParams(PaymentProfileParams paymentProfileParams) { + this.paymentProfileParams = paymentProfileParams; + } + + /** + * Converts this ChjsTokenizationFailure into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ChjsTokenizationFailure [" + "errors=" + errors + ", paymentProfileParams=" + + paymentProfileParams + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link ChjsTokenizationFailure.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ChjsTokenizationFailure.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(errors) + .paymentProfileParams(getPaymentProfileParams()); + return builder; + } + + /** + * Class to build instances of {@link ChjsTokenizationFailure}. + */ + public static class Builder { + private String errors; + private PaymentProfileParams paymentProfileParams; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param errors String value for errors. + */ + public Builder(String errors) { + this.errors = errors; + } + + /** + * Setter for errors. + * @param errors String value for errors. + * @return Builder + */ + public Builder errors(String errors) { + this.errors = errors; + return this; + } + + /** + * Setter for paymentProfileParams. + * @param paymentProfileParams PaymentProfileParams value for paymentProfileParams. + * @return Builder + */ + public Builder paymentProfileParams(PaymentProfileParams paymentProfileParams) { + this.paymentProfileParams = paymentProfileParams; + return this; + } + + /** + * Builds a new {@link ChjsTokenizationFailure} object using the set fields. + * @return {@link ChjsTokenizationFailure} + */ + public ChjsTokenizationFailure build() { + return new ChjsTokenizationFailure(errors, paymentProfileParams); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationSuccess.java b/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationSuccess.java new file mode 100644 index 00000000..97c5dfb7 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ChjsTokenizationSuccess.java @@ -0,0 +1,200 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; + +/** + * This is a model class for ChjsTokenizationSuccess type. + */ +public class ChjsTokenizationSuccess + extends BaseModel { + private TokenizedPaymentProfile paymentProfile; + private OptionalNullable gatewayCustomerId; + + /** + * Default constructor. + */ + public ChjsTokenizationSuccess() { + } + + /** + * Initialization constructor. + * @param paymentProfile TokenizedPaymentProfile value for paymentProfile. + * @param gatewayCustomerId Integer value for gatewayCustomerId. + */ + public ChjsTokenizationSuccess( + TokenizedPaymentProfile paymentProfile, + Integer gatewayCustomerId) { + this.paymentProfile = paymentProfile; + this.gatewayCustomerId = OptionalNullable.of(gatewayCustomerId); + } + + /** + * Initialization constructor. + * @param paymentProfile TokenizedPaymentProfile value for paymentProfile. + * @param gatewayCustomerId Integer value for gatewayCustomerId. + */ + + protected ChjsTokenizationSuccess(TokenizedPaymentProfile paymentProfile, + OptionalNullable gatewayCustomerId) { + this.paymentProfile = paymentProfile; + this.gatewayCustomerId = gatewayCustomerId; + } + + /** + * Initialization constructor. + * @param paymentProfile TokenizedPaymentProfile value for paymentProfile. + */ + @JsonCreator + protected ChjsTokenizationSuccess( + @JsonProperty("payment_profile") TokenizedPaymentProfile paymentProfile) { + this(paymentProfile, OptionalNullable.of(null)); + unsetGatewayCustomerId(); + } + + /** + * Getter for PaymentProfile. + * @return Returns the TokenizedPaymentProfile + */ + @JsonGetter("payment_profile") + public TokenizedPaymentProfile getPaymentProfile() { + return paymentProfile; + } + + /** + * Setter for PaymentProfile. + * @param paymentProfile Value for TokenizedPaymentProfile + */ + @JsonSetter("payment_profile") + public void setPaymentProfile(TokenizedPaymentProfile paymentProfile) { + this.paymentProfile = paymentProfile; + } + + /** + * Internal Getter for GatewayCustomerId. + * @return Returns the Internal Integer + */ + @JsonGetter("gateway_customer_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetGatewayCustomerId() { + return this.gatewayCustomerId; + } + + /** + * Getter for GatewayCustomerId. + * @return Returns the Integer + */ + public Integer getGatewayCustomerId() { + return OptionalNullable.getFrom(gatewayCustomerId); + } + + /** + * Setter for GatewayCustomerId. + * @param gatewayCustomerId Value for Integer + */ + @JsonSetter("gateway_customer_id") + public void setGatewayCustomerId(Integer gatewayCustomerId) { + this.gatewayCustomerId = OptionalNullable.of(gatewayCustomerId); + } + + /** + * UnSetter for GatewayCustomerId. + */ + public void unsetGatewayCustomerId() { + gatewayCustomerId = null; + } + + /** + * Converts this ChjsTokenizationSuccess into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ChjsTokenizationSuccess [" + "paymentProfile=" + paymentProfile + + ", gatewayCustomerId=" + gatewayCustomerId + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ChjsTokenizationSuccess.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ChjsTokenizationSuccess.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(paymentProfile); + builder.gatewayCustomerId = internalGetGatewayCustomerId(); + return builder; + } + + /** + * Class to build instances of {@link ChjsTokenizationSuccess}. + */ + public static class Builder { + private TokenizedPaymentProfile paymentProfile; + private OptionalNullable gatewayCustomerId; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param paymentProfile TokenizedPaymentProfile value for paymentProfile. + */ + public Builder(TokenizedPaymentProfile paymentProfile) { + this.paymentProfile = paymentProfile; + } + + /** + * Setter for paymentProfile. + * @param paymentProfile TokenizedPaymentProfile value for paymentProfile. + * @return Builder + */ + public Builder paymentProfile(TokenizedPaymentProfile paymentProfile) { + this.paymentProfile = paymentProfile; + return this; + } + + /** + * Setter for gatewayCustomerId. + * @param gatewayCustomerId Integer value for gatewayCustomerId. + * @return Builder + */ + public Builder gatewayCustomerId(Integer gatewayCustomerId) { + this.gatewayCustomerId = OptionalNullable.of(gatewayCustomerId); + return this; + } + + /** + * UnSetter for gatewayCustomerId. + * @return Builder + */ + public Builder unsetGatewayCustomerId() { + gatewayCustomerId = null; + return this; + } + + /** + * Builds a new {@link ChjsTokenizationSuccess} object using the set fields. + * @return {@link ChjsTokenizationSuccess} + */ + public ChjsTokenizationSuccess build() { + return new ChjsTokenizationSuccess(paymentProfile, gatewayCustomerId); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java index dfeebe36..3a62a333 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java @@ -519,9 +519,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @return Returns the BillingSchedule */ @JsonGetter("billing_schedule") @@ -532,9 +532,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @param billingSchedule Value for BillingSchedule */ @JsonSetter("billing_schedule") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateInvoice.java b/src/main/java/com/maxio/advancedbilling/models/CreateInvoice.java index 48a6b660..88696e38 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateInvoice.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateInvoice.java @@ -96,6 +96,9 @@ public void setLineItems(List lineItems) { /** * Getter for IssueDate. + * Date on which the invoice will be issued (format YYYY-MM-DD). This date is interpreted and + * validated in your site's time zone. It must be today or a date in the past — future dates are + * not accepted. If omitted, defaults to today in your site's time zone. * @return Returns the LocalDate */ @JsonGetter("issue_date") @@ -107,6 +110,9 @@ public LocalDate getIssueDate() { /** * Setter for IssueDate. + * Date on which the invoice will be issued (format YYYY-MM-DD). This date is interpreted and + * validated in your site's time zone. It must be today or a date in the past — future dates are + * not accepted. If omitted, defaults to today in your site's time zone. * @param issueDate Value for LocalDate */ @JsonSetter("issue_date") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java index 0e7b098b..14d19116 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 information using chargify.js. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). * @return Returns the String */ @JsonGetter("chargify_token") @@ -255,7 +255,7 @@ public String getChargifyToken() { /** * Setter for ChargifyToken. - * Token received after sending billing information using chargify.js. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). * @param chargifyToken Value for String */ @JsonSetter("chargify_token") @@ -709,7 +709,7 @@ public void setCustomerId(Integer customerId) { /** * Getter for PaypalEmail. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We - * recommend using Chargify.js instead. + * recommend using Maxio.js (formerly Chargify.js) instead. * @return Returns the String */ @JsonGetter("paypal_email") @@ -721,7 +721,7 @@ public String getPaypalEmail() { /** * Setter for PaypalEmail. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We - * recommend using Chargify.js instead. + * recommend using Maxio.js (formerly Chargify.js) instead. * @param paypalEmail Value for String */ @JsonSetter("paypal_email") @@ -732,7 +732,7 @@ public void setPaypalEmail(String paypalEmail) { /** * Getter for PaymentMethodNonce. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We - * recommend using Chargify.js instead. + * recommend using Maxio.js (formerly Chargify.js) instead. * @return Returns the String */ @JsonGetter("payment_method_nonce") @@ -744,7 +744,7 @@ public String getPaymentMethodNonce() { /** * Setter for PaymentMethodNonce. * used by merchants that implemented BraintreeBlue javaScript libraries on their own. We - * recommend using Chargify.js instead. + * recommend using Maxio.js (formerly Chargify.js) instead. * @param paymentMethodNonce Value for String */ @JsonSetter("payment_method_nonce") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java index 6f0ce2d0..36cf3d4e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java @@ -81,7 +81,6 @@ public class CreateSubscription public CreateSubscription() { deferSignup = false; dunningCommunicationDelayEnabled = false; - skipBillingManifestTaxes = false; } /** @@ -1567,7 +1566,7 @@ public void unsetDunningCommunicationDelayTimeZone() { /** * Getter for SkipBillingManifestTaxes. * Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating - * taxes for the current and next billing manifests. + * taxes for the current and next billing manifests. Defaults to `false` when not provided. * @return Returns the Boolean */ @JsonGetter("skip_billing_manifest_taxes") @@ -1579,7 +1578,7 @@ public Boolean getSkipBillingManifestTaxes() { /** * Setter for SkipBillingManifestTaxes. * Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating - * taxes for the current and next billing manifests. + * taxes for the current and next billing manifests. Defaults to `false` when not provided. * @param skipBillingManifestTaxes Value for Boolean */ @JsonSetter("skip_billing_manifest_taxes") @@ -1738,7 +1737,7 @@ public static class Builder { private ACHAgreement achAgreement; private Boolean dunningCommunicationDelayEnabled = false; private OptionalNullable dunningCommunicationDelayTimeZone; - private Boolean skipBillingManifestTaxes = false; + private Boolean skipBillingManifestTaxes; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java b/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java index f13e1ac8..ba6e1503 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java @@ -110,9 +110,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @return Returns the BillingSchedule */ @JsonGetter("billing_schedule") @@ -123,9 +123,9 @@ 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. This only works for site with - * Multifrequency enabled. + * Billing schedule settings for component allocations or usages on multi-frequency + * subscriptions. Use this to start a component's billing period on a custom date instead of + * aligning with the product charge schedule. * @param billingSchedule Value for BillingSchedule */ @JsonSetter("billing_schedule") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java index d2106e14..7dbdb298 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java @@ -773,8 +773,8 @@ public void setDisabled(Boolean disabled) { /** * Getter for ChargifyToken. - * Token received after sending billing information using chargify.js. This token will only be - * received if passed as a sole attribute of credit_card_attributes (i.e. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). This + * token will only be received if passed as a sole attribute of credit_card_attributes (i.e. * tok_9g6hw85pnpt6knmskpwp4ttt) * @return Returns the String */ @@ -786,8 +786,8 @@ public String getChargifyToken() { /** * Setter for ChargifyToken. - * Token received after sending billing information using chargify.js. This token will only be - * received if passed as a sole attribute of credit_card_attributes (i.e. + * Token received after sending billing information using Maxio.js (formerly Chargify.js). This + * token will only be received if passed as a sole attribute of credit_card_attributes (i.e. * tok_9g6hw85pnpt6knmskpwp4ttt) * @param chargifyToken Value for String */ diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java b/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java index e566ce28..cf51a76e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java @@ -29,6 +29,7 @@ public class CreditNoteLineItem private String subtotalAmount; private String discountAmount; private String taxAmount; + private Boolean taxIncluded; private String totalAmount; private Boolean tieredUnitPrice; private LocalDate periodRangeStart; @@ -39,6 +40,7 @@ public class CreditNoteLineItem private OptionalNullable pricePointId; private OptionalNullable billingScheduleItemId; private Boolean customItem; + private OptionalNullable prepaidAllocationExpiresAt; /** * Default constructor. @@ -56,6 +58,7 @@ public CreditNoteLineItem() { * @param subtotalAmount String value for subtotalAmount. * @param discountAmount String value for discountAmount. * @param taxAmount String value for taxAmount. + * @param taxIncluded Boolean value for taxIncluded. * @param totalAmount String value for totalAmount. * @param tieredUnitPrice Boolean value for tieredUnitPrice. * @param periodRangeStart LocalDate value for periodRangeStart. @@ -66,6 +69,7 @@ public CreditNoteLineItem() { * @param pricePointId Integer value for pricePointId. * @param billingScheduleItemId Integer value for billingScheduleItemId. * @param customItem Boolean value for customItem. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. */ public CreditNoteLineItem( String uid, @@ -76,6 +80,7 @@ public CreditNoteLineItem( String subtotalAmount, String discountAmount, String taxAmount, + Boolean taxIncluded, String totalAmount, Boolean tieredUnitPrice, LocalDate periodRangeStart, @@ -85,7 +90,8 @@ public CreditNoteLineItem( Integer componentId, Integer pricePointId, Integer billingScheduleItemId, - Boolean customItem) { + Boolean customItem, + LocalDate prepaidAllocationExpiresAt) { this.uid = uid; this.title = title; this.description = description; @@ -94,6 +100,7 @@ public CreditNoteLineItem( this.subtotalAmount = subtotalAmount; this.discountAmount = discountAmount; this.taxAmount = taxAmount; + this.taxIncluded = taxIncluded; this.totalAmount = totalAmount; this.tieredUnitPrice = tieredUnitPrice; this.periodRangeStart = periodRangeStart; @@ -104,6 +111,7 @@ public CreditNoteLineItem( this.pricePointId = OptionalNullable.of(pricePointId); this.billingScheduleItemId = OptionalNullable.of(billingScheduleItemId); this.customItem = customItem; + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); } /** @@ -116,6 +124,7 @@ public CreditNoteLineItem( * @param subtotalAmount String value for subtotalAmount. * @param discountAmount String value for discountAmount. * @param taxAmount String value for taxAmount. + * @param taxIncluded Boolean value for taxIncluded. * @param totalAmount String value for totalAmount. * @param tieredUnitPrice Boolean value for tieredUnitPrice. * @param periodRangeStart LocalDate value for periodRangeStart. @@ -126,14 +135,16 @@ public CreditNoteLineItem( * @param pricePointId Integer value for pricePointId. * @param billingScheduleItemId Integer value for billingScheduleItemId. * @param customItem Boolean value for customItem. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. */ protected CreditNoteLineItem(String uid, String title, String description, String quantity, String unitPrice, String subtotalAmount, String discountAmount, String taxAmount, - String totalAmount, Boolean tieredUnitPrice, LocalDate periodRangeStart, - LocalDate periodRangeEnd, Integer productId, Integer productVersion, - OptionalNullable componentId, OptionalNullable pricePointId, - OptionalNullable billingScheduleItemId, Boolean customItem) { + Boolean taxIncluded, String totalAmount, Boolean tieredUnitPrice, + LocalDate periodRangeStart, LocalDate periodRangeEnd, Integer productId, + Integer productVersion, OptionalNullable componentId, + OptionalNullable pricePointId, OptionalNullable billingScheduleItemId, + Boolean customItem, OptionalNullable prepaidAllocationExpiresAt) { this.uid = uid; this.title = title; this.description = description; @@ -142,6 +153,7 @@ protected CreditNoteLineItem(String uid, String title, String description, Strin this.subtotalAmount = subtotalAmount; this.discountAmount = discountAmount; this.taxAmount = taxAmount; + this.taxIncluded = taxIncluded; this.totalAmount = totalAmount; this.tieredUnitPrice = tieredUnitPrice; this.periodRangeStart = periodRangeStart; @@ -152,6 +164,7 @@ protected CreditNoteLineItem(String uid, String title, String description, Strin this.pricePointId = pricePointId; this.billingScheduleItemId = billingScheduleItemId; this.customItem = customItem; + this.prepaidAllocationExpiresAt = prepaidAllocationExpiresAt; } /** @@ -354,6 +367,35 @@ public void setTaxAmount(String taxAmount) { this.taxAmount = taxAmount; } + /** + * Getter for TaxIncluded. + * Whether the unit price for this line item is tax-inclusive. When `true`, `unit_price` already + * includes tax and `tax_amount` represents the portion of the price attributable to tax. When + * `false`, any applicable tax is added on top of the price. The value is inherited from the + * source price point's `tax_included` setting. Custom or ad-hoc line items (which have no + * associated price point) always return `false`. + * @return Returns the Boolean + */ + @JsonGetter("tax_included") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxIncluded() { + return taxIncluded; + } + + /** + * Setter for TaxIncluded. + * Whether the unit price for this line item is tax-inclusive. When `true`, `unit_price` already + * includes tax and `tax_amount` represents the portion of the price attributable to tax. When + * `false`, any applicable tax is added on top of the price. The value is inherited from the + * source price point's `tax_included` setting. Custom or ad-hoc line items (which have no + * associated price point) always return `false`. + * @param taxIncluded Value for Boolean + */ + @JsonSetter("tax_included") + public void setTaxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + } + /** * Getter for TotalAmount. * The non-canonical total amount for the line. `subtotal_amount` is the canonical amount for a @@ -626,6 +668,50 @@ public void setCustomItem(Boolean customItem) { this.customItem = customItem; } + /** + * Internal Getter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @return Returns the Internal LocalDate + */ + @JsonGetter("prepaid_allocation_expires_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.SimpleDateSerializer.class) + protected OptionalNullable internalGetPrepaidAllocationExpiresAt() { + return this.prepaidAllocationExpiresAt; + } + + /** + * Getter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @return Returns the LocalDate + */ + public LocalDate getPrepaidAllocationExpiresAt() { + return OptionalNullable.getFrom(prepaidAllocationExpiresAt); + } + + /** + * Setter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @param prepaidAllocationExpiresAt Value for LocalDate + */ + @JsonSetter("prepaid_allocation_expires_at") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setPrepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) { + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); + } + + /** + * UnSetter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + */ + public void unsetPrepaidAllocationExpiresAt() { + prepaidAllocationExpiresAt = null; + } + /** * Converts this CreditNoteLineItem into string format. * @return String representation of this class @@ -635,11 +721,13 @@ public String toString() { return "CreditNoteLineItem [" + "uid=" + uid + ", title=" + title + ", description=" + description + ", quantity=" + quantity + ", unitPrice=" + unitPrice + ", subtotalAmount=" + subtotalAmount + ", discountAmount=" + discountAmount - + ", taxAmount=" + taxAmount + ", totalAmount=" + totalAmount + ", tieredUnitPrice=" - + tieredUnitPrice + ", periodRangeStart=" + periodRangeStart + ", periodRangeEnd=" - + periodRangeEnd + ", productId=" + productId + ", productVersion=" + productVersion - + ", componentId=" + componentId + ", pricePointId=" + pricePointId - + ", billingScheduleItemId=" + billingScheduleItemId + ", customItem=" + customItem + + ", taxAmount=" + taxAmount + ", taxIncluded=" + taxIncluded + ", totalAmount=" + + totalAmount + ", tieredUnitPrice=" + tieredUnitPrice + ", periodRangeStart=" + + periodRangeStart + ", periodRangeEnd=" + periodRangeEnd + ", productId=" + + productId + ", productVersion=" + productVersion + ", componentId=" + componentId + + ", pricePointId=" + pricePointId + ", billingScheduleItemId=" + + billingScheduleItemId + ", customItem=" + customItem + + ", prepaidAllocationExpiresAt=" + prepaidAllocationExpiresAt + ", additionalProperties=" + getAdditionalProperties() + "]"; } @@ -658,6 +746,7 @@ public Builder toBuilder() { .subtotalAmount(getSubtotalAmount()) .discountAmount(getDiscountAmount()) .taxAmount(getTaxAmount()) + .taxIncluded(getTaxIncluded()) .totalAmount(getTotalAmount()) .tieredUnitPrice(getTieredUnitPrice()) .periodRangeStart(getPeriodRangeStart()) @@ -668,6 +757,7 @@ public Builder toBuilder() { builder.componentId = internalGetComponentId(); builder.pricePointId = internalGetPricePointId(); builder.billingScheduleItemId = internalGetBillingScheduleItemId(); + builder.prepaidAllocationExpiresAt = internalGetPrepaidAllocationExpiresAt(); return builder; } @@ -683,6 +773,7 @@ public static class Builder { private String subtotalAmount; private String discountAmount; private String taxAmount; + private Boolean taxIncluded; private String totalAmount; private Boolean tieredUnitPrice; private LocalDate periodRangeStart; @@ -693,6 +784,7 @@ public static class Builder { private OptionalNullable pricePointId; private OptionalNullable billingScheduleItemId; private Boolean customItem; + private OptionalNullable prepaidAllocationExpiresAt; @@ -776,6 +868,16 @@ public Builder taxAmount(String taxAmount) { return this; } + /** + * Setter for taxIncluded. + * @param taxIncluded Boolean value for taxIncluded. + * @return Builder + */ + public Builder taxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + return this; + } + /** * Setter for totalAmount. * @param totalAmount String value for totalAmount. @@ -903,15 +1005,35 @@ public Builder customItem(Boolean customItem) { return this; } + /** + * Setter for prepaidAllocationExpiresAt. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. + * @return Builder + */ + public Builder prepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) { + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); + return this; + } + + /** + * UnSetter for prepaidAllocationExpiresAt. + * @return Builder + */ + public Builder unsetPrepaidAllocationExpiresAt() { + prepaidAllocationExpiresAt = null; + return this; + } + /** * Builds a new {@link CreditNoteLineItem} object using the set fields. * @return {@link CreditNoteLineItem} */ public CreditNoteLineItem build() { return new CreditNoteLineItem(uid, title, description, quantity, unitPrice, - subtotalAmount, discountAmount, taxAmount, totalAmount, tieredUnitPrice, - periodRangeStart, periodRangeEnd, productId, productVersion, componentId, - pricePointId, billingScheduleItemId, customItem); + subtotalAmount, discountAmount, taxAmount, taxIncluded, totalAmount, + tieredUnitPrice, periodRangeStart, periodRangeEnd, productId, productVersion, + componentId, pricePointId, billingScheduleItemId, customItem, + prepaidAllocationExpiresAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/Customer.java b/src/main/java/com/maxio/advancedbilling/models/Customer.java index 6d2d4d0a..7d985bed 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Customer.java +++ b/src/main/java/com/maxio/advancedbilling/models/Customer.java @@ -51,6 +51,7 @@ public class Customer private OptionalNullable salesforceId; private OptionalNullable taxExemptReason; private OptionalNullable defaultAutoRenewalProfileId; + private OptionalNullable maxioid; /** * Default constructor. @@ -90,6 +91,7 @@ public Customer() { * @param salesforceId String value for salesforceId. * @param taxExemptReason String value for taxExemptReason. * @param defaultAutoRenewalProfileId Integer value for defaultAutoRenewalProfileId. + * @param maxioid String value for maxioid. */ public Customer( String firstName, @@ -121,7 +123,8 @@ public Customer( String defaultSubscriptionGroupUid, String salesforceId, String taxExemptReason, - Integer defaultAutoRenewalProfileId) { + Integer defaultAutoRenewalProfileId, + String maxioid) { this.firstName = firstName; this.lastName = lastName; this.email = email; @@ -152,6 +155,7 @@ public Customer( this.salesforceId = OptionalNullable.of(salesforceId); this.taxExemptReason = OptionalNullable.of(taxExemptReason); this.defaultAutoRenewalProfileId = OptionalNullable.of(defaultAutoRenewalProfileId); + this.maxioid = OptionalNullable.of(maxioid); } /** @@ -186,6 +190,7 @@ public Customer( * @param salesforceId String value for salesforceId. * @param taxExemptReason String value for taxExemptReason. * @param defaultAutoRenewalProfileId Integer value for defaultAutoRenewalProfileId. + * @param maxioid String value for maxioid. */ protected Customer(String firstName, String lastName, String email, @@ -203,7 +208,8 @@ protected Customer(String firstName, String lastName, String email, OptionalNullable vatNumber, OptionalNullable parentId, OptionalNullable locale, OptionalNullable defaultSubscriptionGroupUid, OptionalNullable salesforceId, OptionalNullable taxExemptReason, - OptionalNullable defaultAutoRenewalProfileId) { + OptionalNullable defaultAutoRenewalProfileId, + OptionalNullable maxioid) { this.firstName = firstName; this.lastName = lastName; this.email = email; @@ -234,6 +240,7 @@ protected Customer(String firstName, String lastName, String email, this.salesforceId = salesforceId; this.taxExemptReason = taxExemptReason; this.defaultAutoRenewalProfileId = defaultAutoRenewalProfileId; + this.maxioid = maxioid; } /** @@ -1309,6 +1316,45 @@ public void unsetDefaultAutoRenewalProfileId() { defaultAutoRenewalProfileId = null; } + /** + * Internal Getter for Maxioid. + * The Maxio-generated unique identifier for the customer. + * @return Returns the Internal String + */ + @JsonGetter("maxioid") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMaxioid() { + return this.maxioid; + } + + /** + * Getter for Maxioid. + * The Maxio-generated unique identifier for the customer. + * @return Returns the String + */ + public String getMaxioid() { + return OptionalNullable.getFrom(maxioid); + } + + /** + * Setter for Maxioid. + * The Maxio-generated unique identifier for the customer. + * @param maxioid Value for String + */ + @JsonSetter("maxioid") + public void setMaxioid(String maxioid) { + this.maxioid = OptionalNullable.of(maxioid); + } + + /** + * UnSetter for Maxioid. + * The Maxio-generated unique identifier for the customer. + */ + public void unsetMaxioid() { + maxioid = null; + } + /** * Converts this Customer into string format. * @return String representation of this class @@ -1327,8 +1373,8 @@ public String toString() { + taxExempt + ", vatNumber=" + vatNumber + ", parentId=" + parentId + ", locale=" + locale + ", defaultSubscriptionGroupUid=" + defaultSubscriptionGroupUid + ", salesforceId=" + salesforceId + ", taxExemptReason=" + taxExemptReason - + ", defaultAutoRenewalProfileId=" + defaultAutoRenewalProfileId - + ", additionalProperties=" + getAdditionalProperties() + "]"; + + ", defaultAutoRenewalProfileId=" + defaultAutoRenewalProfileId + ", maxioid=" + + maxioid + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -1368,6 +1414,7 @@ public Builder toBuilder() { builder.salesforceId = internalGetSalesforceId(); builder.taxExemptReason = internalGetTaxExemptReason(); builder.defaultAutoRenewalProfileId = internalGetDefaultAutoRenewalProfileId(); + builder.maxioid = internalGetMaxioid(); return builder; } @@ -1405,6 +1452,7 @@ public static class Builder { private OptionalNullable salesforceId; private OptionalNullable taxExemptReason; private OptionalNullable defaultAutoRenewalProfileId; + private OptionalNullable maxioid; @@ -1915,6 +1963,25 @@ public Builder unsetDefaultAutoRenewalProfileId() { return this; } + /** + * Setter for maxioid. + * @param maxioid String value for maxioid. + * @return Builder + */ + public Builder maxioid(String maxioid) { + this.maxioid = OptionalNullable.of(maxioid); + return this; + } + + /** + * UnSetter for maxioid. + * @return Builder + */ + public Builder unsetMaxioid() { + maxioid = null; + return this; + } + /** * Builds a new {@link Customer} object using the set fields. * @return {@link Customer} @@ -1925,7 +1992,7 @@ public Customer build() { countryName, phone, verified, portalCustomerCreatedAt, portalInviteLastSentAt, portalInviteLastAcceptedAt, taxExempt, vatNumber, parentId, locale, defaultSubscriptionGroupUid, salesforceId, taxExemptReason, - defaultAutoRenewalProfileId); + defaultAutoRenewalProfileId, maxioid); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/Event.java b/src/main/java/com/maxio/advancedbilling/models/Event.java index 1779af3a..2e388887 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Event.java +++ b/src/main/java/com/maxio/advancedbilling/models/Event.java @@ -189,11 +189,12 @@ public void setCreatedAt(ZonedDateTime createdAt) { * `payment_collection_method_changed` - PaymentCollectionMethodChanged * * `subscription_service_credit_account_balance_changed` - CreditAccountBalanceChanged * * `item_price_point_changed` - ItemPricePointChanged * `custom_field_value_change` - - * CustomFieldValueChange * The rest, that is `delayed_signup_creation_failure`, - * `billing_date_change`, `expiration_date_change`, `expiring_card`, `customer_update`, - * `customer_create`, `customer_delete`, `upgrade_downgrade_success`, - * `upgrade_downgrade_failure`, `statement_closed`, `statement_settled`, - * `subscription_card_update`, `subscription_group_card_update`, + * CustomFieldValueChange * `chjs_tokenization_success` - ChjsTokenizationSuccess * + * `chjs_tokenization_failure` - ChjsTokenizationFailure * The rest, that is + * `delayed_signup_creation_failure`, `billing_date_change`, `expiration_date_change`, + * `expiring_card`, `customer_update`, `customer_create`, `customer_delete`, + * `upgrade_downgrade_success`, `upgrade_downgrade_failure`, `statement_closed`, + * `statement_settled`, `subscription_card_update`, `subscription_group_card_update`, * `subscription_bank_account_update`, `refund_failure`, `upcoming_renewal_notice`, * `trial_end_notice`, `direct_debit_payment_paid_out`, `direct_debit_payment_rejected`, * `direct_debit_payment_pending`, `pending_payment_created`, `pending_payment_failed`, @@ -239,11 +240,12 @@ public EventEventSpecificData getEventSpecificData() { * `payment_collection_method_changed` - PaymentCollectionMethodChanged * * `subscription_service_credit_account_balance_changed` - CreditAccountBalanceChanged * * `item_price_point_changed` - ItemPricePointChanged * `custom_field_value_change` - - * CustomFieldValueChange * The rest, that is `delayed_signup_creation_failure`, - * `billing_date_change`, `expiration_date_change`, `expiring_card`, `customer_update`, - * `customer_create`, `customer_delete`, `upgrade_downgrade_success`, - * `upgrade_downgrade_failure`, `statement_closed`, `statement_settled`, - * `subscription_card_update`, `subscription_group_card_update`, + * CustomFieldValueChange * `chjs_tokenization_success` - ChjsTokenizationSuccess * + * `chjs_tokenization_failure` - ChjsTokenizationFailure * The rest, that is + * `delayed_signup_creation_failure`, `billing_date_change`, `expiration_date_change`, + * `expiring_card`, `customer_update`, `customer_create`, `customer_delete`, + * `upgrade_downgrade_success`, `upgrade_downgrade_failure`, `statement_closed`, + * `statement_settled`, `subscription_card_update`, `subscription_group_card_update`, * `subscription_bank_account_update`, `refund_failure`, `upcoming_renewal_notice`, * `trial_end_notice`, `direct_debit_payment_paid_out`, `direct_debit_payment_rejected`, * `direct_debit_payment_pending`, `pending_payment_created`, `pending_payment_failed`, diff --git a/src/main/java/com/maxio/advancedbilling/models/EventKey.java b/src/main/java/com/maxio/advancedbilling/models/EventKey.java index 1ca93730..a9ca0d4d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/EventKey.java +++ b/src/main/java/com/maxio/advancedbilling/models/EventKey.java @@ -83,6 +83,8 @@ public enum EventKey { INVOICE_ISSUED, + INVOICE_PENDING, + PREPAID_SUBSCRIPTION_BALANCE_CHANGED, SUBSCRIPTION_GROUP_SIGNUP_SUCCESS, @@ -169,6 +171,10 @@ public enum EventKey { COMPONENT_BILLING_DATE_CHANGED, + CHJS_TOKENIZATION_FAILURE, + + CHJS_TOKENIZATION_SUCCESS, + SUBSCRIPTION_TERM_RENEWAL_SCHEDULED, SUBSCRIPTION_TERM_RENEWAL_PENDING, @@ -215,6 +221,7 @@ public enum EventKey { TRIAL_END_NOTICE.value = "trial_end_notice"; DUNNING_STEP_REACHED.value = "dunning_step_reached"; INVOICE_ISSUED.value = "invoice_issued"; + INVOICE_PENDING.value = "invoice_pending"; PREPAID_SUBSCRIPTION_BALANCE_CHANGED.value = "prepaid_subscription_balance_changed"; SUBSCRIPTION_GROUP_SIGNUP_SUCCESS.value = "subscription_group_signup_success"; SUBSCRIPTION_GROUP_SIGNUP_FAILURE.value = "subscription_group_signup_failure"; @@ -258,6 +265,8 @@ public enum EventKey { CHARGEBACK_WON.value = "chargeback_won"; PAYMENT_COLLECTION_METHOD_CHANGED.value = "payment_collection_method_changed"; COMPONENT_BILLING_DATE_CHANGED.value = "component_billing_date_changed"; + CHJS_TOKENIZATION_FAILURE.value = "chjs_tokenization_failure"; + CHJS_TOKENIZATION_SUCCESS.value = "chjs_tokenization_success"; SUBSCRIPTION_TERM_RENEWAL_SCHEDULED.value = "subscription_term_renewal_scheduled"; SUBSCRIPTION_TERM_RENEWAL_PENDING.value = "subscription_term_renewal_pending"; SUBSCRIPTION_TERM_RENEWAL_ACTIVATED.value = "subscription_term_renewal_activated"; @@ -296,6 +305,7 @@ public enum EventKey { valueMap.put("trial_end_notice", TRIAL_END_NOTICE); valueMap.put("dunning_step_reached", DUNNING_STEP_REACHED); valueMap.put("invoice_issued", INVOICE_ISSUED); + valueMap.put("invoice_pending", INVOICE_PENDING); valueMap.put("prepaid_subscription_balance_changed", PREPAID_SUBSCRIPTION_BALANCE_CHANGED); valueMap.put("subscription_group_signup_success", SUBSCRIPTION_GROUP_SIGNUP_SUCCESS); valueMap.put("subscription_group_signup_failure", SUBSCRIPTION_GROUP_SIGNUP_FAILURE); @@ -339,6 +349,8 @@ public enum EventKey { valueMap.put("chargeback_won", CHARGEBACK_WON); valueMap.put("payment_collection_method_changed", PAYMENT_COLLECTION_METHOD_CHANGED); valueMap.put("component_billing_date_changed", COMPONENT_BILLING_DATE_CHANGED); + valueMap.put("chjs_tokenization_failure", CHJS_TOKENIZATION_FAILURE); + valueMap.put("chjs_tokenization_success", CHJS_TOKENIZATION_SUCCESS); valueMap.put("subscription_term_renewal_scheduled", SUBSCRIPTION_TERM_RENEWAL_SCHEDULED); valueMap.put("subscription_term_renewal_pending", SUBSCRIPTION_TERM_RENEWAL_PENDING); valueMap.put("subscription_term_renewal_activated", SUBSCRIPTION_TERM_RENEWAL_ACTIVATED); diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java index e5a2778d..195dfc0e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java @@ -29,6 +29,7 @@ public class InvoiceLineItem private String subtotalAmount; private String discountAmount; private String taxAmount; + private Boolean taxIncluded; private String totalAmount; private Boolean tieredUnitPrice; private LocalDate periodRangeStart; @@ -44,6 +45,7 @@ public class InvoiceLineItem private OptionalNullable productPricePointId; private Boolean customItem; private String kind; + private OptionalNullable prepaidAllocationExpiresAt; /** * Default constructor. @@ -61,6 +63,7 @@ public InvoiceLineItem() { * @param subtotalAmount String value for subtotalAmount. * @param discountAmount String value for discountAmount. * @param taxAmount String value for taxAmount. + * @param taxIncluded Boolean value for taxIncluded. * @param totalAmount String value for totalAmount. * @param tieredUnitPrice Boolean value for tieredUnitPrice. * @param periodRangeStart LocalDate value for periodRangeStart. @@ -76,6 +79,7 @@ public InvoiceLineItem() { * @param productPricePointId Integer value for productPricePointId. * @param customItem Boolean value for customItem. * @param kind String value for kind. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. */ public InvoiceLineItem( String uid, @@ -86,6 +90,7 @@ public InvoiceLineItem( String subtotalAmount, String discountAmount, String taxAmount, + Boolean taxIncluded, String totalAmount, Boolean tieredUnitPrice, LocalDate periodRangeStart, @@ -100,7 +105,8 @@ public InvoiceLineItem( InvoiceLineItemComponentCostData componentCostData, Integer productPricePointId, Boolean customItem, - String kind) { + String kind, + LocalDate prepaidAllocationExpiresAt) { this.uid = uid; this.title = title; this.description = description; @@ -109,6 +115,7 @@ public InvoiceLineItem( this.subtotalAmount = subtotalAmount; this.discountAmount = discountAmount; this.taxAmount = taxAmount; + this.taxIncluded = taxIncluded; this.totalAmount = totalAmount; this.tieredUnitPrice = tieredUnitPrice; this.periodRangeStart = periodRangeStart; @@ -124,6 +131,7 @@ public InvoiceLineItem( this.productPricePointId = OptionalNullable.of(productPricePointId); this.customItem = customItem; this.kind = kind; + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); } /** @@ -136,6 +144,7 @@ public InvoiceLineItem( * @param subtotalAmount String value for subtotalAmount. * @param discountAmount String value for discountAmount. * @param taxAmount String value for taxAmount. + * @param taxIncluded Boolean value for taxIncluded. * @param totalAmount String value for totalAmount. * @param tieredUnitPrice Boolean value for tieredUnitPrice. * @param periodRangeStart LocalDate value for periodRangeStart. @@ -151,16 +160,19 @@ public InvoiceLineItem( * @param productPricePointId Integer value for productPricePointId. * @param customItem Boolean value for customItem. * @param kind String value for kind. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. */ protected InvoiceLineItem(String uid, String title, String description, String quantity, String unitPrice, String subtotalAmount, String discountAmount, String taxAmount, - String totalAmount, Boolean tieredUnitPrice, LocalDate periodRangeStart, - LocalDate periodRangeEnd, Integer transactionId, OptionalNullable productId, - OptionalNullable productVersion, OptionalNullable componentId, - OptionalNullable pricePointId, OptionalNullable billingScheduleItemId, - Boolean hide, OptionalNullable componentCostData, - OptionalNullable productPricePointId, Boolean customItem, String kind) { + Boolean taxIncluded, String totalAmount, Boolean tieredUnitPrice, + LocalDate periodRangeStart, LocalDate periodRangeEnd, Integer transactionId, + OptionalNullable productId, OptionalNullable productVersion, + OptionalNullable componentId, OptionalNullable pricePointId, + OptionalNullable billingScheduleItemId, Boolean hide, + OptionalNullable componentCostData, + OptionalNullable productPricePointId, Boolean customItem, String kind, + OptionalNullable prepaidAllocationExpiresAt) { this.uid = uid; this.title = title; this.description = description; @@ -169,6 +181,7 @@ protected InvoiceLineItem(String uid, String title, String description, String q this.subtotalAmount = subtotalAmount; this.discountAmount = discountAmount; this.taxAmount = taxAmount; + this.taxIncluded = taxIncluded; this.totalAmount = totalAmount; this.tieredUnitPrice = tieredUnitPrice; this.periodRangeStart = periodRangeStart; @@ -184,6 +197,7 @@ protected InvoiceLineItem(String uid, String title, String description, String q this.productPricePointId = productPricePointId; this.customItem = customItem; this.kind = kind; + this.prepaidAllocationExpiresAt = prepaidAllocationExpiresAt; } /** @@ -388,6 +402,35 @@ public void setTaxAmount(String taxAmount) { this.taxAmount = taxAmount; } + /** + * Getter for TaxIncluded. + * Whether the unit price for this line item is tax-inclusive. When `true`, `unit_price` already + * includes tax and `tax_amount` represents the portion of the price attributable to tax. When + * `false`, any applicable tax is added on top of the price. The value is inherited from the + * source price point's `tax_included` setting. Custom or ad-hoc line items (which have no + * associated price point) always return `false`. + * @return Returns the Boolean + */ + @JsonGetter("tax_included") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxIncluded() { + return taxIncluded; + } + + /** + * Setter for TaxIncluded. + * Whether the unit price for this line item is tax-inclusive. When `true`, `unit_price` already + * includes tax and `tax_amount` represents the portion of the price attributable to tax. When + * `false`, any applicable tax is added on top of the price. The value is inherited from the + * source price point's `tax_included` setting. Custom or ad-hoc line items (which have no + * associated price point) always return `false`. + * @param taxIncluded Value for Boolean + */ + @JsonSetter("tax_included") + public void setTaxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + } + /** * Getter for TotalAmount. * The non-canonical total amount for the line. `subtotal_amount` is the canonical amount for a @@ -843,6 +886,50 @@ public void setKind(String kind) { this.kind = kind; } + /** + * Internal Getter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @return Returns the Internal LocalDate + */ + @JsonGetter("prepaid_allocation_expires_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.SimpleDateSerializer.class) + protected OptionalNullable internalGetPrepaidAllocationExpiresAt() { + return this.prepaidAllocationExpiresAt; + } + + /** + * Getter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @return Returns the LocalDate + */ + public LocalDate getPrepaidAllocationExpiresAt() { + return OptionalNullable.getFrom(prepaidAllocationExpiresAt); + } + + /** + * Setter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + * @param prepaidAllocationExpiresAt Value for LocalDate + */ + @JsonSetter("prepaid_allocation_expires_at") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setPrepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) { + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); + } + + /** + * UnSetter for PrepaidAllocationExpiresAt. + * The date a prepaid allocation is set to expire. Only present on line items representing + * prepaid component allocations. The format is `"YYYY-MM-DD"`. + */ + public void unsetPrepaidAllocationExpiresAt() { + prepaidAllocationExpiresAt = null; + } + /** * Converts this InvoiceLineItem into string format. * @return String representation of this class @@ -852,15 +939,16 @@ public String toString() { return "InvoiceLineItem [" + "uid=" + uid + ", title=" + title + ", description=" + description + ", quantity=" + quantity + ", unitPrice=" + unitPrice + ", subtotalAmount=" + subtotalAmount + ", discountAmount=" + discountAmount - + ", taxAmount=" + taxAmount + ", totalAmount=" + totalAmount + ", tieredUnitPrice=" - + tieredUnitPrice + ", periodRangeStart=" + periodRangeStart + ", periodRangeEnd=" - + periodRangeEnd + ", transactionId=" + transactionId + ", productId=" + productId - + ", productVersion=" + productVersion + ", componentId=" + componentId - + ", pricePointId=" + pricePointId + ", billingScheduleItemId=" - + billingScheduleItemId + ", hide=" + hide + ", componentCostData=" - + componentCostData + ", productPricePointId=" + productPricePointId - + ", customItem=" + customItem + ", kind=" + kind + ", additionalProperties=" - + getAdditionalProperties() + "]"; + + ", taxAmount=" + taxAmount + ", taxIncluded=" + taxIncluded + ", totalAmount=" + + totalAmount + ", tieredUnitPrice=" + tieredUnitPrice + ", periodRangeStart=" + + periodRangeStart + ", periodRangeEnd=" + periodRangeEnd + ", transactionId=" + + transactionId + ", productId=" + productId + ", productVersion=" + productVersion + + ", componentId=" + componentId + ", pricePointId=" + pricePointId + + ", billingScheduleItemId=" + billingScheduleItemId + ", hide=" + hide + + ", componentCostData=" + componentCostData + ", productPricePointId=" + + productPricePointId + ", customItem=" + customItem + ", kind=" + kind + + ", prepaidAllocationExpiresAt=" + prepaidAllocationExpiresAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -878,6 +966,7 @@ public Builder toBuilder() { .subtotalAmount(getSubtotalAmount()) .discountAmount(getDiscountAmount()) .taxAmount(getTaxAmount()) + .taxIncluded(getTaxIncluded()) .totalAmount(getTotalAmount()) .tieredUnitPrice(getTieredUnitPrice()) .periodRangeStart(getPeriodRangeStart()) @@ -893,6 +982,7 @@ public Builder toBuilder() { builder.billingScheduleItemId = internalGetBillingScheduleItemId(); builder.componentCostData = internalGetComponentCostData(); builder.productPricePointId = internalGetProductPricePointId(); + builder.prepaidAllocationExpiresAt = internalGetPrepaidAllocationExpiresAt(); return builder; } @@ -908,6 +998,7 @@ public static class Builder { private String subtotalAmount; private String discountAmount; private String taxAmount; + private Boolean taxIncluded; private String totalAmount; private Boolean tieredUnitPrice; private LocalDate periodRangeStart; @@ -923,6 +1014,7 @@ public static class Builder { private OptionalNullable productPricePointId; private Boolean customItem; private String kind; + private OptionalNullable prepaidAllocationExpiresAt; @@ -1006,6 +1098,16 @@ public Builder taxAmount(String taxAmount) { return this; } + /** + * Setter for taxIncluded. + * @param taxIncluded Boolean value for taxIncluded. + * @return Builder + */ + public Builder taxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + return this; + } + /** * Setter for totalAmount. * @param totalAmount String value for totalAmount. @@ -1219,16 +1321,35 @@ public Builder kind(String kind) { return this; } + /** + * Setter for prepaidAllocationExpiresAt. + * @param prepaidAllocationExpiresAt LocalDate value for prepaidAllocationExpiresAt. + * @return Builder + */ + public Builder prepaidAllocationExpiresAt(LocalDate prepaidAllocationExpiresAt) { + this.prepaidAllocationExpiresAt = OptionalNullable.of(prepaidAllocationExpiresAt); + return this; + } + + /** + * UnSetter for prepaidAllocationExpiresAt. + * @return Builder + */ + public Builder unsetPrepaidAllocationExpiresAt() { + prepaidAllocationExpiresAt = null; + return this; + } + /** * Builds a new {@link InvoiceLineItem} object using the set fields. * @return {@link InvoiceLineItem} */ public InvoiceLineItem build() { return new InvoiceLineItem(uid, title, description, quantity, unitPrice, subtotalAmount, - discountAmount, taxAmount, totalAmount, tieredUnitPrice, periodRangeStart, - periodRangeEnd, transactionId, productId, productVersion, componentId, - pricePointId, billingScheduleItemId, hide, componentCostData, - productPricePointId, customItem, kind); + discountAmount, taxAmount, taxIncluded, totalAmount, tieredUnitPrice, + periodRangeStart, periodRangeEnd, transactionId, productId, productVersion, + componentId, pricePointId, billingScheduleItemId, hide, componentCostData, + productPricePointId, customItem, kind, prepaidAllocationExpiresAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java index 47c9e437..c7ce465a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java @@ -199,9 +199,9 @@ protected PaymentProfileAttributes(String chargifyToken, Integer id, PaymentType /** * Getter for ChargifyToken. - * (Optional) Token received after sending billing information using chargify.js. This token - * must be passed as a sole attribute of `payment_profile_attributes` (i.e. - * tok_9g6hw85pnpt6knmskpwp4ttt) + * (Optional) Token received after sending billing information using Maxio.js (formerly + * Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` + * (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) * @return Returns the String */ @JsonGetter("chargify_token") @@ -212,9 +212,9 @@ public String getChargifyToken() { /** * Setter for ChargifyToken. - * (Optional) Token received after sending billing information using chargify.js. This token - * must be passed as a sole attribute of `payment_profile_attributes` (i.e. - * tok_9g6hw85pnpt6knmskpwp4ttt) + * (Optional) Token received after sending billing information using Maxio.js (formerly + * Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` + * (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) * @param chargifyToken Value for String */ @JsonSetter("chargify_token") diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileParams.java b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileParams.java new file mode 100644 index 00000000..cbeff7fe --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileParams.java @@ -0,0 +1,173 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for PaymentProfileParams type. + */ +public class PaymentProfileParams + extends BaseModel { + private String firstName; + private String lastName; + private String cardType; + + /** + * Default constructor. + */ + public PaymentProfileParams() { + } + + /** + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param cardType String value for cardType. + */ + public PaymentProfileParams( + String firstName, + String lastName, + String cardType) { + this.firstName = firstName; + this.lastName = lastName; + this.cardType = cardType; + } + + /** + * Getter for FirstName. + * @return Returns the String + */ + @JsonGetter("first_name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getFirstName() { + return firstName; + } + + /** + * Setter for FirstName. + * @param firstName Value for String + */ + @JsonSetter("first_name") + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * Getter for LastName. + * @return Returns the String + */ + @JsonGetter("last_name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getLastName() { + return lastName; + } + + /** + * Setter for LastName. + * @param lastName Value for String + */ + @JsonSetter("last_name") + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * Getter for CardType. + * @return Returns the String + */ + @JsonGetter("card_type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getCardType() { + return cardType; + } + + /** + * Setter for CardType. + * @param cardType Value for String + */ + @JsonSetter("card_type") + public void setCardType(String cardType) { + this.cardType = cardType; + } + + /** + * Converts this PaymentProfileParams into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "PaymentProfileParams [" + "firstName=" + firstName + ", lastName=" + lastName + + ", cardType=" + cardType + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link PaymentProfileParams.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link PaymentProfileParams.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .firstName(getFirstName()) + .lastName(getLastName()) + .cardType(getCardType()); + return builder; + } + + /** + * Class to build instances of {@link PaymentProfileParams}. + */ + public static class Builder { + private String firstName; + private String lastName; + private String cardType; + + + + /** + * Setter for firstName. + * @param firstName String value for firstName. + * @return Builder + */ + public Builder firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Setter for lastName. + * @param lastName String value for lastName. + * @return Builder + */ + public Builder lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Setter for cardType. + * @param cardType String value for cardType. + * @return Builder + */ + public Builder cardType(String cardType) { + this.cardType = cardType; + return this; + } + + /** + * Builds a new {@link PaymentProfileParams} object using the set fields. + * @return {@link PaymentProfileParams} + */ + public PaymentProfileParams build() { + return new PaymentProfileParams(firstName, lastName, cardType); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/Site.java b/src/main/java/com/maxio/advancedbilling/models/Site.java index aa05f1bc..2d0a3bb9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Site.java +++ b/src/main/java/com/maxio/advancedbilling/models/Site.java @@ -33,6 +33,9 @@ public class Site private OrganizationAddress organizationAddress; private TaxConfiguration taxConfiguration; private NetTerms netTerms; + private Boolean multiFrequencyEnabled; + private Boolean autoRenewalsEnabled; + private Boolean portalEnabled; private Boolean test; /** @@ -60,6 +63,9 @@ public Site() { * @param organizationAddress OrganizationAddress value for organizationAddress. * @param taxConfiguration TaxConfiguration value for taxConfiguration. * @param netTerms NetTerms value for netTerms. + * @param multiFrequencyEnabled Boolean value for multiFrequencyEnabled. + * @param autoRenewalsEnabled Boolean value for autoRenewalsEnabled. + * @param portalEnabled Boolean value for portalEnabled. * @param test Boolean value for test. */ public Site( @@ -79,6 +85,9 @@ public Site( OrganizationAddress organizationAddress, TaxConfiguration taxConfiguration, NetTerms netTerms, + Boolean multiFrequencyEnabled, + Boolean autoRenewalsEnabled, + Boolean portalEnabled, Boolean test) { this.id = id; this.name = name; @@ -96,6 +105,9 @@ public Site( this.organizationAddress = organizationAddress; this.taxConfiguration = taxConfiguration; this.netTerms = netTerms; + this.multiFrequencyEnabled = multiFrequencyEnabled; + this.autoRenewalsEnabled = autoRenewalsEnabled; + this.portalEnabled = portalEnabled; this.test = test; } @@ -403,6 +415,71 @@ public void setNetTerms(NetTerms netTerms) { this.netTerms = netTerms; } + /** + * Getter for MultiFrequencyEnabled. + * Whether the site has the multi-frequency billing feature enabled. Only present when + * relationship invoicing is active. + * @return Returns the Boolean + */ + @JsonGetter("multi_frequency_enabled") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getMultiFrequencyEnabled() { + return multiFrequencyEnabled; + } + + /** + * Setter for MultiFrequencyEnabled. + * Whether the site has the multi-frequency billing feature enabled. Only present when + * relationship invoicing is active. + * @param multiFrequencyEnabled Value for Boolean + */ + @JsonSetter("multi_frequency_enabled") + public void setMultiFrequencyEnabled(Boolean multiFrequencyEnabled) { + this.multiFrequencyEnabled = multiFrequencyEnabled; + } + + /** + * Getter for AutoRenewalsEnabled. + * Whether the auto-renewals feature is enabled for this site. + * @return Returns the Boolean + */ + @JsonGetter("auto_renewals_enabled") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getAutoRenewalsEnabled() { + return autoRenewalsEnabled; + } + + /** + * Setter for AutoRenewalsEnabled. + * Whether the auto-renewals feature is enabled for this site. + * @param autoRenewalsEnabled Value for Boolean + */ + @JsonSetter("auto_renewals_enabled") + public void setAutoRenewalsEnabled(Boolean autoRenewalsEnabled) { + this.autoRenewalsEnabled = autoRenewalsEnabled; + } + + /** + * Getter for PortalEnabled. + * Whether the Billing Portal is enabled for this site. + * @return Returns the Boolean + */ + @JsonGetter("portal_enabled") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getPortalEnabled() { + return portalEnabled; + } + + /** + * Setter for PortalEnabled. + * Whether the Billing Portal is enabled for this site. + * @param portalEnabled Value for Boolean + */ + @JsonSetter("portal_enabled") + public void setPortalEnabled(Boolean portalEnabled) { + this.portalEnabled = portalEnabled; + } + /** * Getter for Test. * @return Returns the Boolean @@ -437,8 +514,10 @@ public String toString() { + ", whopaysDefaultPayer=" + whopaysDefaultPayer + ", allocationSettings=" + allocationSettings + ", defaultPaymentCollectionMethod=" + defaultPaymentCollectionMethod + ", organizationAddress=" + organizationAddress - + ", taxConfiguration=" + taxConfiguration + ", netTerms=" + netTerms + ", test=" - + test + ", additionalProperties=" + getAdditionalProperties() + "]"; + + ", taxConfiguration=" + taxConfiguration + ", netTerms=" + netTerms + + ", multiFrequencyEnabled=" + multiFrequencyEnabled + ", autoRenewalsEnabled=" + + autoRenewalsEnabled + ", portalEnabled=" + portalEnabled + ", test=" + test + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -464,6 +543,9 @@ public Builder toBuilder() { .organizationAddress(getOrganizationAddress()) .taxConfiguration(getTaxConfiguration()) .netTerms(getNetTerms()) + .multiFrequencyEnabled(getMultiFrequencyEnabled()) + .autoRenewalsEnabled(getAutoRenewalsEnabled()) + .portalEnabled(getPortalEnabled()) .test(getTest()); return builder; } @@ -488,6 +570,9 @@ public static class Builder { private OrganizationAddress organizationAddress; private TaxConfiguration taxConfiguration; private NetTerms netTerms; + private Boolean multiFrequencyEnabled; + private Boolean autoRenewalsEnabled; + private Boolean portalEnabled; private Boolean test; @@ -654,6 +739,36 @@ public Builder netTerms(NetTerms netTerms) { return this; } + /** + * Setter for multiFrequencyEnabled. + * @param multiFrequencyEnabled Boolean value for multiFrequencyEnabled. + * @return Builder + */ + public Builder multiFrequencyEnabled(Boolean multiFrequencyEnabled) { + this.multiFrequencyEnabled = multiFrequencyEnabled; + return this; + } + + /** + * Setter for autoRenewalsEnabled. + * @param autoRenewalsEnabled Boolean value for autoRenewalsEnabled. + * @return Builder + */ + public Builder autoRenewalsEnabled(Boolean autoRenewalsEnabled) { + this.autoRenewalsEnabled = autoRenewalsEnabled; + return this; + } + + /** + * Setter for portalEnabled. + * @param portalEnabled Boolean value for portalEnabled. + * @return Builder + */ + public Builder portalEnabled(Boolean portalEnabled) { + this.portalEnabled = portalEnabled; + return this; + } + /** * Setter for test. * @param test Boolean value for test. @@ -673,7 +788,8 @@ public Site build() { relationshipInvoicingEnabled, scheduleSubscriptionCancellationEnabled, customerHierarchyEnabled, whopaysEnabled, whopaysDefaultPayer, allocationSettings, defaultPaymentCollectionMethod, organizationAddress, - taxConfiguration, netTerms, test); + taxConfiguration, netTerms, multiFrequencyEnabled, autoRenewalsEnabled, + portalEnabled, test); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/TokenizedPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/TokenizedPaymentProfile.java new file mode 100644 index 00000000..01d87c8a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/TokenizedPaymentProfile.java @@ -0,0 +1,286 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +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 io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; + +/** + * This is a model class for TokenizedPaymentProfile type. + */ +public class TokenizedPaymentProfile + extends BaseModel { + private int id; + private String vaultToken; + private OptionalNullable gatewayHandle; + private OptionalNullable customerVaultToken; + + /** + * Default constructor. + */ + public TokenizedPaymentProfile() { + } + + /** + * Initialization constructor. + * @param id int value for id. + * @param vaultToken String value for vaultToken. + * @param gatewayHandle String value for gatewayHandle. + * @param customerVaultToken String value for customerVaultToken. + */ + public TokenizedPaymentProfile( + int id, + String vaultToken, + String gatewayHandle, + String customerVaultToken) { + this.id = id; + this.vaultToken = vaultToken; + this.gatewayHandle = OptionalNullable.of(gatewayHandle); + this.customerVaultToken = OptionalNullable.of(customerVaultToken); + } + + /** + * Initialization constructor. + * @param id int value for id. + * @param vaultToken String value for vaultToken. + * @param gatewayHandle String value for gatewayHandle. + * @param customerVaultToken String value for customerVaultToken. + */ + + protected TokenizedPaymentProfile(int id, String vaultToken, + OptionalNullable gatewayHandle, OptionalNullable customerVaultToken) { + this.id = id; + this.vaultToken = vaultToken; + this.gatewayHandle = gatewayHandle; + this.customerVaultToken = customerVaultToken; + } + + /** + * Getter for Id. + * @return Returns the int + */ + @JsonGetter("id") + public int getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for int + */ + @JsonSetter("id") + public void setId(int id) { + this.id = id; + } + + /** + * Getter for VaultToken. + * @return Returns the String + */ + @JsonGetter("vault_token") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getVaultToken() { + return vaultToken; + } + + /** + * Setter for VaultToken. + * @param vaultToken Value for String + */ + @JsonSetter("vault_token") + public void setVaultToken(String vaultToken) { + this.vaultToken = vaultToken; + } + + /** + * Internal Getter for GatewayHandle. + * @return Returns the Internal String + */ + @JsonGetter("gateway_handle") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetGatewayHandle() { + return this.gatewayHandle; + } + + /** + * Getter for GatewayHandle. + * @return Returns the String + */ + public String getGatewayHandle() { + return OptionalNullable.getFrom(gatewayHandle); + } + + /** + * Setter for GatewayHandle. + * @param gatewayHandle Value for String + */ + @JsonSetter("gateway_handle") + public void setGatewayHandle(String gatewayHandle) { + this.gatewayHandle = OptionalNullable.of(gatewayHandle); + } + + /** + * UnSetter for GatewayHandle. + */ + public void unsetGatewayHandle() { + gatewayHandle = null; + } + + /** + * Internal Getter for CustomerVaultToken. + * @return Returns the Internal String + */ + @JsonGetter("customer_vault_token") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetCustomerVaultToken() { + return this.customerVaultToken; + } + + /** + * Getter for CustomerVaultToken. + * @return Returns the String + */ + public String getCustomerVaultToken() { + return OptionalNullable.getFrom(customerVaultToken); + } + + /** + * Setter for CustomerVaultToken. + * @param customerVaultToken Value for String + */ + @JsonSetter("customer_vault_token") + public void setCustomerVaultToken(String customerVaultToken) { + this.customerVaultToken = OptionalNullable.of(customerVaultToken); + } + + /** + * UnSetter for CustomerVaultToken. + */ + public void unsetCustomerVaultToken() { + customerVaultToken = null; + } + + /** + * Converts this TokenizedPaymentProfile into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "TokenizedPaymentProfile [" + "id=" + id + ", vaultToken=" + vaultToken + + ", gatewayHandle=" + gatewayHandle + ", customerVaultToken=" + customerVaultToken + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link TokenizedPaymentProfile.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link TokenizedPaymentProfile.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(id) + .vaultToken(getVaultToken()); + builder.gatewayHandle = internalGetGatewayHandle(); + builder.customerVaultToken = internalGetCustomerVaultToken(); + return builder; + } + + /** + * Class to build instances of {@link TokenizedPaymentProfile}. + */ + public static class Builder { + private int id; + private String vaultToken; + private OptionalNullable gatewayHandle; + private OptionalNullable customerVaultToken; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param id int value for id. + */ + public Builder(int id) { + this.id = id; + } + + /** + * Setter for id. + * @param id int value for id. + * @return Builder + */ + public Builder id(int id) { + this.id = id; + return this; + } + + /** + * Setter for vaultToken. + * @param vaultToken String value for vaultToken. + * @return Builder + */ + public Builder vaultToken(String vaultToken) { + this.vaultToken = vaultToken; + return this; + } + + /** + * Setter for gatewayHandle. + * @param gatewayHandle String value for gatewayHandle. + * @return Builder + */ + public Builder gatewayHandle(String gatewayHandle) { + this.gatewayHandle = OptionalNullable.of(gatewayHandle); + return this; + } + + /** + * UnSetter for gatewayHandle. + * @return Builder + */ + public Builder unsetGatewayHandle() { + gatewayHandle = null; + return this; + } + + /** + * Setter for customerVaultToken. + * @param customerVaultToken String value for customerVaultToken. + * @return Builder + */ + public Builder customerVaultToken(String customerVaultToken) { + this.customerVaultToken = OptionalNullable.of(customerVaultToken); + return this; + } + + /** + * UnSetter for customerVaultToken. + * @return Builder + */ + public Builder unsetCustomerVaultToken() { + customerVaultToken = null; + return this; + } + + /** + * Builds a new {@link TokenizedPaymentProfile} object using the set fields. + * @return {@link TokenizedPaymentProfile} + */ + public TokenizedPaymentProfile build() { + return new TokenizedPaymentProfile(id, vaultToken, gatewayHandle, customerVaultToken); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java b/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java index 8737fe4c..fb05847f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java @@ -21,6 +21,10 @@ public enum WebhookSubscription { COMPONENT_ALLOCATION_CHANGE, + CHJS_TOKENIZATION_FAILURE, + + CHJS_TOKENIZATION_SUCCESS, + CUSTOMER_CREATE, CUSTOMER_UPDATE, @@ -33,6 +37,8 @@ public enum WebhookSubscription { INVOICE_ISSUED, + INVOICE_PENDING, + METERED_USAGE, PAYMENT_FAILURE, @@ -94,12 +100,15 @@ public enum WebhookSubscription { static { BILLING_DATE_CHANGE.value = "billing_date_change"; COMPONENT_ALLOCATION_CHANGE.value = "component_allocation_change"; + CHJS_TOKENIZATION_FAILURE.value = "chjs_tokenization_failure"; + CHJS_TOKENIZATION_SUCCESS.value = "chjs_tokenization_success"; CUSTOMER_CREATE.value = "customer_create"; CUSTOMER_UPDATE.value = "customer_update"; DUNNING_STEP_REACHED.value = "dunning_step_reached"; EXPIRING_CARD.value = "expiring_card"; EXPIRATION_DATE_CHANGE.value = "expiration_date_change"; INVOICE_ISSUED.value = "invoice_issued"; + INVOICE_PENDING.value = "invoice_pending"; METERED_USAGE.value = "metered_usage"; PAYMENT_FAILURE.value = "payment_failure"; PAYMENT_SUCCESS.value = "payment_success"; @@ -130,12 +139,15 @@ public enum WebhookSubscription { valueMap.put("billing_date_change", BILLING_DATE_CHANGE); valueMap.put("component_allocation_change", COMPONENT_ALLOCATION_CHANGE); + valueMap.put("chjs_tokenization_failure", CHJS_TOKENIZATION_FAILURE); + valueMap.put("chjs_tokenization_success", CHJS_TOKENIZATION_SUCCESS); valueMap.put("customer_create", CUSTOMER_CREATE); valueMap.put("customer_update", CUSTOMER_UPDATE); valueMap.put("dunning_step_reached", DUNNING_STEP_REACHED); valueMap.put("expiring_card", EXPIRING_CARD); valueMap.put("expiration_date_change", EXPIRATION_DATE_CHANGE); valueMap.put("invoice_issued", INVOICE_ISSUED); + valueMap.put("invoice_pending", INVOICE_PENDING); valueMap.put("metered_usage", METERED_USAGE); valueMap.put("payment_failure", PAYMENT_FAILURE); valueMap.put("payment_success", PAYMENT_SUCCESS); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/EventEventSpecificData.java b/src/main/java/com/maxio/advancedbilling/models/containers/EventEventSpecificData.java index 1666661c..a6b35103 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/EventEventSpecificData.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/EventEventSpecificData.java @@ -16,6 +16,8 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.maxio.advancedbilling.ApiHelper; +import com.maxio.advancedbilling.models.ChjsTokenizationFailure; +import com.maxio.advancedbilling.models.ChjsTokenizationSuccess; import com.maxio.advancedbilling.models.ComponentAllocationChange; import com.maxio.advancedbilling.models.CreditAccountBalanceChanged; import com.maxio.advancedbilling.models.CustomFieldValueChange; @@ -220,6 +222,26 @@ public static EventEventSpecificData fromCustomFieldValueChange( return customFieldValueChange == null ? null : new CustomFieldValueChangeCase(customFieldValueChange); } + /** + * This is Chjs Tokenization Success case. + * @param chjsTokenizationSuccess ChjsTokenizationSuccess value for chjsTokenizationSuccess. + * @return The ChjsTokenizationSuccessCase object. + */ + public static EventEventSpecificData fromChjsTokenizationSuccess( + ChjsTokenizationSuccess chjsTokenizationSuccess) { + return chjsTokenizationSuccess == null ? null : new ChjsTokenizationSuccessCase(chjsTokenizationSuccess); + } + + /** + * This is Chjs Tokenization Failure case. + * @param chjsTokenizationFailure ChjsTokenizationFailure value for chjsTokenizationFailure. + * @return The ChjsTokenizationFailureCase object. + */ + public static EventEventSpecificData fromChjsTokenizationFailure( + ChjsTokenizationFailure chjsTokenizationFailure) { + return chjsTokenizationFailure == null ? null : new ChjsTokenizationFailureCase(chjsTokenizationFailure); + } + /** * Method to match from the provided one-of cases. * @param The type to return after applying callback. @@ -268,6 +290,10 @@ public interface Cases { R itemPricePointChanged(ItemPricePointChanged itemPricePointChanged); R customFieldValueChange(CustomFieldValueChange customFieldValueChange); + + R chjsTokenizationSuccess(ChjsTokenizationSuccess chjsTokenizationSuccess); + + R chjsTokenizationFailure(ChjsTokenizationFailure chjsTokenizationFailure); } /** @@ -828,6 +854,68 @@ public String toString() { } } + /** + * This is a implementation class for ChjsTokenizationSuccessCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ChjsTokenizationSuccess") + private static class ChjsTokenizationSuccessCase extends EventEventSpecificData { + + @JsonValue + private ChjsTokenizationSuccess chjsTokenizationSuccess; + + ChjsTokenizationSuccessCase(ChjsTokenizationSuccess chjsTokenizationSuccess) { + this.chjsTokenizationSuccess = chjsTokenizationSuccess; + } + + @Override + public R match(Cases cases) { + return cases.chjsTokenizationSuccess(this.chjsTokenizationSuccess); + } + + @JsonCreator + private ChjsTokenizationSuccessCase(JsonNode jsonNode) throws IOException { + this.chjsTokenizationSuccess = ApiHelper.deserialize(jsonNode, + ChjsTokenizationSuccess.class); + } + + @Override + public String toString() { + return chjsTokenizationSuccess.toString(); + } + } + + /** + * This is a implementation class for ChjsTokenizationFailureCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ChjsTokenizationFailure") + private static class ChjsTokenizationFailureCase extends EventEventSpecificData { + + @JsonValue + private ChjsTokenizationFailure chjsTokenizationFailure; + + ChjsTokenizationFailureCase(ChjsTokenizationFailure chjsTokenizationFailure) { + this.chjsTokenizationFailure = chjsTokenizationFailure; + } + + @Override + public R match(Cases cases) { + return cases.chjsTokenizationFailure(this.chjsTokenizationFailure); + } + + @JsonCreator + private ChjsTokenizationFailureCase(JsonNode jsonNode) throws IOException { + this.chjsTokenizationFailure = ApiHelper.deserialize(jsonNode, + ChjsTokenizationFailure.class); + } + + @Override + public String toString() { + return chjsTokenizationFailure.toString(); + } + } + /** * This is a custom deserializer class for EventEventSpecificData. */ @@ -849,7 +937,8 @@ public EventEventSpecificData deserialize(JsonParser jp, DeserializationContext CreditAccountBalanceChangedCase.class, PrepaymentAccountBalanceChangedCase.class, PaymentCollectionMethodChangedCase.class, ItemPricePointChangedCase.class, - CustomFieldValueChangeCase.class), true); + CustomFieldValueChangeCase.class, ChjsTokenizationSuccessCase.class, + ChjsTokenizationFailureCase.class), true); } } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/components/ComponentCreatePricePointTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/components/ComponentCreatePricePointTest.java index bb4cd45a..6b03e43a 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/components/ComponentCreatePricePointTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/components/ComponentCreatePricePointTest.java @@ -367,7 +367,7 @@ private Stream argsForShouldReturn422WhenInputDataIsIncorrect() { .build()), Map.of("expiration_interval", List.of("Rollover allocation option must be true to use expiration interval"), "expiration_interval_unit", List.of("Expiration interval unit: cannot be blank."), - "base", List.of("Overage pricing scheme must be defined for prepaid components"), + "base", List.of("Overage pricing scheme must be defined"), "overage_prices", List.of("At least 1 overage price bracket must be defined")) ) ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/components/create/ComponentsControllerCreatePrepaidTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/components/create/ComponentsControllerCreatePrepaidTest.java index 8dadae2c..d1079864 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/components/create/ComponentsControllerCreatePrepaidTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/components/create/ComponentsControllerCreatePrepaidTest.java @@ -199,7 +199,7 @@ void shouldReturn422WhenInputDataIsIncorrect() { "Handle must start with a letter or number and may only contain lowercase letters, numbers, or the characters ':', '-', or '_'.", "Unit name: cannot be blank.", "At least 1 price bracket must be defined", - "Overage pricing scheme must be defined for prepaid components", + "Overage pricing scheme must be defined", "At least 1 overage price bracket must be defined") .isUnprocessableEntity(); } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java index cfa38c63..39b577a1 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java @@ -232,6 +232,7 @@ void shouldCreateInvoice() throws IOException, ApiException { .productPricePointId(null) .customItem(false) .kind("delay_capture") + .taxIncluded(false) .build(), new InvoiceLineItem.Builder() .title("Custom line") @@ -253,6 +254,7 @@ void shouldCreateInvoice() throws IOException, ApiException { .productPricePointId(null) .customItem(true) .kind("delay_capture") + .taxIncluded(false) .build(), new InvoiceLineItem.Builder() .title(meteredComponent.getName()) @@ -274,6 +276,7 @@ void shouldCreateInvoice() throws IOException, ApiException { .productPricePointId(null) .customItem(false) .kind("delay_capture") + .taxIncluded(false) .build() ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java index d631b7b4..4a6ae26e 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java @@ -232,6 +232,7 @@ void shouldIssuePendingInvoice() throws IOException, ApiException { .componentId(quantityBasedComponent.getId()) .pricePointId(quantityBasedComponent.getDefaultPricePointId()) .customItem(false) + .taxIncluded(false) .build() ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListCreditNotesTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListCreditNotesTest.java index 0872713b..c9cfc472 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListCreditNotesTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListCreditNotesTest.java @@ -195,6 +195,7 @@ void shouldReturnListOfCreditNotesWithAdditionalLineItemsData() throws IOExcepti .pricePointId(null) .billingScheduleItemId(null) .customItem(false) + .taxIncluded(false) .build(), new CreditNoteLineItem.Builder() .title(quantityBasedComponent.getName()) @@ -214,6 +215,7 @@ void shouldReturnListOfCreditNotesWithAdditionalLineItemsData() throws IOExcepti .pricePointId(quantityBasedComponent.getDefaultPricePointId()) .billingScheduleItemId(null) .customItem(false) + .taxIncluded(false) .build() ); } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java index ee7bcdc6..472827a2 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java @@ -182,6 +182,7 @@ void shouldReadCreditNotes() throws IOException, ApiException, InterruptedExcept .pricePointId(null) .billingScheduleItemId(null) .customItem(false) + .taxIncluded(false) .build(), new CreditNoteLineItem.Builder() .title(quantityBasedComponent.getName()) @@ -201,6 +202,7 @@ void shouldReadCreditNotes() throws IOException, ApiException, InterruptedExcept .pricePointId(quantityBasedComponent.getDefaultPricePointId()) .billingScheduleItemId(null) .customItem(false) + .taxIncluded(false) .build() ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerListSubscriptionProformaInvoicesTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerListSubscriptionProformaInvoicesTest.java index 8bda9a0e..e1931295 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerListSubscriptionProformaInvoicesTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerListSubscriptionProformaInvoicesTest.java @@ -166,37 +166,52 @@ public void shouldListProformaInvoices() throws IOException, ApiException { ); // discounts - ProformaInvoiceDiscount.Builder discountBuilder = new ProformaInvoiceDiscount.Builder() + ProformaInvoiceDiscount singleLineDiscount = new ProformaInvoiceDiscount.Builder() .title("Coupon: %s - %s".formatted(coupon.getCode(), coupon.getDescription())) .code(coupon.getCode()) .discountAmount("12.5") .discountType(InvoiceDiscountType.FLAT_AMOUNT) .eligibleAmount("500.0") - .sourceType(ProformaInvoiceDiscountSourceType.COUPON); - assertThat(expectedInvoices).extracting(p -> p.getDiscounts().get(0)) - .usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration.builder() - .withIgnoredFields("uid") - // also ignore uid nested in InvoiceDiscountBreakouts list - .withComparatorForType(((o1, o2) -> o1.getDiscountAmount().equals(o2.getDiscountAmount()) && - o1.getEligibleAmount().equals(o2.getEligibleAmount()) ? 0 : -1), - InvoiceDiscountBreakout.class) - .build()) - .containsOnly( - discountBuilder - .lineItemBreakouts(List.of( - new InvoiceDiscountBreakout(null, "500.0", "12.5") - )) - .build(), - discountBuilder - .title(coupon.getDescription()) - .eligibleAmount("770.0") - .discountAmount("25.0") - .lineItemBreakouts(List.of( - new InvoiceDiscountBreakout(null, "20.0", "12.5"), - new InvoiceDiscountBreakout(null, "500.0", "12.5") - )) - .build() - ); + .sourceType(ProformaInvoiceDiscountSourceType.COUPON) + .lineItemBreakouts(List.of( + new InvoiceDiscountBreakout(null, "500.0", "12.5") + )) + .build(); + + RecursiveComparisonConfiguration discountComparatorConfig = RecursiveComparisonConfiguration.builder() + .withIgnoredFields("uid") + .withComparatorForType(((o1, o2) -> o1.getDiscountAmount().equals(o2.getDiscountAmount()) && + o1.getEligibleAmount().equals(o2.getEligibleAmount()) ? 0 : -1), + InvoiceDiscountBreakout.class) + .build(); + + // invoices 1 and 2 have a single discount (product-only line item) + assertThat(proformaInvoice1.getDiscounts()) + .usingRecursiveFieldByFieldElementComparator(discountComparatorConfig) + .containsExactly(singleLineDiscount); + assertThat(proformaInvoice2.getDiscounts()) + .usingRecursiveFieldByFieldElementComparator(discountComparatorConfig) + .containsExactly(singleLineDiscount); + + // invoices 3 and 4 now return a single per-line discount (component line only) + ProformaInvoiceDiscount componentLineDiscount = new ProformaInvoiceDiscount.Builder() + .title(coupon.getDescription()) + .code(coupon.getCode()) + .discountAmount("12.5") + .discountType(InvoiceDiscountType.FLAT_AMOUNT) + .eligibleAmount("20.0") + .sourceType(ProformaInvoiceDiscountSourceType.COUPON) + .lineItemBreakouts(List.of( + new InvoiceDiscountBreakout(null, "20.0", "12.5") + )) + .build(); + + assertThat(proformaInvoice3.getDiscounts()) + .usingRecursiveFieldByFieldElementComparator(discountComparatorConfig) + .containsExactly(componentLineDiscount); + assertThat(proformaInvoice4Voided.getDiscounts()) + .usingRecursiveFieldByFieldElementComparator(discountComparatorConfig) + .containsExactly(componentLineDiscount); // credits assertThat(proformaInvoice1.getCredits()).isEmpty(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java index 6a49fadb..a7152030 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java @@ -184,6 +184,7 @@ void shouldListSubscriptionGroupProformaInvoices() throws IOException, ApiExcept .pricePointId(null) .productPricePointId(product.getDefaultProductPricePointId()) .customItem(false) + .taxIncluded(false) .build() ); } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java index 1875a589..8ef0fa1c 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java @@ -274,6 +274,7 @@ void assertProformaInvoice(Customer customer, .pricePointId(null) .productPricePointId(product.getDefaultProductPricePointId()) .customItem(false) + .taxIncluded(false) .build()); expectedLineItems.add( new InvoiceLineItem.Builder() @@ -298,6 +299,7 @@ void assertProformaInvoice(Customer customer, .pricePointId(meteredComponent.getDefaultPricePointId()) .productPricePointId(product.getDefaultProductPricePointId()) .customItem(false) + .taxIncluded(false) .build()); expectedLineItems.add( new InvoiceLineItem.Builder() @@ -320,6 +322,7 @@ void assertProformaInvoice(Customer customer, .pricePointId(quantityBasedComponent.getDefaultPricePointId()) .productPricePointId(product.getDefaultProductPricePointId()) .customItem(false) + .taxIncluded(false) .build() ); @@ -346,6 +349,7 @@ void assertProformaInvoice(Customer customer, .pricePointId(quantityBasedComponent.getDefaultPricePointId()) .productPricePointId(product.getDefaultProductPricePointId()) .customItem(false) + .taxIncluded(false) .build() ); } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptiongroups/SubscriptionGroupsControllerReadTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptiongroups/SubscriptionGroupsControllerReadTest.java index 7b9b915e..3bf4db24 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptiongroups/SubscriptionGroupsControllerReadTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptiongroups/SubscriptionGroupsControllerReadTest.java @@ -19,7 +19,6 @@ import com.maxio.advancedbilling.models.SubscriptionGroupPrepayment; import com.maxio.advancedbilling.models.SubscriptionGroupPrepaymentMethod; import com.maxio.advancedbilling.models.SubscriptionGroupPrepaymentRequest; -import com.maxio.advancedbilling.models.SubscriptionGroupResponse; import com.maxio.advancedbilling.models.SubscriptionState; import com.maxio.advancedbilling.models.containers.IssueServiceCreditAmount; import com.maxio.advancedbilling.utils.TestSetup; @@ -43,9 +42,10 @@ public class SubscriptionGroupsControllerReadTest { private static final AdvancedBillingClient CLIENT = TestClientProvider.getClient(); private static final SubscriptionGroupsController SUBSCRIPTION_GROUPS_CONTROLLER = CLIENT.getSubscriptionGroupsController(); - private static SubscriptionGroupResponse createSubscriptionGroupResponse; private static Integer primarySubscriptionId; + private static Integer subscription2Id; private static Customer customer; + private static Customer groupCustomer; private static Product product; @BeforeAll @@ -56,12 +56,10 @@ static void setUp() throws IOException, ApiException { @AfterAll static void tearDown() throws IOException, ApiException { - if (createSubscriptionGroupResponse != null && primarySubscriptionId != null) { + if (primarySubscriptionId != null) { new TestTeardown().deleteSubscriptionGroup(primarySubscriptionId, - createSubscriptionGroupResponse.getSubscriptionGroup().getSubscriptionIds(), - createSubscriptionGroupResponse.getSubscriptionGroup().getCustomerId()); - createSubscriptionGroupResponse = null; - primarySubscriptionId = null; + List.of(primarySubscriptionId, subscription2Id), + groupCustomer.getId()); } new TestTeardown().deleteCustomer(customer); } @@ -69,14 +67,15 @@ static void tearDown() throws IOException, ApiException { @Test void shouldReadSubscriptionGroup() throws IOException, ApiException { // given - Customer customer = TEST_SETUP.createCustomer(); - Subscription subscription1 = TEST_SETUP.createSubscription(customer, product); - Subscription subscription2 = TEST_SETUP.createSubscription(customer, product); + groupCustomer = TEST_SETUP.createCustomer(); + Subscription subscription1 = TEST_SETUP.createSubscription(groupCustomer, product); + Subscription subscription2 = TEST_SETUP.createSubscription(groupCustomer, product); + subscription2Id = subscription2.getId(); Component component = TEST_SETUP.createQuantityBasedComponent(product.getProductFamily().getId()); // when // create group - createSubscriptionGroupResponse = SUBSCRIPTION_GROUPS_CONTROLLER + SUBSCRIPTION_GROUPS_CONTROLLER .createSubscriptionGroup(new CreateSubscriptionGroupRequest(new CreateSubscriptionGroup.Builder() .subscriptionId(subscription1.getId()) .memberIds(List.of(subscription2.getId())) @@ -100,6 +99,7 @@ void shouldReadSubscriptionGroup() throws IOException, ApiException { CLIENT.getSubscriptionComponentsController().allocateComponent(subscription1.getId(), component.getId(), new CreateAllocationRequest( new CreateAllocation.Builder() .quantity(3) + .accrueCharge(false) .build() )); @@ -114,16 +114,16 @@ void shouldReadSubscriptionGroup() throws IOException, ApiException { assertThat(subscriptionGroup.getAccountBalances().getOpenInvoices().getBalanceInCents()).isEqualTo(0); assertThat(subscriptionGroup.getAccountBalances().getPrepayments().getBalanceInCents()).isEqualTo(300); assertThat(subscriptionGroup.getAccountBalances().getPendingDiscounts().getBalanceInCents()).isEqualTo(0); - assertThat(subscriptionGroup.getAccountBalances().getServiceCredits().getBalanceInCents()).isEqualTo(500); + assertThat(subscriptionGroup.getAccountBalances().getServiceCredits().getBalanceInCents()).isEqualTo(200); assertThat(subscriptionGroup.getCancelAtEndOfPeriod()).isFalse(); assertThat(subscriptionGroup.getCurrentBillingAmountInCents()).isNull(); - assertThat(subscriptionGroup.getCustomerId()).isEqualTo(customer.getId()); - assertThat(subscriptionGroup.getCustomer().getFirstName()).isEqualTo(customer.getFirstName()); - assertThat(subscriptionGroup.getCustomer().getLastName()).isEqualTo(customer.getLastName()); - assertThat(subscriptionGroup.getCustomer().getOrganization()).isEqualTo(customer.getOrganization()); - assertThat(subscriptionGroup.getCustomer().getReference()).isEqualTo(customer.getReference()); + assertThat(subscriptionGroup.getCustomerId()).isEqualTo(groupCustomer.getId()); + assertThat(subscriptionGroup.getCustomer().getFirstName()).isEqualTo(groupCustomer.getFirstName()); + assertThat(subscriptionGroup.getCustomer().getLastName()).isEqualTo(groupCustomer.getLastName()); + assertThat(subscriptionGroup.getCustomer().getOrganization()).isEqualTo(groupCustomer.getOrganization()); + assertThat(subscriptionGroup.getCustomer().getReference()).isEqualTo(groupCustomer.getReference()); assertThat(subscriptionGroup.getNextAssessmentAt()).isAfter(ZonedDateTime.now()); assertThat(subscriptionGroup.getPaymentProfileId()).isNotNull(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/EventSpecificDataGetter.java b/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/EventSpecificDataGetter.java index 3fc0b21d..693385f2 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/EventSpecificDataGetter.java +++ b/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/EventSpecificDataGetter.java @@ -1,5 +1,7 @@ package com.maxio.advancedbilling.utils.matchers; +import com.maxio.advancedbilling.models.ChjsTokenizationFailure; +import com.maxio.advancedbilling.models.ChjsTokenizationSuccess; import com.maxio.advancedbilling.models.ComponentAllocationChange; import com.maxio.advancedbilling.models.CreditAccountBalanceChanged; import com.maxio.advancedbilling.models.CustomFieldValueChange; @@ -111,4 +113,14 @@ public R itemPricePointChanged(ItemPricePointChanged itemPricePointChanged) { public R customFieldValueChange(CustomFieldValueChange customFieldValueChange) { return (R) customFieldValueChange; } + + @Override + public R chjsTokenizationSuccess(ChjsTokenizationSuccess chjsTokenizationSuccess) { + return (R) chjsTokenizationSuccess; + } + + @Override + public R chjsTokenizationFailure(ChjsTokenizationFailure chjsTokenizationFailure) { + return (R) chjsTokenizationFailure; + } }