diff --git a/README.md b/README.md index 040fe01c..a8bbc9bc 100644 --- a/README.md +++ b/README.md @@ -29,25 +29,25 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json Run the following command from your project directory to install the package from npm: ```bash -npm install @maxio-com/advanced-billing-sdk@9.0.0 +npm install @maxio-com/advanced-billing-sdk@9.1.0 ``` -For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@9.0.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/9.0.0). +For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@9.1.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/9.1.0). ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-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-typescript-sdk/tree/9.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| environment | [`Environment`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | | timeout | `number` | Timeout for API calls.
*Default*: `120000` | -| httpClientOptions | [`Partial`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/http-client-options.md) | Stable configurable http client options. | +| httpClientOptions | [`Partial`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/http-client-options.md) | Stable configurable http client options. | | unstableHttpClientOptions | `any` | Unstable configurable http client options. | -| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/auth/basic-authentication.md) | The credential object for basicAuth | +| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/auth/basic-authentication.md) | The credential object for basicAuth | The API client can be initialized as follows: @@ -84,7 +84,7 @@ const fileContent = fs.readFileSync(absolutePath, 'utf-8'); const client = Client.fromJsonConfig(fileContent); ``` -See the [Configuration-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/configuration-based-client-initialization.md) section for details. +See the [Configuration-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/configuration-based-client-initialization.md) section for details. ### Environment-Based Client Initialization @@ -106,7 +106,7 @@ if (fs.existsSync(absolutePath)) { const client = Client.fromEnvironment(process.env); ``` -See the [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/environment-based-client-initialization.md) section for details. +See the [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/environment-based-client-initialization.md) section for details. ## Environments @@ -123,60 +123,60 @@ 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-typescript-sdk/tree/9.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-products.md) -* [Subscription Renewals](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-renewals.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [HttpClientOptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/http-client-options.md) -* [RetryConfiguration](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/retry-configuration.md) -* [ProxySettings](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/proxy-settings.md) -* [Configuration-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/configuration-based-client-initialization.md) -* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/environment-based-client-initialization.md) +* [HttpClientOptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/http-client-options.md) +* [RetryConfiguration](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/retry-configuration.md) +* [ProxySettings](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/proxy-settings.md) +* [Configuration-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/configuration-based-client-initialization.md) +* [Environment-Based Client Initialization](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/environment-based-client-initialization.md) ### HTTP -* [HttpRequest](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/http-request.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/http-request.md) ### Utilities -* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/api-response.md) -* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.0.0/doc/api-error.md) +* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/api-response.md) +* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/9.1.0/doc/api-error.md) diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 5e3b6041..4773adf0 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -17,7 +17,7 @@ const advanceInvoiceController = new AdvanceInvoiceController(client); # 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. @@ -30,6 +30,10 @@ async issueAdvanceInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ async issueAdvanceInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -91,7 +97,7 @@ 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. ```ts async readAdvanceInvoice( @@ -100,6 +106,10 @@ async readAdvanceInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -109,6 +119,8 @@ async readAdvanceInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -160,6 +172,10 @@ async voidAdvanceInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -170,6 +186,8 @@ async voidAdvanceInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index f3e98800..940a16bb 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -23,7 +23,7 @@ const aPIExportsController = new APIExportsController(client); # 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`. @@ -42,6 +42,10 @@ async listExportedProformaInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -53,6 +57,8 @@ async listExportedProformaInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice[]`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -97,7 +103,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`. @@ -116,6 +122,10 @@ async listExportedInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -127,6 +137,8 @@ async listExportedInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice[]`](../../doc/models/invoice.md). ## Example Usage @@ -171,7 +183,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`. @@ -190,6 +202,10 @@ async listExportedSubscriptions( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -201,6 +217,8 @@ async listExportedSubscriptions( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Subscription[]`](../../doc/models/subscription.md). ## Example Usage @@ -245,7 +263,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. @@ -255,6 +273,10 @@ async exportProformaInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -263,6 +285,8 @@ async exportProformaInvoices( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage @@ -305,7 +329,7 @@ try { # Export Invoices -This API creates an invoices export and returns a batchjob object. +Creates an invoices export and returns a batch job object. ```ts async exportInvoices( @@ -313,6 +337,10 @@ async exportInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -321,6 +349,8 @@ async exportInvoices( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage @@ -363,7 +393,7 @@ try { # Export Subscriptions -This API creates a subscriptions export and returns a batchjob object. +Creates a subscriptions export and returns a batch job object. ```ts async exportSubscriptions( @@ -371,6 +401,10 @@ async exportSubscriptions( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -379,6 +413,8 @@ async exportSubscriptions( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage @@ -420,7 +456,7 @@ 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. ```ts async readProformaInvoicesExport( @@ -429,6 +465,10 @@ async readProformaInvoicesExport( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -438,6 +478,8 @@ async readProformaInvoicesExport( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage @@ -478,7 +520,7 @@ try { # Read Invoices Export -This API returns a batchjob object for invoices export. +Returns a batch job object for an invoices export. ```ts async readInvoicesExport( @@ -487,6 +529,10 @@ async readInvoicesExport( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -496,6 +542,8 @@ async readInvoicesExport( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage @@ -536,7 +584,7 @@ try { # Read Subscriptions Export -This API returns a batchjob object for subscriptions export. +Returns a batch job object for a subscriptions export. ```ts async readSubscriptionsExport( @@ -545,6 +593,10 @@ async readSubscriptionsExport( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -554,6 +606,8 @@ async readSubscriptionsExport( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BatchJobResponse`](../../doc/models/batch-job-response.md). ## Example Usage diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index 53f142a9..be71de39 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -18,11 +18,13 @@ const billingPortalController = new BillingPortalController(client); # 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. @@ -42,6 +44,10 @@ async enableBillingPortalForCustomer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -52,6 +58,8 @@ async enableBillingPortalForCustomer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse`](../../doc/models/customer-response.md). ## Example Usage @@ -95,7 +103,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 @@ -112,6 +120,10 @@ async readBillingPortalLink( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -121,6 +133,8 @@ async readBillingPortalLink( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PortalManagementLink`](../../doc/models/portal-management-link.md). ## Example Usage @@ -180,15 +194,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 @@ -201,6 +213,10 @@ async resendBillingPortalInvitation( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -210,6 +226,8 @@ async resendBillingPortalInvitation( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ResentInvitation`](../../doc/models/resent-invitation.md). ## Example Usage @@ -265,7 +283,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. @@ -280,6 +298,10 @@ async revokeBillingPortalAccess( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -289,6 +311,8 @@ async revokeBillingPortalAccess( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 6548468b..02406921 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -40,6 +40,10 @@ async promoteComponentPricePointToDefault( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -50,6 +54,8 @@ async promoteComponentPricePointToDefault( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -132,6 +138,10 @@ async createComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -142,6 +152,8 @@ async createComponentPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md). ## Example Usage @@ -209,7 +221,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. @@ -236,6 +248,10 @@ async listComponentPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -249,6 +265,8 @@ async listComponentPricePoints( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md). ## Example Usage @@ -337,7 +355,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. ```ts async bulkCreateComponentPricePoints( @@ -347,6 +365,10 @@ async bulkCreateComponentPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -357,6 +379,8 @@ async bulkCreateComponentPricePoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md). ## Example Usage @@ -509,6 +533,10 @@ async cloneComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -520,6 +548,8 @@ async cloneComponentPricePoint( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md). ## Example Usage @@ -648,7 +678,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. @@ -665,6 +695,10 @@ async updateComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -676,6 +710,8 @@ async updateComponentPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md). ## Example Usage @@ -746,7 +782,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. ```ts async readComponentPricePoint( @@ -757,6 +793,10 @@ async readComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -768,6 +808,8 @@ async readComponentPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md). ## Example Usage @@ -807,7 +849,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. ```ts async archiveComponentPricePoint( @@ -817,6 +859,10 @@ async archiveComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -827,6 +873,8 @@ async archiveComponentPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md). ## Example Usage @@ -909,7 +957,7 @@ try { # Unarchive Component Price Point -Use this endpoint to unarchive a component price point. +Unarchives a component price point. ```ts async unarchiveComponentPricePoint( @@ -919,6 +967,10 @@ async unarchiveComponentPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -929,6 +981,8 @@ async unarchiveComponentPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md). ## Example Usage @@ -1002,7 +1056,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. @@ -1016,6 +1070,10 @@ async createCurrencyPrices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1026,6 +1084,8 @@ async createCurrencyPrices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md). ## Example Usage @@ -1104,7 +1164,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. @@ -1116,6 +1176,10 @@ async updateCurrencyPrices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1126,6 +1190,8 @@ async updateCurrencyPrices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md). ## Example Usage @@ -1202,7 +1268,7 @@ 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. ```ts async listAllComponentPricePoints( @@ -1223,6 +1289,10 @@ async listAllComponentPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1236,6 +1306,8 @@ async listAllComponentPricePoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListComponentsPricePointsResponse`](../../doc/models/list-components-price-points-response.md). ## Example Usage diff --git a/doc/controllers/components.md b/doc/controllers/components.md index caba7ca1..0ed134cc 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -12,7 +12,7 @@ const componentsController = new ComponentsController(client); * [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 @@ const componentsController = new ComponentsController(client); # 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. @@ -42,6 +42,10 @@ async createMeteredComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -52,6 +56,8 @@ async createMeteredComponent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -164,9 +170,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 @@ -188,6 +194,10 @@ async createQuantityBasedComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -198,6 +208,8 @@ async createQuantityBasedComponent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -309,9 +321,9 @@ try { | 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseError`](../../doc/models/error-list-response-error.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). @@ -325,6 +337,10 @@ async createOnOffComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -335,6 +351,8 @@ async createOnOffComponent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -433,7 +451,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. @@ -447,6 +465,10 @@ async createPrepaidUsageComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -457,6 +479,8 @@ async createPrepaidUsageComponent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -593,7 +617,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. @@ -609,6 +633,10 @@ async createEventBasedComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -619,6 +647,8 @@ async createEventBasedComponent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -723,7 +753,7 @@ 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. ```ts async findComponent( @@ -732,6 +762,10 @@ async findComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -741,6 +775,8 @@ async findComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -817,6 +853,10 @@ async readComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -827,6 +867,8 @@ async readComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -897,7 +939,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:`. @@ -910,6 +952,10 @@ async updateProductFamilyComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -921,6 +967,8 @@ async updateProductFamilyComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -1006,7 +1054,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. ```ts async archiveComponent( @@ -1016,6 +1064,10 @@ async archiveComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1026,6 +1078,8 @@ async archiveComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Component`](../../doc/models/component.md). ## Example Usage @@ -1100,7 +1154,7 @@ try { # List Components -This request will return a list of components for a site. +Lists components for a site. ```ts async listComponents( @@ -1129,6 +1183,10 @@ async listComponents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1146,6 +1204,8 @@ async listComponents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse[]`](../../doc/models/component-response.md). ## Example Usage @@ -1290,7 +1350,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:`. @@ -1302,6 +1362,10 @@ async updateComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1312,6 +1376,8 @@ async updateComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse`](../../doc/models/component-response.md). ## Example Usage @@ -1394,7 +1460,7 @@ 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. ```ts async listComponentsForProductFamily( @@ -1425,6 +1491,10 @@ async listComponentsForProductFamily( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1443,6 +1513,8 @@ async listComponentsForProductFamily( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ComponentResponse[]`](../../doc/models/component-response.md). ## Example Usage diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 30a068fd..e507531d 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -28,21 +28,16 @@ const couponsController = new CouponsController(client); # 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. + ```ts async createCoupon( productFamilyId: number, @@ -51,6 +46,10 @@ async createCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -61,6 +60,8 @@ async createCoupon( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -131,7 +132,7 @@ 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. ```ts async listCouponsForProductFamily( @@ -152,6 +153,10 @@ async listCouponsForProductFamily( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -165,6 +170,8 @@ async listCouponsForProductFamily( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse[]`](../../doc/models/coupon-response.md). ## Example Usage @@ -310,7 +317,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. @@ -323,6 +330,10 @@ async findCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -334,6 +345,8 @@ async findCoupon( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -372,7 +385,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. @@ -388,6 +401,10 @@ async readCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -399,6 +416,8 @@ async readCoupon( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -470,9 +489,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 }` @@ -486,6 +503,10 @@ async updateCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -497,6 +518,8 @@ async updateCoupon( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -597,7 +620,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. @@ -609,6 +632,10 @@ async archiveCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -619,6 +646,8 @@ async archiveCoupon( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -687,7 +716,7 @@ try { # List Coupons -You can retrieve a list of coupons. +Lists coupons for a site. ```ts async listCoupons( @@ -706,6 +735,10 @@ async listCoupons( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -718,6 +751,8 @@ async listCoupons( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse[]`](../../doc/models/coupon-response.md). ## Example Usage @@ -819,7 +854,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. ```ts async readCouponUsage( @@ -829,6 +864,10 @@ async readCouponUsage( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -839,6 +878,8 @@ async readCouponUsage( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponUsage[]`](../../doc/models/coupon-usage.md). ## Example Usage @@ -912,7 +953,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: @@ -942,6 +983,10 @@ async validateCoupon( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -952,6 +997,8 @@ async validateCoupon( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponResponse`](../../doc/models/coupon-response.md). ## Example Usage @@ -1024,7 +1071,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. @@ -1036,6 +1083,10 @@ async createOrUpdateCouponCurrencyPrices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1046,6 +1097,8 @@ async createOrUpdateCouponCurrencyPrices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponCurrencyResponse`](../../doc/models/coupon-currency-response.md). ## Example Usage @@ -1105,6 +1158,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. @@ -1154,6 +1209,10 @@ async createCouponSubcodes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1164,6 +1223,8 @@ async createCouponSubcodes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md). ## Example Usage @@ -1221,7 +1282,7 @@ 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. ```ts async listCouponSubcodes( @@ -1238,6 +1299,10 @@ async listCouponSubcodes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1249,6 +1314,8 @@ async listCouponSubcodes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponSubcodes`](../../doc/models/coupon-subcodes.md). ## Example Usage @@ -1316,7 +1383,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. @@ -1336,6 +1403,10 @@ async updateCouponSubcodes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1346,6 +1417,8 @@ async updateCouponSubcodes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md). ## Example Usage @@ -1391,6 +1464,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: @@ -1422,6 +1497,10 @@ async deleteCouponSubcode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1432,6 +1511,8 @@ async deleteCouponSubcode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index f296025f..bdd7cbed 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -46,6 +46,10 @@ async createMetafields( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -56,6 +60,8 @@ async createMetafields( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Metafield[]`](../../doc/models/metafield.md). ## Example Usage @@ -171,6 +177,10 @@ async listMetafields( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -184,6 +194,8 @@ async listMetafields( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListMetafieldsResponse`](../../doc/models/list-metafields-response.md). ## Example Usage @@ -270,7 +282,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. @@ -286,6 +298,10 @@ async updateMetafield( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -296,6 +312,8 @@ async updateMetafield( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Metafield[]`](../../doc/models/metafield.md). ## Example Usage @@ -349,6 +367,10 @@ async deleteMetafield( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -359,6 +381,8 @@ async deleteMetafield( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -414,6 +438,10 @@ async createMetadata( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -425,6 +453,8 @@ async createMetadata( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Metadata[]`](../../doc/models/metadata.md). ## Example Usage @@ -506,6 +536,10 @@ async listMetadata( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -518,6 +552,8 @@ async listMetadata( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaginatedMetadata`](../../doc/models/paginated-metadata.md). ## Example Usage @@ -582,7 +618,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. ```ts async updateMetadata( @@ -593,6 +629,10 @@ async updateMetadata( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -604,6 +644,8 @@ async updateMetadata( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Metadata[]`](../../doc/models/metadata.md). ## Example Usage @@ -664,6 +706,10 @@ async deleteMetadata( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -676,6 +722,8 @@ async deleteMetadata( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -721,7 +769,7 @@ 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. ```ts async listMetadataForResourceType( @@ -754,6 +802,10 @@ async listMetadataForResourceType( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -773,6 +825,8 @@ async listMetadataForResourceType( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaginatedMetadata`](../../doc/models/paginated-metadata.md). ## Example Usage diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 44138d5c..e16f2548 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -21,7 +21,7 @@ const customersController = new CustomersController(client); # 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. @@ -53,6 +53,10 @@ async createCustomer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -62,6 +66,8 @@ async createCustomer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse`](../../doc/models/customer-response.md). ## Example Usage @@ -157,7 +163,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 @@ -200,6 +206,10 @@ async listCustomers( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -217,6 +227,8 @@ async listCustomers( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse[]`](../../doc/models/customer-response.md). ## Example Usage @@ -348,6 +360,10 @@ async readCustomer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -357,6 +373,8 @@ async readCustomer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse`](../../doc/models/customer-response.md). ## Example Usage @@ -428,7 +446,7 @@ try { # Update Customer -This method allows to update the Customer. +Updates the customer. ```ts async updateCustomer( @@ -438,6 +456,10 @@ async updateCustomer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -448,6 +470,8 @@ async updateCustomer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse`](../../doc/models/customer-response.md). ## Example Usage @@ -534,7 +558,7 @@ try { # Delete Customer -This method allows you to delete the Customer. +Deletes the customer. ```ts async deleteCustomer( @@ -543,6 +567,10 @@ async deleteCustomer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -552,6 +580,8 @@ async deleteCustomer( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -586,7 +616,7 @@ 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. ```ts async readCustomerByReference( @@ -595,6 +625,10 @@ async readCustomerByReference( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -604,6 +638,8 @@ async readCustomerByReference( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerResponse`](../../doc/models/customer-response.md). ## Example Usage @@ -638,7 +674,7 @@ try { # List Customer Subscriptions -This method lists all subscriptions that belong to a customer. +Lists all subscriptions that belong to a customer. ```ts async listCustomerSubscriptions( @@ -647,6 +683,10 @@ async listCustomerSubscriptions( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -656,6 +696,8 @@ async listCustomerSubscriptions( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse[]`](../../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 3678be32..4af8b2af 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -20,7 +20,7 @@ const eventsBasedBillingSegmentsController = new EventsBasedBillingSegmentsContr # 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. @@ -33,6 +33,10 @@ async createSegment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -44,6 +48,8 @@ async createSegment( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SegmentResponse`](../../doc/models/segment-response.md). ## Example Usage @@ -113,7 +119,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. @@ -138,6 +144,10 @@ async listSegmentsForPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -151,6 +161,8 @@ async listSegmentsForPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSegmentsResponse`](../../doc/models/list-segments-response.md). ## Example Usage @@ -203,7 +215,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. @@ -217,6 +229,10 @@ async updateSegment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -229,6 +245,8 @@ async updateSegment( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SegmentResponse`](../../doc/models/segment-response.md). ## Example Usage @@ -281,7 +299,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. @@ -294,6 +312,10 @@ async deleteSegment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -305,6 +327,8 @@ async deleteSegment( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -354,7 +378,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. @@ -369,6 +393,10 @@ async bulkCreateSegments( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -380,6 +408,8 @@ async bulkCreateSegments( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSegmentsResponse`](../../doc/models/list-segments-response.md). ## Example Usage @@ -429,7 +459,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. @@ -444,6 +474,10 @@ async bulkUpdateSegments( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -455,6 +489,8 @@ async bulkUpdateSegments( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSegmentsResponse`](../../doc/models/list-segments-response.md). ## Example Usage diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 9063a299..6d63f908 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -17,11 +17,13 @@ const eventsController = new EventsController(client); # 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 @@ -117,6 +119,10 @@ async listEvents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -136,6 +142,8 @@ async listEvents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`EventResponse[]`](../../doc/models/event-response.md). ## Example Usage @@ -241,7 +249,7 @@ try { # List Subscription Events -The following request will return a list of events for a subscription. +Lists events for a subscription. ## Event Key @@ -276,6 +284,10 @@ async listSubscriptionEvents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -291,6 +303,8 @@ async listSubscriptionEvents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`EventResponse[]`](../../doc/models/event-response.md). ## Example Usage @@ -377,7 +391,7 @@ 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. ```ts async readEventsCount( @@ -400,6 +414,10 @@ async readEventsCount( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -414,6 +432,8 @@ async readEventsCount( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CountResponse`](../../doc/models/count-response.md). ## Example Usage diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index c79e539e..d3264148 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -13,12 +13,12 @@ const insightsController = new InsightsController(client); * [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 @@ -34,6 +34,10 @@ async readSiteStats( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -42,6 +46,8 @@ async readSiteStats( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SiteSummary`](../../doc/models/site-summary.md). ## Example Usage @@ -95,7 +101,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. ```ts async readMrr( @@ -105,6 +111,10 @@ async readMrr( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -115,6 +125,8 @@ async readMrr( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`MRRResponse`](../../doc/models/mrr-response.md). ## Example Usage @@ -169,7 +181,7 @@ try { **This endpoint is deprecated.** -This endpoint returns your site's MRR movements. +Lists your site's MRR movements. ## Understanding MRR movements @@ -211,6 +223,10 @@ async listMrrMovements( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -223,6 +239,8 @@ async listMrrMovements( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListMRRResponse`](../../doc/models/list-mrr-response.md). ## Example Usage @@ -310,7 +328,7 @@ try { ``` -# List Mrr Per Subscription +# List Mrr per Subscription **This endpoint is deprecated.** @@ -335,6 +353,10 @@ async listMrrPerSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -348,6 +370,8 @@ async listMrrPerSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionMRRResponse`](../../doc/models/subscription-mrr-response.md). ## Example Usage diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 2c6934c5..0263128f 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). ```ts async refundInvoice( @@ -47,6 +47,10 @@ async refundInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -57,6 +61,8 @@ async refundInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -171,6 +177,10 @@ async listInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -202,6 +212,8 @@ async listInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListInvoicesResponse`](../../doc/models/list-invoices-response.md). ## Example Usage @@ -557,6 +569,10 @@ async readInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -566,6 +582,8 @@ async readInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -674,6 +692,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", @@ -757,6 +776,10 @@ async listInvoiceEvents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -772,6 +795,8 @@ async listInvoiceEvents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListInvoiceEventsResponse`](../../doc/models/list-invoice-events-response.md). ## Example Usage @@ -909,6 +934,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", @@ -929,6 +955,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", @@ -977,6 +1004,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", @@ -1025,6 +1053,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", @@ -1202,6 +1231,10 @@ async recordPaymentForInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1212,6 +1245,8 @@ async recordPaymentForInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -1269,7 +1304,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. ``` { @@ -1301,6 +1336,10 @@ async recordPaymentForMultipleInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1310,6 +1349,8 @@ async recordPaymentForMultipleInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`MultiInvoicePaymentResponse`](../../doc/models/multi-invoice-payment-response.md). ## Example Usage @@ -1423,6 +1464,10 @@ async listCreditNotes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1439,6 +1484,8 @@ async listCreditNotes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListCreditNotesResponse`](../../doc/models/list-credit-notes-response.md). ## Example Usage @@ -1547,6 +1594,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", @@ -1565,6 +1613,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", @@ -1583,6 +1632,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", @@ -1601,6 +1651,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", @@ -1619,6 +1670,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", @@ -1637,6 +1689,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", @@ -1791,6 +1844,10 @@ async readCreditNote( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1800,6 +1857,8 @@ async readCreditNote( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CreditNote`](../../doc/models/credit-note.md). ## Example Usage @@ -1898,6 +1957,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", @@ -1918,6 +1978,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", @@ -1938,6 +1999,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", @@ -1958,6 +2020,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", @@ -1978,6 +2041,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", @@ -1998,6 +2062,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", @@ -2159,6 +2224,10 @@ async recordPaymentForSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2169,6 +2238,8 @@ async recordPaymentForSubscription( ## Response Type +**201**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`RecordPaymentResponse`](../../doc/models/record-payment-response.md). ## Example Usage @@ -2266,6 +2337,10 @@ async reopenInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2275,6 +2350,8 @@ async reopenInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -2329,6 +2406,10 @@ async voidInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2339,6 +2420,8 @@ async voidInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -2411,6 +2494,10 @@ async listConsolidatedInvoiceSegments( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2423,6 +2510,8 @@ async listConsolidatedInvoiceSegments( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ConsolidatedInvoice`](../../doc/models/consolidated-invoice.md). ## Example Usage @@ -2774,13 +2863,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 @@ -2788,7 +2877,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 @@ -2925,7 +3014,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 @@ -2937,7 +3026,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 @@ -2951,6 +3040,10 @@ async createInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -2961,6 +3054,8 @@ async createInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`InvoiceResponse`](../../doc/models/invoice-response.md). ## Example Usage @@ -3091,6 +3186,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", @@ -3132,6 +3228,10 @@ async sendInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3142,6 +3242,8 @@ async sendInvoice( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -3200,7 +3302,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. @@ -3211,6 +3313,10 @@ async previewCustomerInformationChanges( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3220,6 +3326,8 @@ async previewCustomerInformationChanges( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CustomerChangesPreviewResponse`](../../doc/models/customer-changes-preview-response.md). ## Example Usage @@ -3317,7 +3425,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. @@ -3328,6 +3436,10 @@ async updateCustomerInformation( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3337,6 +3449,8 @@ async updateCustomerInformation( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage @@ -3573,9 +3687,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. @@ -3589,6 +3703,10 @@ async issueInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -3599,6 +3717,8 @@ async issueInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Invoice`](../../doc/models/invoice.md). ## Example Usage diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index f563e2eb..0d0b2dbf 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -19,7 +19,7 @@ const offersController = new OffersController(client); # Create Offer -Create an offer within your Advanced Billing site by sending a POST request. +Creates an offer within your Advanced Billing site. ## Documentation @@ -40,6 +40,10 @@ async createOffer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -49,6 +53,8 @@ async createOffer( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`OfferResponse`](../../doc/models/offer-response.md). ## Example Usage @@ -151,7 +157,7 @@ try { # List Offers -This endpoint will list offers for a site. +Lists offers for a site. ```ts async listOffers( @@ -168,6 +174,10 @@ async listOffers( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -179,6 +189,8 @@ async listOffers( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListOffersResponse`](../../doc/models/list-offers-response.md). ## Example Usage @@ -281,7 +293,7 @@ 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`. ```ts async readOffer( @@ -290,6 +302,10 @@ async readOffer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -299,6 +315,8 @@ async readOffer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`OfferResponse`](../../doc/models/offer-response.md). ## Example Usage @@ -333,7 +351,7 @@ 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. ```ts async archiveOffer( @@ -342,6 +360,10 @@ async archiveOffer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -351,6 +373,8 @@ async archiveOffer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -385,7 +409,7 @@ 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. ```ts async unarchiveOffer( @@ -394,6 +418,10 @@ async unarchiveOffer( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -403,6 +431,8 @@ async unarchiveOffer( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index e00b14c0..dbb6b071 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,68 +42,23 @@ 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. ```ts async createPaymentProfile( @@ -112,6 +67,10 @@ async createPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -121,6 +80,8 @@ async createPaymentProfile( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -199,7 +160,7 @@ 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. ```ts async listPaymentProfiles( @@ -216,6 +177,10 @@ async listPaymentProfiles( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -227,6 +192,8 @@ async listPaymentProfiles( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse[]`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -327,7 +294,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. @@ -372,6 +339,10 @@ async readPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -381,6 +352,8 @@ async readPaymentProfile( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -452,6 +425,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. @@ -495,6 +470,10 @@ async updatePaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -505,6 +484,8 @@ async updatePaymentProfile( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -595,6 +576,10 @@ async deleteUnusedPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -604,6 +589,8 @@ async deleteUnusedPaymentProfile( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -662,6 +649,10 @@ async deleteSubscriptionsPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -672,6 +663,8 @@ async deleteSubscriptionsPaymentProfile( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -711,7 +704,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) ```ts async verifyBankAccount( @@ -721,6 +714,10 @@ async verifyBankAccount( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -731,6 +728,8 @@ async verifyBankAccount( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BankAccountResponse`](../../doc/models/bank-account-response.md). ## Example Usage @@ -825,6 +824,10 @@ async deleteSubscriptionGroupPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -835,6 +838,8 @@ async deleteSubscriptionGroupPaymentProfile( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -874,7 +879,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. @@ -886,6 +891,10 @@ async changeSubscriptionDefaultPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -896,6 +905,8 @@ async changeSubscriptionDefaultPaymentProfile( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -988,6 +999,10 @@ async changeSubscriptionGroupDefaultPaymentProfile( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -998,6 +1013,8 @@ async changeSubscriptionGroupDefaultPaymentProfile( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PaymentProfileResponse`](../../doc/models/payment-profile-response.md). ## Example Usage @@ -1088,6 +1105,10 @@ async readOneTimeToken( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1097,6 +1118,8 @@ async readOneTimeToken( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`GetOneTimeTokenRequest`](../../doc/models/get-one-time-token-request.md). ## Example Usage @@ -1155,6 +1178,10 @@ async sendRequestUpdatePaymentEmail( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1164,6 +1191,8 @@ async sendRequestUpdatePaymentEmail( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index c05212d6..d10b46a9 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -51,6 +51,10 @@ async listProductsForProductFamily( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -70,6 +74,8 @@ async listProductsForProductFamily( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse[]`](../../doc/models/product-response.md). ## Example Usage @@ -222,7 +228,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). @@ -233,6 +239,10 @@ async createProductFamily( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -242,6 +252,8 @@ async createProductFamily( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductFamilyResponse`](../../doc/models/product-family-response.md). ## Example Usage @@ -304,7 +316,7 @@ try { # List Product Families -Retrieve a list of Product Families for a site. +Returns a list of Product Families for a site. ```ts async listProductFamilies( @@ -325,6 +337,10 @@ async listProductFamilies( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -338,6 +354,8 @@ async listProductFamilies( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductFamilyResponse[]`](../../doc/models/product-family-response.md). ## Example Usage @@ -416,6 +434,10 @@ async readProductFamily( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -425,6 +447,8 @@ async readProductFamily( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 d3895f0a..11bd5ccd 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -35,6 +35,10 @@ async createProductPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ async createProductPricePoint( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md). ## Example Usage @@ -159,6 +165,10 @@ async listProductPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -173,6 +183,8 @@ async listProductPricePoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md). ## Example Usage @@ -254,6 +266,10 @@ async updateProductPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -265,6 +281,8 @@ async updateProductPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md). ## Example Usage @@ -339,7 +357,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. ```ts async readProductPricePoint( @@ -350,6 +368,10 @@ async readProductPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -361,6 +383,8 @@ async readProductPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md). ## Example Usage @@ -437,6 +461,10 @@ async archiveProductPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -447,6 +475,8 @@ async archiveProductPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md). ## Example Usage @@ -522,7 +552,7 @@ try { # Unarchive Product Price Point -Use this endpoint to unarchive an archived product price point. +Unarchives an archived product price point. ```ts async unarchiveProductPricePoint( @@ -532,6 +562,10 @@ async unarchiveProductPricePoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -542,6 +576,8 @@ async unarchiveProductPricePoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductPricePointResponse`](../../doc/models/product-price-point-response.md). ## Example Usage @@ -620,6 +656,10 @@ async promoteProductPricePointToDefault( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -630,6 +670,8 @@ async promoteProductPricePointToDefault( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -732,6 +774,10 @@ async bulkCreateProductPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -742,6 +788,8 @@ async bulkCreateProductPricePoints( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BulkCreateProductPricePointsResponse`](../../doc/models/bulk-create-product-price-points-response.md). ## Example Usage @@ -863,6 +911,10 @@ async createProductCurrencyPrices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -873,6 +925,8 @@ async createProductCurrencyPrices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md). ## Example Usage @@ -970,6 +1024,10 @@ async updateProductCurrencyPrices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -980,6 +1038,8 @@ async updateProductCurrencyPrices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md). ## Example Usage @@ -1056,7 +1116,7 @@ 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. ```ts async listAllProductPricePoints( @@ -1077,6 +1137,10 @@ async listAllProductPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1090,6 +1154,8 @@ async listAllProductPricePoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md). ## Example Usage diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 9d7f12a8..a5cd9420 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -22,7 +22,7 @@ const productsController = new ProductsController(client); 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) @@ -35,6 +35,10 @@ async createProduct( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ async createProduct( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -164,6 +170,10 @@ async readProduct( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -173,6 +183,8 @@ async readProduct( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -268,6 +280,10 @@ async updateProduct( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -278,6 +294,8 @@ async updateProduct( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -369,7 +387,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. @@ -380,6 +398,10 @@ async archiveProduct( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -389,6 +411,8 @@ async archiveProduct( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -484,6 +508,10 @@ async readProductByHandle( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -493,6 +521,8 @@ async readProductByHandle( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse`](../../doc/models/product-response.md). ## Example Usage @@ -595,7 +625,7 @@ try { # List Products -This method allows to retrieve a list of Products belonging to a Site. +Lists products belonging to a site. ```ts async listProducts( @@ -626,6 +656,10 @@ async listProducts( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -644,6 +678,8 @@ async listProducts( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProductResponse[]`](../../doc/models/product-response.md). ## Example Usage diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 7185eb90..fd0721de 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -24,7 +24,7 @@ const proformaInvoicesController = new ProformaInvoicesController(client); # 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. @@ -39,6 +39,10 @@ async createConsolidatedProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +52,8 @@ async createConsolidatedProformaInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -91,7 +97,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. @@ -118,6 +124,10 @@ async listSubscriptionGroupProformaInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -133,6 +143,8 @@ async listSubscriptionGroupProformaInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md). ## Example Usage @@ -181,7 +193,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 @@ -194,6 +206,10 @@ async readProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -203,6 +219,8 @@ async readProformaInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -243,7 +261,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. @@ -258,6 +276,10 @@ async createProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -267,6 +289,8 @@ async createProformaInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -310,7 +334,7 @@ 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`. ```ts async listProformaInvoices( @@ -347,6 +371,10 @@ async listProformaInvoices( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -368,6 +396,8 @@ async listProformaInvoices( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md). ## Example Usage @@ -413,7 +443,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 @@ -428,6 +458,10 @@ async deliverProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -438,6 +472,8 @@ async deliverProformaInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -497,7 +533,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 @@ -515,6 +551,10 @@ async voidProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -525,6 +565,8 @@ async voidProformaInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -569,7 +611,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. @@ -584,6 +626,10 @@ async previewProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -593,6 +639,8 @@ async previewProformaInvoice( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -637,9 +685,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. @@ -652,6 +698,10 @@ async createSignupProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -661,6 +711,8 @@ async createSignupProformaInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ProformaInvoice`](../../doc/models/proforma-invoice.md). ## Example Usage @@ -716,9 +768,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. @@ -732,6 +782,10 @@ async previewSignupProformaInvoice( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -742,6 +796,8 @@ async previewSignupProformaInvoice( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 4c342a98..f3b47e58 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -19,9 +19,11 @@ const reasonCodesController = new ReasonCodesController(client); # 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,7 +35,7 @@ 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. ```ts async createReasonCode( @@ -42,6 +44,10 @@ async createReasonCode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -51,6 +57,8 @@ async createReasonCode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReasonCodeResponse`](../../doc/models/reason-code-response.md). ## Example Usage @@ -100,7 +108,7 @@ 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. ```ts async listReasonCodes( @@ -115,6 +123,10 @@ async listReasonCodes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -125,6 +137,8 @@ async listReasonCodes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReasonCodeResponse[]`](../../doc/models/reason-code-response.md). ## Example Usage @@ -211,7 +225,7 @@ 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. ```ts async readReasonCode( @@ -220,6 +234,10 @@ async readReasonCode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -229,6 +247,8 @@ async readReasonCode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReasonCodeResponse`](../../doc/models/reason-code-response.md). ## Example Usage @@ -269,7 +289,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. ```ts async updateReasonCode( @@ -279,6 +299,10 @@ async updateReasonCode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -289,6 +313,8 @@ async updateReasonCode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReasonCodeResponse`](../../doc/models/reason-code-response.md). ## Example Usage @@ -333,7 +359,7 @@ 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. ```ts async deleteReasonCode( @@ -342,6 +368,10 @@ async deleteReasonCode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -351,6 +381,8 @@ async deleteReasonCode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`OkResponse`](../../doc/models/ok-response.md). ## Example Usage diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index af7ffb7c..240379a2 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -11,7 +11,7 @@ const referralCodesController = new ReferralCodesController(client); # 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 @@ -28,6 +28,10 @@ async validateReferralCode( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -37,6 +41,8 @@ async validateReferralCode( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReferralValidationResponse`](../../doc/models/referral-validation-response.md). ## Example Usage diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index f3972e2f..95af1b05 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -17,7 +17,7 @@ const salesCommissionsController = new SalesCommissionsController(client); # List Sales Commission Settings -Endpoint returns subscriptions with associated sales reps +Lists subscriptions with associated sales reps. ## Modified Authentication Process @@ -46,6 +46,10 @@ async listSalesCommissionSettings( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -59,6 +63,8 @@ async listSalesCommissionSettings( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SaleRepSettings[]`](../../doc/models/sale-rep-settings.md). ## Example Usage @@ -132,7 +138,7 @@ try { # List Sales Reps -Endpoint returns sales rep list with details +Returns a sales rep list with details. ## Modified Authentication Process @@ -161,6 +167,10 @@ async listSalesReps( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -174,6 +184,8 @@ async listSalesReps( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSaleRepItem[]`](../../doc/models/list-sale-rep-item.md). ## Example Usage @@ -296,7 +308,7 @@ try { # Read Sales Rep -Endpoint returns sales rep and attached subscriptions details. +Returns a sales rep and attached subscription details. ## Modified Authentication Process @@ -318,6 +330,10 @@ async readSalesRep( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -332,6 +348,8 @@ async readSalesRep( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SaleRep`](../../doc/models/sale-rep.md). ## Example Usage diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index f8fef71b..b32ca75c 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -17,15 +17,15 @@ const sitesController = new SitesController(client); # 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, @@ -40,6 +40,10 @@ async readSite( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -48,6 +52,8 @@ async readSite( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SiteResponse`](../../doc/models/site-response.md). ## Example Usage @@ -131,7 +137,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.** @@ -142,6 +148,10 @@ async clearSite( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -151,6 +161,8 @@ async clearSite( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -185,7 +197,7 @@ 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). ```ts async listChargifyJsPublicKeys( @@ -200,6 +212,10 @@ async listChargifyJsPublicKeys( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -210,6 +226,8 @@ async listChargifyJsPublicKeys( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 a431a5b1..aa911587 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -31,7 +31,7 @@ const subscriptionComponentsController = new SubscriptionComponentsController(cl # 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. ```ts async readSubscriptionComponent( @@ -41,6 +41,10 @@ async readSubscriptionComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -51,6 +55,8 @@ async readSubscriptionComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionComponentResponse`](../../doc/models/subscription-component-response.md). ## Example Usage @@ -115,7 +121,7 @@ try { # List Subscription Components -This request will list a subscription's applied components. +Lists a subscription's applied components. ## Archived Components @@ -156,6 +162,10 @@ async listSubscriptionComponents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -177,6 +187,8 @@ async listSubscriptionComponents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionComponentResponse[]`](../../doc/models/subscription-component-response.md). ## Example Usage @@ -277,6 +289,10 @@ async bulkUpdateSubscriptionComponentsPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -287,6 +303,8 @@ async bulkUpdateSubscriptionComponentsPricePoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md). ## Example Usage @@ -378,6 +396,10 @@ async bulkResetSubscriptionComponentsPricePoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -387,6 +409,8 @@ async bulkResetSubscriptionComponentsPricePoints( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -525,7 +549,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) @@ -543,7 +567,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. ```ts async allocateComponent( @@ -554,6 +578,10 @@ async allocateComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -565,6 +593,8 @@ async allocateComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`AllocationResponse`](../../doc/models/allocation-response.md). ## Example Usage @@ -685,7 +715,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 @@ -700,6 +730,10 @@ async listAllocations( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -711,6 +745,8 @@ async listAllocations( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`AllocationResponse[]`](../../doc/models/allocation-response.md). ## Example Usage @@ -808,7 +844,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. @@ -826,7 +862,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. ```ts async allocateComponents( @@ -836,6 +872,10 @@ async allocateComponents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -846,6 +886,8 @@ async allocateComponents( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`AllocationResponse[]`](../../doc/models/allocation-response.md). ## Example Usage @@ -953,7 +995,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` @@ -969,6 +1011,10 @@ async previewAllocations( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -979,6 +1025,8 @@ async previewAllocations( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`AllocationPreviewResponse`](../../doc/models/allocation-preview-response.md). ## Example Usage @@ -1142,7 +1190,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. @@ -1164,6 +1212,10 @@ async updatePrepaidUsageAllocationExpirationDate( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1176,6 +1228,8 @@ async updatePrepaidUsageAllocationExpirationDate( ## Response Type +**204**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1235,7 +1289,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 @@ -1255,6 +1311,10 @@ async deletePrepaidUsageAllocation( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1267,6 +1327,8 @@ async deletePrepaidUsageAllocation( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1330,11 +1392,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) @@ -1385,6 +1447,10 @@ async createUsage( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1396,6 +1462,8 @@ async createUsage( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`UsageResponse`](../../doc/models/usage-response.md). ## Example Usage @@ -1470,7 +1538,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. @@ -1511,6 +1579,10 @@ async listUsages( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1527,6 +1599,8 @@ async listUsages( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`UsageResponse[]`](../../doc/models/usage-response.md). ## Example Usage @@ -1597,6 +1671,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). @@ -1614,6 +1690,10 @@ async activateEventBasedComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1625,6 +1705,8 @@ async activateEventBasedComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1685,7 +1767,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. ```ts async deactivateEventBasedComponent( @@ -1695,6 +1777,10 @@ async deactivateEventBasedComponent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1705,6 +1791,8 @@ async deactivateEventBasedComponent( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1744,6 +1832,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. @@ -1773,6 +1863,10 @@ async recordEvent( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1784,6 +1878,8 @@ async recordEvent( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1829,7 +1925,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.* @@ -1844,6 +1940,10 @@ async bulkRecordEvents( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1855,6 +1955,8 @@ async bulkRecordEvents( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1902,7 +2004,7 @@ try { # List Subscription Components for Site -This request will list components applied to each subscription. +Lists components applied to each subscription. ```ts async listSubscriptionComponentsForSite( @@ -1941,6 +2043,10 @@ async listSubscriptionComponentsForSite( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1963,6 +2069,8 @@ async listSubscriptionComponentsForSite( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 47d51c86..518c9f24 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -18,7 +18,7 @@ const subscriptionGroupInvoiceAccountController = new SubscriptionGroupInvoiceAc # 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. ```ts async createSubscriptionGroupPrepayment( @@ -28,6 +28,10 @@ async createSubscriptionGroupPrepayment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -38,6 +42,8 @@ async createSubscriptionGroupPrepayment( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionGroupPrepaymentResponse`](../../doc/models/subscription-group-prepayment-response.md). ## Example Usage @@ -93,7 +99,7 @@ try { # List Prepayments for Subscription Group -This request will list a subscription group's prepayments. +Lists a subscription group's prepayments. ```ts async listPrepaymentsForSubscriptionGroup( @@ -112,6 +118,10 @@ async listPrepaymentsForSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -124,6 +134,8 @@ async listPrepaymentsForSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSubscriptionGroupPrepaymentResponse`](../../doc/models/list-subscription-group-prepayment-response.md). ## Example Usage @@ -195,7 +207,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. ```ts async issueSubscriptionGroupServiceCredit( @@ -205,6 +217,10 @@ async issueSubscriptionGroupServiceCredit( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -215,6 +231,8 @@ async issueSubscriptionGroupServiceCredit( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ServiceCreditResponse`](../../doc/models/service-credit-response.md). ## Example Usage @@ -282,7 +300,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. ```ts async deductSubscriptionGroupServiceCredit( @@ -292,6 +310,10 @@ async deductSubscriptionGroupServiceCredit( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -302,6 +324,8 @@ async deductSubscriptionGroupServiceCredit( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 6e4aac74..b226f681 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -30,6 +30,10 @@ async cancelSubscriptionsInGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -40,6 +44,8 @@ async cancelSubscriptionsInGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -90,7 +96,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. @@ -101,6 +107,10 @@ async initiateDelayedCancellationForGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -110,6 +120,8 @@ async initiateDelayedCancellationForGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -153,6 +165,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. ```ts @@ -162,6 +176,10 @@ async cancelDelayedCancellationForGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -171,6 +189,8 @@ async cancelDelayedCancellationForGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -214,15 +234,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. @@ -234,6 +254,12 @@ 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. + ```ts async reactivateSubscriptionGroup( uid: string, @@ -242,6 +268,10 @@ async reactivateSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -252,6 +282,8 @@ async reactivateSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 eb070fff..738dfd5b 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -10,7 +10,7 @@ const subscriptionGroupsController = new SubscriptionGroupsController(client); ## 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 @@ const subscriptionGroupsController = new SubscriptionGroupsController(client); * [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,9 +31,9 @@ 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). ```ts async signupWithSubscriptionGroup( @@ -42,6 +42,10 @@ async signupWithSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -51,6 +55,8 @@ async signupWithSubscriptionGroup( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionGroupSignupResponse`](../../doc/models/subscription-group-signup-response.md). ## Example Usage @@ -120,6 +126,10 @@ async createSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -129,6 +139,8 @@ async createSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md). ## Example Usage @@ -225,6 +237,10 @@ async listSubscriptionGroups( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -236,6 +252,8 @@ async listSubscriptionGroups( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListSubscriptionGroupsResponse`](../../doc/models/list-subscription-groups-response.md). ## Example Usage @@ -314,7 +332,7 @@ try { # Read Subscription Group -Use this endpoint to find subscription group details. +Returns subscription group details. #### Current Billing Amount in Cents @@ -328,6 +346,10 @@ async readSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -338,6 +360,8 @@ async readSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md). ## Example Usage @@ -421,8 +445,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. ```ts async updateSubscriptionGroupMembers( @@ -432,6 +456,10 @@ async updateSubscriptionGroupMembers( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -442,6 +470,8 @@ async updateSubscriptionGroupMembers( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md). ## Example Usage @@ -529,6 +559,10 @@ async deleteSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -538,6 +572,8 @@ async deleteSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`DeleteSubscriptionGroupResponse`](../../doc/models/delete-subscription-group-response.md). ## Example Usage @@ -587,9 +623,9 @@ 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. ```ts async findSubscriptionGroup( @@ -598,6 +634,10 @@ async findSubscriptionGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -607,6 +647,8 @@ async findSubscriptionGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md). ## Example Usage @@ -711,6 +753,10 @@ async addSubscriptionToGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -721,6 +767,8 @@ async addSubscriptionToGroup( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md). ## Example Usage @@ -792,9 +840,9 @@ 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. ```ts async removeSubscriptionFromGroup( @@ -803,6 +851,10 @@ async removeSubscriptionFromGroup( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -812,6 +864,8 @@ async removeSubscriptionFromGroup( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 0b448871..95bc12ed 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -30,6 +30,10 @@ async readAccountBalances( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -39,6 +43,8 @@ async readAccountBalances( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`AccountBalances`](../../doc/models/account-balances.md). ## Example Usage @@ -73,7 +79,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`. @@ -81,6 +87,12 @@ 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. + ```ts async createPrepayment( subscriptionId: number, @@ -89,6 +101,10 @@ async createPrepayment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -99,6 +115,8 @@ async createPrepayment( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`CreatePrepaymentResponse`](../../doc/models/create-prepayment-response.md). ## Example Usage @@ -167,7 +185,7 @@ try { # List Prepayments -This request will list a subscription's prepayments. +Lists a subscription's prepayments. ```ts async listPrepayments( @@ -186,6 +204,10 @@ async listPrepayments( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -198,6 +220,8 @@ async listPrepayments( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PrepaymentsResponse`](../../doc/models/prepayments-response.md). ## Example Usage @@ -268,7 +292,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. ```ts async issueServiceCredit( @@ -278,6 +302,10 @@ async issueServiceCredit( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -288,6 +316,8 @@ async issueServiceCredit( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ServiceCredit`](../../doc/models/service-credit.md). ## Example Usage @@ -349,7 +379,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. ```ts async deductServiceCredit( @@ -359,6 +389,10 @@ async deductServiceCredit( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -369,6 +403,8 @@ async deductServiceCredit( ## Response Type +**201**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -419,7 +455,7 @@ try { # List Service Credits -This request will list a subscription's service credits. +Lists a subscription's service credits. ```ts async listServiceCredits( @@ -431,6 +467,10 @@ async listServiceCredits( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -443,6 +483,8 @@ async listServiceCredits( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md). ## Example Usage @@ -524,7 +566,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`. @@ -537,6 +579,10 @@ async refundPrepayment( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -548,6 +594,8 @@ async refundPrepayment( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PrepaymentResponse`](../../doc/models/prepayment-response.md). ## Example Usage diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 9bb3b2da..1ef144ba 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -19,7 +19,7 @@ const subscriptionNotesController = new SubscriptionNotesController(client); # 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 @@ -37,6 +37,10 @@ async createSubscriptionNote( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -47,6 +51,8 @@ async createSubscriptionNote( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md). ## Example Usage @@ -100,7 +106,7 @@ 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. ```ts async listSubscriptionNotes( @@ -117,6 +123,10 @@ async listSubscriptionNotes( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -128,6 +138,8 @@ async listSubscriptionNotes( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionNoteResponse[]`](../../doc/models/subscription-note-response.md). ## Example Usage @@ -202,7 +214,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. ```ts async readSubscriptionNote( @@ -212,6 +224,10 @@ async readSubscriptionNote( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -222,6 +238,8 @@ async readSubscriptionNote( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md). ## Example Usage @@ -276,7 +294,7 @@ try { # Update Subscription Note -Use the following method to update a note for a Subscription. +Updates a note for a subscription. ```ts async updateSubscriptionNote( @@ -287,6 +305,10 @@ async updateSubscriptionNote( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -298,6 +320,8 @@ async updateSubscriptionNote( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md). ## Example Usage @@ -364,6 +388,10 @@ async deleteSubscriptionNote( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -374,6 +402,8 @@ async deleteSubscriptionNote( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index de62c657..9216a320 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -16,6 +16,8 @@ const subscriptionProductsController = new SubscriptionProductsController(client # 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. ```ts async migrateSubscriptionProduct( @@ -81,6 +48,10 @@ async migrateSubscriptionProduct( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -91,6 +62,8 @@ async migrateSubscriptionProduct( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -271,9 +244,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. @@ -285,6 +260,10 @@ async previewSubscriptionProductMigration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -295,6 +274,8 @@ async previewSubscriptionProductMigration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`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 061ca8f5..fb691b75 100644 --- a/doc/controllers/subscription-renewals.md +++ b/doc/controllers/subscription-renewals.md @@ -35,6 +35,10 @@ async createScheduledRenewalConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -45,6 +49,8 @@ async createScheduledRenewalConfiguration( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -153,6 +159,10 @@ async listScheduledRenewalConfigurations( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -163,6 +173,8 @@ async listScheduledRenewalConfigurations( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationsResponse`](../../doc/models/scheduled-renewal-configurations-response.md). ## Example Usage @@ -252,6 +264,10 @@ async readScheduledRenewalConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -262,6 +278,8 @@ async readScheduledRenewalConfiguration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -355,6 +373,10 @@ async updateScheduledRenewalConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -366,6 +388,8 @@ async updateScheduledRenewalConfiguration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -477,6 +501,10 @@ async scheduleScheduledRenewalLockIn( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -488,6 +516,8 @@ async scheduleScheduledRenewalLockIn( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -594,6 +624,10 @@ async lockInScheduledRenewalImmediately( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -604,6 +638,8 @@ async lockInScheduledRenewalImmediately( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -704,6 +740,10 @@ async unpublishScheduledRenewalConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -714,6 +754,8 @@ async unpublishScheduledRenewalConfiguration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -806,6 +848,10 @@ async cancelScheduledRenewalConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -816,6 +862,8 @@ async cancelScheduledRenewalConfiguration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md). ## Example Usage @@ -909,6 +957,10 @@ async createScheduledRenewalConfigurationItem( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -920,6 +972,8 @@ async createScheduledRenewalConfigurationItem( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md). ## Example Usage @@ -1019,6 +1073,10 @@ async updateScheduledRenewalConfigurationItem( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1031,6 +1089,8 @@ async updateScheduledRenewalConfigurationItem( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md). ## Example Usage @@ -1132,6 +1192,10 @@ async deleteScheduledRenewalConfigurationItem( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1143,6 +1207,8 @@ async deleteScheduledRenewalConfigurationItem( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index c638a752..9b9f8013 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -24,15 +24,13 @@ const subscriptionStatusController = new SubscriptionStatusController(client); # 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. ```ts async retrySubscription( @@ -41,6 +39,10 @@ async retrySubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -50,6 +52,8 @@ async retrySubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -240,6 +244,10 @@ async cancelSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -250,6 +258,8 @@ async cancelSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -427,7 +437,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. ```ts async resumeSubscription( @@ -437,6 +447,10 @@ async resumeSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -447,6 +461,8 @@ async resumeSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -599,7 +615,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 @@ -613,6 +629,10 @@ async pauseSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -623,6 +643,8 @@ async pauseSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -784,13 +806,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. ```ts async updateAutomaticSubscriptionResumption( @@ -800,6 +822,10 @@ async updateAutomaticSubscriptionResumption( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -810,6 +836,8 @@ async updateAutomaticSubscriptionResumption( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -982,7 +1010,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.** @@ -1003,7 +1031,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? | |---|---|---| @@ -1143,6 +1171,12 @@ 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. + ```ts async reactivateSubscription( subscriptionId: number, @@ -1151,6 +1185,10 @@ async reactivateSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1161,6 +1199,8 @@ async reactivateSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -1338,6 +1378,10 @@ async initiateDelayedCancellation( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1348,6 +1392,8 @@ async initiateDelayedCancellation( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md). ## Example Usage @@ -1392,7 +1438,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. @@ -1403,6 +1449,10 @@ async cancelDelayedCancellation( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1412,6 +1462,8 @@ async cancelDelayedCancellation( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md). ## Example Usage @@ -1460,7 +1512,7 @@ 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. ```ts async cancelDunning( @@ -1469,6 +1521,10 @@ async cancelDunning( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1478,6 +1534,8 @@ async cancelDunning( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -1521,7 +1579,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). @@ -1552,6 +1610,10 @@ async previewRenewal( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1562,6 +1624,8 @@ async previewRenewal( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`RenewalPreviewResponse`](../../doc/models/renewal-preview-response.md). ## Example Usage diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index c9897920..4a4c6ba0 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -20,27 +20,35 @@ const subscriptionsController = new SubscriptionsController(client); * [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. ```ts async createSubscription( @@ -49,6 +57,10 @@ async createSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -58,6 +70,8 @@ async createSubscription( ## Response Type +**201**: Created + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -259,7 +273,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 @@ -310,6 +324,10 @@ async listSubscriptions( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -334,6 +352,8 @@ async listSubscriptions( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse[]`](../../doc/models/subscription-response.md). ## Example Usage @@ -413,21 +433,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. ```ts async updateSubscription( @@ -437,6 +457,10 @@ async updateSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -447,6 +471,8 @@ async updateSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -624,6 +650,10 @@ async readSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -634,6 +664,8 @@ async readSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -815,7 +847,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. @@ -843,6 +875,10 @@ async overrideSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -853,6 +889,8 @@ async overrideSubscription( ## Response Type +**204**: No Content + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -908,7 +946,7 @@ try { # Find Subscription -Use this endpoint to find a subscription by its reference. +Finds a subscription by its reference. ```ts async findSubscription( @@ -917,6 +955,10 @@ async findSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -926,6 +968,8 @@ async findSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -964,7 +1008,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` @@ -983,6 +1027,10 @@ async purgeSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -994,6 +1042,8 @@ async purgeSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -1048,7 +1098,7 @@ try { # Update Prepaid Subscription Configuration -Use this endpoint to update a subscription's prepaid configuration. +Updates a subscription's prepaid configuration. ```ts async updatePrepaidSubscriptionConfiguration( @@ -1058,6 +1108,10 @@ async updatePrepaidSubscriptionConfiguration( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1068,6 +1122,8 @@ async updatePrepaidSubscriptionConfiguration( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`PrepaidConfigurationResponse`](../../doc/models/prepaid-configuration-response.md). ## Example Usage @@ -1134,7 +1190,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. @@ -1167,6 +1223,10 @@ async previewSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1176,6 +1236,8 @@ async previewSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionPreviewResponse`](../../doc/models/subscription-preview-response.md). ## Example Usage @@ -1334,6 +1396,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 @@ -1351,6 +1415,10 @@ async applyCouponsToSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1362,6 +1430,8 @@ async applyCouponsToSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage @@ -1564,11 +1634,11 @@ try { | 422 | Unprocessable Entity (WebDAV) | [`SubscriptionAddCouponError`](../../doc/models/subscription-add-coupon-error.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) ```ts async removeCouponFromSubscription( @@ -1578,6 +1648,10 @@ async removeCouponFromSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1588,6 +1662,8 @@ async removeCouponFromSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type `string`. ## Example Usage @@ -1637,7 +1713,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](#). @@ -1689,6 +1765,10 @@ async activateSubscription( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -1699,6 +1779,8 @@ async activateSubscription( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`SubscriptionResponse`](../../doc/models/subscription-response.md). ## Example Usage diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index c76cdd82..9bc087f0 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,7 +20,7 @@ const webhooksController = new WebhooksController(client); # 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. ```ts async listWebhooks( @@ -45,6 +45,10 @@ async listWebhooks( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -60,6 +64,8 @@ async listWebhooks( ## Response Type +**201**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`WebhookResponse[]`](../../doc/models/webhook-response.md). ## Example Usage @@ -136,7 +142,7 @@ try { # Enable Webhooks -Allows you to enable webhooks for your site +Enables webhooks for your site. ```ts async enableWebhooks( @@ -145,6 +151,10 @@ async enableWebhooks( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -154,6 +164,8 @@ async enableWebhooks( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`EnableWebhooksResponse`](../../doc/models/enable-webhooks-response.md). ## Example Usage @@ -207,6 +219,10 @@ async replayWebhooks( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -216,6 +232,8 @@ async replayWebhooks( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`ReplayWebhooksResponse`](../../doc/models/replay-webhooks-response.md). ## Example Usage @@ -263,7 +281,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. ```ts @@ -273,6 +291,10 @@ async createEndpoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -282,6 +304,8 @@ async createEndpoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`EndpointResponse`](../../doc/models/endpoint-response.md). ## Example Usage @@ -292,7 +316,8 @@ const body: CreateOrUpdateEndpointRequest = { url: 'https://your.site/webhooks', webhookSubscriptions: [ WebhookSubscription.PaymentSuccess, - WebhookSubscription.PaymentFailure + WebhookSubscription.PaymentFailure, + WebhookSubscription.InvoicePending ], }, }; @@ -335,7 +360,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] } } @@ -358,6 +384,10 @@ async listEndpoints( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -366,6 +396,8 @@ async listEndpoints( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`Endpoint[]`](../../doc/models/endpoint.md). ## Example Usage @@ -406,7 +438,8 @@ try { "status": "enabled", "webhook_subscriptions": [ "payment_success", - "payment_failure" + "payment_failure", + "invoice_pending" ] }, { @@ -430,7 +463,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. ```ts async updateEndpoint( @@ -440,6 +473,10 @@ async updateEndpoint( ): Promise> ``` +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + ## Parameters | Parameter | Type | Tags | Description | @@ -450,6 +487,8 @@ async updateEndpoint( ## Response Type +**200**: OK + This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `result` property of this instance returns the response data which is of type [`EndpointResponse`](../../doc/models/endpoint-response.md). ## Example Usage @@ -463,7 +502,8 @@ const body: CreateOrUpdateEndpointRequest = { webhookSubscriptions: [ WebhookSubscription.PaymentFailure, WebhookSubscription.PaymentSuccess, - WebhookSubscription.RefundFailure + WebhookSubscription.RefundFailure, + WebhookSubscription.InvoicePending ], }, }; diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index 7c110767..252dda55 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 | | --- | --- | --- | --- | | `pricePointId` | `number \| undefined` | Optional | The Chargify id of the price point | -| `billingSchedule` | [`BillingSchedule \| undefined`](../../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` | [`BillingSchedule \| undefined`](../../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. | | `customPrice` | [`ComponentCustomPrice \| undefined`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 6560cc6a..8ffa180a 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -14,7 +14,7 @@ | `lastName` | `string \| undefined` | Optional | The last name of the bank account holder | | `customerId` | `number \| undefined` | Optional | The Chargify-assigned id for the customer record to which the bank account belongs | | `currentVault` | [`BankAccountVault \| undefined`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | -| `vaultToken` | `string \| undefined` | Optional | The “token” provided by your vault storage for an already stored payment profile | +| `vaultToken` | `string \| undefined` | Optional | The "token" provided by your vault storage for an already stored payment profile | | `billingAddress` | `string \| null \| undefined` | Optional | The current billing street address for the bank account | | `billingCity` | `string \| null \| undefined` | Optional | The current billing address city for the bank account | | `billingState` | `string \| null \| undefined` | Optional | The current billing address state for the bank account | @@ -23,8 +23,8 @@ | `customerVaultToken` | `string \| null \| undefined` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | | `billingAddress2` | `string \| null \| undefined` | Optional | The current billing street address, second line, for the bank account | | `bankName` | `string \| undefined` | Optional | The bank where the account resides | -| `maskedBankRoutingNumber` | `string \| undefined` | 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 | -| `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’) | +| `maskedBankRoutingNumber` | `string \| null \| undefined` | 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 | +| `maskedBankAccountNumber` | `string \| null \| undefined` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') | | `bankAccountType` | [`BankAccountType \| undefined`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `bankAccountHolderType` | [`BankAccountHolderType \| undefined`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `paymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.BankAccount` | @@ -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 0a0d0c6c..f0b60123 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 a82b3a44..cea1d2bd 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 | | --- | --- | --- | --- | -| `initialBillingAt` | `string \| undefined` | 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. | +| `initialBillingAt` | `string \| null \| undefined` | 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. | ## 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..d4a3ab0a --- /dev/null +++ b/doc/models/chjs-tokenization-failure.md @@ -0,0 +1,27 @@ + +# Chjs Tokenization Failure + +## Structure + +`ChjsTokenizationFailure` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `errors` | `string` | Required | - | +| `paymentProfileParams` | [`PaymentProfileParams \| undefined`](../../doc/models/payment-profile-params.md) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | + +## 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..c21e9368 --- /dev/null +++ b/doc/models/chjs-tokenization-success.md @@ -0,0 +1,28 @@ + +# Chjs Tokenization Success + +## Structure + +`ChjsTokenizationSuccess` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `paymentProfile` | [`TokenizedPaymentProfile`](../../doc/models/tokenized-payment-profile.md) | Required | - | +| `gatewayCustomerId` | `number \| null \| undefined` | Optional | - | + +## 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 201efb85..bbded265 100644 --- a/doc/models/containers/allocation-preview-item-previous-quantity.md +++ b/doc/models/containers/allocation-preview-item-previous-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviewItemPreviousQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviewItemPreviousQuantity = 'String0'; +``` + diff --git a/doc/models/containers/allocation-preview-item-quantity.md b/doc/models/containers/allocation-preview-item-quantity.md index b8cbab2a..0b4743be 100644 --- a/doc/models/containers/allocation-preview-item-quantity.md +++ b/doc/models/containers/allocation-preview-item-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviewItemQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviewItemQuantity = 'String0'; +``` + diff --git a/doc/models/containers/allocation-previous-quantity.md b/doc/models/containers/allocation-previous-quantity.md index 09e32aae..fb31e3c7 100644 --- a/doc/models/containers/allocation-previous-quantity.md +++ b/doc/models/containers/allocation-previous-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviousQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: AllocationPreviousQuantity = 'String0'; +``` + diff --git a/doc/models/containers/allocation-quantity.md b/doc/models/containers/allocation-quantity.md index 24bf64d3..75c4b6ad 100644 --- a/doc/models/containers/allocation-quantity.md +++ b/doc/models/containers/allocation-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: AllocationQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: AllocationQuantity = '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 893cf0b4..494ef7a9 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ArchiveComponentPricePointComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ArchiveComponentPricePointComponentId = '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 388f7372..b7c77507 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ArchiveComponentPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ArchiveComponentPricePointPricePointId = '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 c7d674d7..1a78a92a 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ArchiveProductPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ArchiveProductPricePointPricePointId = '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 4bbebfd8..a3c8170e 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ArchiveProductPricePointProductId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ArchiveProductPricePointProductId = 'String0'; +``` + diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md index d45b10cd..867964af 100644 --- a/doc/models/containers/calendar-billing-snap-day.md +++ b/doc/models/containers/calendar-billing-snap-day.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CalendarBillingSnapDay = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CalendarBillingSnapDay = '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 34d53b6b..76fb08cb 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CloneComponentPricePointComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CloneComponentPricePointComponentId = '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 54fcd7e6..0b9b76bf 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CloneComponentPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CloneComponentPricePointPricePointId = 'String0'; +``` + diff --git a/doc/models/containers/component-allocation-change-allocated-quantity.md b/doc/models/containers/component-allocation-change-allocated-quantity.md index 77106d8b..28a3ffed 100644 --- a/doc/models/containers/component-allocation-change-allocated-quantity.md +++ b/doc/models/containers/component-allocation-change-allocated-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ComponentAllocationChangeAllocatedQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ComponentAllocationChangeAllocatedQuantity = '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 9cc2b8f6..52e928c1 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: ComponentPricePointAssignmentPricePoint = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: ComponentPricePointAssignmentPricePoint = 0; +``` + diff --git a/doc/models/containers/coupon-payload-percentage.md b/doc/models/containers/coupon-payload-percentage.md index 08fbfeb3..a970d473 100644 --- a/doc/models/containers/coupon-payload-percentage.md +++ b/doc/models/containers/coupon-payload-percentage.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CouponPayloadPercentage = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CouponPayloadPercentage = 0; +``` + diff --git a/doc/models/containers/create-allocation-price-point-id.md b/doc/models/containers/create-allocation-price-point-id.md index e8e89ac3..d1ec4cd5 100644 --- a/doc/models/containers/create-allocation-price-point-id.md +++ b/doc/models/containers/create-allocation-price-point-id.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateAllocationPricePointId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateAllocationPricePointId = 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 e0be93e3..20da44ed 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,46 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```ts +const value: CreateComponentPricePointRequestPricePoint = { + name: 'name0', + pricingScheme: PricingScheme.PerUnit, + prices: [ + { + startingQuantity: 242, + unitPrice: 23.26, + } + ], + useSiteExchangeRate: true, +}; +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```ts +const value: CreateComponentPricePointRequestPricePoint = { + name: 'name0', + pricingScheme: PricingScheme.PerUnit, + prices: [ + { + startingQuantity: 242, + unitPrice: 23.26, + } + ], + overagePricing: { + pricingScheme: PricingScheme.Stairstep, + }, + useSiteExchangeRate: true, +}; +``` + 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 ce33341f..db26e6fd 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,46 @@ | [`CreateComponentPricePoint`](../../../doc/models/create-component-price-point.md) | | [`CreatePrepaidUsageComponentPricePoint`](../../../doc/models/create-prepaid-usage-component-price-point.md) | +## CreateComponentPricePoint + +### Initialization Code + +#### Example + +```ts +const value: CreateComponentPricePointsRequestPricePoints = { + name: 'name0', + pricingScheme: PricingScheme.PerUnit, + prices: [ + { + startingQuantity: 242, + unitPrice: 23.26, + } + ], + useSiteExchangeRate: true, +}; +``` + +## CreatePrepaidUsageComponentPricePoint + +### Initialization Code + +#### Example + +```ts +const value: CreateComponentPricePointsRequestPricePoints = { + name: 'name0', + pricingScheme: PricingScheme.PerUnit, + prices: [ + { + startingQuantity: 242, + unitPrice: 23.26, + } + ], + overagePricing: { + pricingScheme: PricingScheme.Stairstep, + }, + useSiteExchangeRate: true, +}; +``` + diff --git a/doc/models/containers/create-invoice-coupon-amount.md b/doc/models/containers/create-invoice-coupon-amount.md index 10612862..bd85d01a 100644 --- a/doc/models/containers/create-invoice-coupon-amount.md +++ b/doc/models/containers/create-invoice-coupon-amount.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponAmount = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponAmount = 0; +``` + diff --git a/doc/models/containers/create-invoice-coupon-percentage.md b/doc/models/containers/create-invoice-coupon-percentage.md index 8b80412d..780f8e93 100644 --- a/doc/models/containers/create-invoice-coupon-percentage.md +++ b/doc/models/containers/create-invoice-coupon-percentage.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponPercentage = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponPercentage = 0; +``` + 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 0ede5540..e966b6d5 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponProductFamilyId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceCouponProductFamilyId = 0; +``` + diff --git a/doc/models/containers/create-invoice-item-component-id.md b/doc/models/containers/create-invoice-item-component-id.md index 69abaefb..2fef38cb 100644 --- a/doc/models/containers/create-invoice-item-component-id.md +++ b/doc/models/containers/create-invoice-item-component-id.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemComponentId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemComponentId = 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 9657f6a5..7a2e52c0 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemPricePointId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemPricePointId = 0; +``` + diff --git a/doc/models/containers/create-invoice-item-product-id.md b/doc/models/containers/create-invoice-item-product-id.md index e8870aed..f14c1bec 100644 --- a/doc/models/containers/create-invoice-item-product-id.md +++ b/doc/models/containers/create-invoice-item-product-id.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemProductId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemProductId = 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 5b38e588..6f7f66f9 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemProductPricePointId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemProductPricePointId = 0; +``` + diff --git a/doc/models/containers/create-invoice-item-quantity.md b/doc/models/containers/create-invoice-item-quantity.md index 2f119a2b..d0c08684 100644 --- a/doc/models/containers/create-invoice-item-quantity.md +++ b/doc/models/containers/create-invoice-item-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemQuantity = 'String0'; +``` + diff --git a/doc/models/containers/create-invoice-item-unit-price.md b/doc/models/containers/create-invoice-item-unit-price.md index a5549270..3e220dc7 100644 --- a/doc/models/containers/create-invoice-item-unit-price.md +++ b/doc/models/containers/create-invoice-item-unit-price.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemUnitPrice = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoiceItemUnitPrice = 'String0'; +``` + diff --git a/doc/models/containers/create-invoice-payment-amount.md b/doc/models/containers/create-invoice-payment-amount.md index 31bcb8ff..c06964b1 100644 --- a/doc/models/containers/create-invoice-payment-amount.md +++ b/doc/models/containers/create-invoice-payment-amount.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoicePaymentAmount = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateInvoicePaymentAmount = 0; +``` + diff --git a/doc/models/containers/create-metafields-request-metafields.md b/doc/models/containers/create-metafields-request-metafields.md index a938336b..bba4ea81 100644 --- a/doc/models/containers/create-metafields-request-metafields.md +++ b/doc/models/containers/create-metafields-request-metafields.md @@ -12,3 +12,40 @@ | [`CreateMetafield`](../../../doc/models/create-metafield.md) | | [`CreateMetafield[]`](../../../doc/models/create-metafield.md) | +## CreateMetafield + +### Initialization Code + +#### Example + +```ts +const value: CreateMetafieldsRequestMetafields = { + name: 'my_field', + scope: { + csv: IncludeOption.Exclude, + invoices: IncludeOption.Exclude, + statements: IncludeOption.Exclude, + portal: IncludeOption.Exclude, + publicShow: IncludeOption.Exclude, + publicEdit: IncludeOption.Exclude, + }, + inputType: MetafieldInput.Text, + mEnum: [ + 'string' + ], +}; +``` + +## CreateMetafield[] + +### Initialization Code + +#### Example + +```ts +const value: CreateMetafieldsRequestMetafields = [ + { +} +]; +``` + diff --git a/doc/models/containers/create-multi-invoice-payment-amount.md b/doc/models/containers/create-multi-invoice-payment-amount.md index e2d7b221..8ccb3fe4 100644 --- a/doc/models/containers/create-multi-invoice-payment-amount.md +++ b/doc/models/containers/create-multi-invoice-payment-amount.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateMultiInvoicePaymentAmount = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateMultiInvoicePaymentAmount = 0; +``` + 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 432b45ce..a0f89c19 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateOrUpdateSegmentPriceUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateOrUpdateSegmentPriceUnitPrice = 0; +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-month.md b/doc/models/containers/create-payment-profile-expiration-month.md index 5cdfba4c..7221a46e 100644 --- a/doc/models/containers/create-payment-profile-expiration-month.md +++ b/doc/models/containers/create-payment-profile-expiration-month.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreatePaymentProfileExpirationMonth = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreatePaymentProfileExpirationMonth = 'String0'; +``` + diff --git a/doc/models/containers/create-payment-profile-expiration-year.md b/doc/models/containers/create-payment-profile-expiration-year.md index 9bb02bde..965770a7 100644 --- a/doc/models/containers/create-payment-profile-expiration-year.md +++ b/doc/models/containers/create-payment-profile-expiration-year.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreatePaymentProfileExpirationYear = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreatePaymentProfileExpirationYear = '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 ecf1ee99..004b2d14 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateProductPricePointProductId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateProductPricePointProductId = '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 5bae034b..fd33d5fc 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,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty1Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty1Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty1Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty1Value = 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 6b06ac24..f78a120a 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,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty2Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty2Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty2Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty2Value = 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 3a748d37..9b5a4b2d 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,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty3Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty3Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty3Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty3Value = 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 594ce54b..80f8cf62 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,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty4Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty4Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty4Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: CreateSegmentSegmentProperty4Value = false; +``` + diff --git a/doc/models/containers/create-subscription-component-allocated-quantity.md b/doc/models/containers/create-subscription-component-allocated-quantity.md index 5d04399d..07e1e238 100644 --- a/doc/models/containers/create-subscription-component-allocated-quantity.md +++ b/doc/models/containers/create-subscription-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentAllocatedQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentAllocatedQuantity = 'String0'; +``` + diff --git a/doc/models/containers/create-subscription-component-component-id.md b/doc/models/containers/create-subscription-component-component-id.md index 97754096..230d0b9f 100644 --- a/doc/models/containers/create-subscription-component-component-id.md +++ b/doc/models/containers/create-subscription-component-component-id.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentComponentId = '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 d44ede74..9e562ef9 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionComponentPricePointId = 'String0'; +``` + diff --git a/doc/models/containers/create-subscription-offer-id.md b/doc/models/containers/create-subscription-offer-id.md index 9940c0d3..14f9ed31 100644 --- a/doc/models/containers/create-subscription-offer-id.md +++ b/doc/models/containers/create-subscription-offer-id.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionOfferId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateSubscriptionOfferId = 0; +``` + diff --git a/doc/models/containers/create-usage-component-id.md b/doc/models/containers/create-usage-component-id.md index 77bbd4b9..200d99ed 100644 --- a/doc/models/containers/create-usage-component-id.md +++ b/doc/models/containers/create-usage-component-id.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateUsageComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateUsageComponentId = '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 8af02c52..421f69d6 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: CreateUsageSubscriptionIdOrReference = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: CreateUsageSubscriptionIdOrReference = 'String0'; +``` + diff --git a/doc/models/containers/customer-error-response-errors.md b/doc/models/containers/customer-error-response-errors.md index 63df4459..f028dc28 100644 --- a/doc/models/containers/customer-error-response-errors.md +++ b/doc/models/containers/customer-error-response-errors.md @@ -12,3 +12,26 @@ | [`CustomerError`](../../../doc/models/customer-error.md) | | `string[]` | +## CustomerError + +### Initialization Code + +#### Example + +```ts +const value: CustomerErrorResponseErrors = { +}; +``` + +## string[] + +### Initialization Code + +#### Example + +```ts +const value: CustomerErrorResponseErrors = [ + 'String1' +]; +``` + diff --git a/doc/models/containers/deduct-service-credit-amount.md b/doc/models/containers/deduct-service-credit-amount.md index bcb43afa..c69aa971 100644 --- a/doc/models/containers/deduct-service-credit-amount.md +++ b/doc/models/containers/deduct-service-credit-amount.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: DeductServiceCreditAmount = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: DeductServiceCreditAmount = 0; +``` + diff --git a/doc/models/containers/ebb-component-unit-price.md b/doc/models/containers/ebb-component-unit-price.md index 5b7db654..39bebd7e 100644 --- a/doc/models/containers/ebb-component-unit-price.md +++ b/doc/models/containers/ebb-component-unit-price.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: EBBComponentUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: EBBComponentUnitPrice = 0; +``` + diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index d8da135c..27d5db1a 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -27,4 +27,354 @@ | [`PaymentCollectionMethodChanged`](../../../doc/models/payment-collection-method-changed.md) | | [`ItemPricePointChanged`](../../../doc/models/item-price-point-changed.md) | | [`CustomFieldValueChange`](../../../doc/models/custom-field-value-change.md) | +| [`ChjsTokenizationSuccess`](../../../doc/models/chjs-tokenization-success.md) | +| [`ChjsTokenizationFailure`](../../../doc/models/chjs-tokenization-failure.md) | + +## SubscriptionProductChange + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousProductId: 126, + newProductId: 12, +}; +``` + +## SubscriptionStateChange + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousSubscriptionState: 'previous_subscription_state2', + newSubscriptionState: 'new_subscription_state6', +}; +``` + +## PaymentRelatedEvents + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + productId: 42, + accountTransactionId: 58, +}; +``` + +## RefundSuccess + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + refundId: 12, + gatewayTransactionId: 182, + productId: 168, +}; +``` + +## ComponentAllocationChange + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousAllocation: 94, + newAllocation: 102, + componentId: 88, + componentHandle: 'component_handle8', + memo: 'memo2', + allocationId: 158, +}; +``` + +## MeteredUsage + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousUnitBalance: 'previous_unit_balance6', + newUnitBalance: 80, + usageQuantity: 42, + componentId: 4, + componentHandle: 'component_handle8', + memo: 'memo2', +}; +``` + +## PrepaidUsage + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousUnitBalance: 'previous_unit_balance0', + previousOverageUnitBalance: 'previous_overage_unit_balance4', + newUnitBalance: 252, + newOverageUnitBalance: 224, + usageQuantity: 214, + overageUsageQuantity: 106, + componentId: 176, + componentHandle: 'component_handle4', + memo: 'memo8', + allocationDetails: [ + { + } + ], +}; +``` + +## DunningStepReached + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + dunner: { + state: 'state8', + subscriptionId: 194, + revenueAtRiskInCents: BigInt(98), + createdAt: '2016-03-13T12:52:32.123Z', + attempts: 42, + lastAttemptedAt: '2016-03-13T12:52:32.123Z', + }, + currentStep: { + dayThreshold: 198, + action: 'action4', + sendEmail: false, + sendBccEmail: false, + sendSms: false, + }, + nextStep: { + dayThreshold: 30, + action: 'action4', + sendEmail: false, + sendBccEmail: false, + sendSms: false, + }, +}; +``` + +## InvoiceIssued + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + uid: 'uid4', + number: 'number8', + role: 'role2', + dueDate: '2016-03-13T12:52:32.123Z', + issueDate: 'issue_date0', + paidDate: 'paid_date6', + dueAmount: 'due_amount6', + paidAmount: 'paid_amount4', + taxAmount: 'tax_amount2', + refundAmount: 'refund_amount0', + totalAmount: 'total_amount0', + statusAmount: 'status_amount4', + productName: 'product_name0', + consolidationLevel: 'consolidation_level4', + lineItems: [ + { + } + ], +}; +``` + +## PendingCancellationChange + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + cancellationState: 'cancellation_state8', + cancelsAt: '2016-03-13T12:52:32.123Z', +}; +``` + +## PrepaidSubscriptionBalanceChanged + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + reason: 'reason8', + currentAccountBalanceInCents: BigInt(250), + prepaymentAccountBalanceInCents: BigInt(44), + currentUsageAmountInCents: BigInt(242), +}; +``` + +## ProformaInvoiceIssued + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + uid: 'uid0', + number: 'number2', + role: 'role6', + deliveryDate: '2016-03-13T12:52:32.123Z', + createdAt: '2016-03-13T12:52:32.123Z', + dueAmount: 'due_amount2', + paidAmount: 'paid_amount8', + taxAmount: 'tax_amount6', + totalAmount: 'total_amount6', + productName: 'product_name6', + lineItems: [ + { + } + ], +}; +``` + +## SubscriptionGroupSignupEventData + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + subscriptionGroup: { + }, + customer: { + }, +}; +``` + +## CreditAccountBalanceChanged + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + reason: 'reason8', + serviceCreditAccountBalanceInCents: BigInt(10), + serviceCreditBalanceChangeInCents: BigInt(116), + currencyCode: 'currency_code8', + atTime: '2016-03-13T12:52:32.123Z', +}; +``` + +## PrepaymentAccountBalanceChanged + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + reason: 'reason4', + prepaymentAccountBalanceInCents: BigInt(182), + prepaymentBalanceChangeInCents: BigInt(206), + currencyCode: 'currency_code4', +}; +``` + +## PaymentCollectionMethodChanged + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + previousValue: 'previous_value4', + currentValue: 'current_value2', +}; +``` + +## ItemPricePointChanged + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + itemId: 66, + itemType: 'item_type6', + itemHandle: 'item_handle4', + itemName: 'item_name8', + previousPricePoint: { + }, + currentPricePoint: { + }, +}; +``` + +## CustomFieldValueChange + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + eventType: 'event_type2', + metafieldName: 'metafield_name6', + metafieldId: 78, + oldValue: 'old_value2', + newValue: 'new_value8', + resourceType: 'resource_type2', + resourceId: 74, +}; +``` + +## ChjsTokenizationSuccess + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + paymentProfile: { + id: 44, + }, +}; +``` + +## ChjsTokenizationFailure + +### Initialization Code + +#### Example + +```ts +const value: EventEventSpecificData = { + errors: 'errors2', +}; +``` diff --git a/doc/models/containers/invoice-event-payment.md b/doc/models/containers/invoice-event-payment.md index c2a41248..01e21fd3 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,71 @@ | [`PaymentMethodExternal`](../../../doc/models/payment-method-external.md) | | [`PaymentMethodPaypal`](../../../doc/models/payment-method-paypal.md) | +## PaymentMethodApplePay + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEventPayment = { + type: InvoiceEventPaymentMethod.ApplePay, +}; +``` + +## PaymentMethodBankAccount + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEventPayment = { + maskedAccountNumber: 'masked_account_number2', + maskedRoutingNumber: 'masked_routing_number2', + type: InvoiceEventPaymentMethod.BankAccount, +}; +``` + +## PaymentMethodCreditCard + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEventPayment = { + cardBrand: 'card_brand4', + maskedCardNumber: 'masked_card_number0', + type: InvoiceEventPaymentMethod.CreditCard, +}; +``` + +## PaymentMethodExternal + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEventPayment = { + details: 'details4', + kind: 'kind2', + memo: 'memo8', + type: InvoiceEventPaymentMethod.External, +}; +``` + +## PaymentMethodPaypal + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEventPayment = { + email: 'email2', + type: InvoiceEventPaymentMethod.PaypalAccount, +}; +``` + diff --git a/doc/models/containers/invoice-event.md b/doc/models/containers/invoice-event.md index e48fcd27..dfe1c74f 100644 --- a/doc/models/containers/invoice-event.md +++ b/doc/models/containers/invoice-event.md @@ -25,3 +25,395 @@ | [`VoidInvoiceEvent`](../../../doc/models/void-invoice-event.md) | | [`VoidRemainderEvent`](../../../doc/models/void-remainder-event.md) | +## ApplyCreditNoteEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(214), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ApplyCreditNote, + eventData: { + uid: 'uid6', + creditNoteNumber: 'credit_note_number0', + creditNoteUid: 'credit_note_uid0', + originalAmount: 'original_amount0', + appliedAmount: 'applied_amount2', + }, +}; +``` + +## ApplyDebitNoteEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(164), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ApplyDebitNote, + eventData: { + debitNoteNumber: 'debit_note_number6', + debitNoteUid: 'debit_note_uid2', + originalAmount: 'original_amount0', + appliedAmount: 'applied_amount2', + }, +}; +``` + +## ApplyPaymentEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(234), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ApplyPayment, + eventData: { + consolidationLevel: InvoiceConsolidationLevel.Child, + memo: 'memo0', + originalAmount: 'original_amount0', + appliedAmount: 'applied_amount2', + transactionTime: '2016-03-13T12:52:32.123Z', + paymentMethod: { + type: InvoiceEventPaymentMethod.ApplePay, + }, + }, +}; +``` + +## BackportInvoiceEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(78), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.BackportInvoice, + eventData: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, +}; +``` + +## ChangeChargebackStatusEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(214), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ChangeChargebackStatus, + eventData: { + chargebackStatus: ChargebackStatus.Won, + }, +}; +``` + +## ChangeInvoiceCollectionMethodEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(246), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ChangeInvoiceCollectionMethod, + eventData: { + fromCollectionMethod: 'from_collection_method4', + toCollectionMethod: 'to_collection_method8', + }, +}; +``` + +## ChangeInvoiceStatusEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(92), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.ChangeInvoiceStatus, + eventData: { + fromStatus: InvoiceStatus.Open, + toStatus: InvoiceStatus.Pending, + }, +}; +``` + +## CreateCreditNoteEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(28), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.CreateCreditNote, + eventData: { + }, +}; +``` + +## CreateDebitNoteEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(98), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.CreateDebitNote, + eventData: { + }, +}; +``` + +## FailedPaymentEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(120), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.FailedPayment, + eventData: { + amountInCents: 220, + appliedAmount: 194, + paymentMethod: InvoicePaymentMethodType.Cash, + transactionId: 78, + }, +}; +``` + +## IssueInvoiceEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(130), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.IssueInvoice, + eventData: { + consolidationLevel: InvoiceConsolidationLevel.Child, + fromStatus: InvoiceStatus.Open, + toStatus: InvoiceStatus.Pending, + dueAmount: 'due_amount8', + totalAmount: 'total_amount2', + }, +}; +``` + +## RefundInvoiceEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(54), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.RefundInvoice, + eventData: { + applyCredit: false, + creditNoteAttributes: { + }, + paymentId: 204, + refundAmount: 'refund_amount8', + refundId: 248, + transactionTime: '2016-03-13T12:52:32.123Z', + }, +}; +``` + +## RemovePaymentEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(236), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.RemovePayment, + eventData: { + transactionId: 78, + memo: 'memo0', + appliedAmount: 'applied_amount2', + transactionTime: '2016-03-13T12:52:32.123Z', + paymentMethod: { + type: InvoiceEventPaymentMethod.ApplePay, + }, + prepayment: false, + }, +}; +``` + +## VoidInvoiceEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(16), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.VoidInvoice, + eventData: { + creditNoteAttributes: { + }, + memo: 'memo0', + appliedAmount: 'applied_amount2', + transactionTime: '2016-03-13T12:52:32.123Z', + isAdvanceInvoice: false, + reason: 'reason2', + }, +}; +``` + +## VoidRemainderEvent + +### Initialization Code + +#### Example + +```ts +const value: InvoiceEvent = { + id: BigInt(128), + timestamp: '2016-03-13T12:52:32.123Z', + invoice: { + issueDate: '2024-01-01', + dueDate: '2024-01-01', + paidDate: '2024-01-01', + publicUrlExpiresOn: '2024-01-21', + }, + eventType: InvoiceEventType.VoidRemainder, + eventData: { + creditNoteAttributes: { + }, + memo: 'memo0', + appliedAmount: 'applied_amount2', + transactionTime: '2016-03-13T12:52:32.123Z', + }, +}; +``` + diff --git a/doc/models/containers/issue-service-credit-amount.md b/doc/models/containers/issue-service-credit-amount.md index e0c75185..4dad608d 100644 --- a/doc/models/containers/issue-service-credit-amount.md +++ b/doc/models/containers/issue-service-credit-amount.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: IssueServiceCreditAmount = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: IssueServiceCreditAmount = '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 c23cb4ed..902a2349 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ListProductPricePointsInputProductId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ListProductPricePointsInputProductId = 'String0'; +``` + diff --git a/doc/models/containers/list-usages-input-component-id.md b/doc/models/containers/list-usages-input-component-id.md index b0851b53..2a1ecf8e 100644 --- a/doc/models/containers/list-usages-input-component-id.md +++ b/doc/models/containers/list-usages-input-component-id.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ListUsagesInputComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ListUsagesInputComponentId = '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 65d62c92..1b691a63 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ListUsagesInputSubscriptionIdOrReference = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ListUsagesInputSubscriptionIdOrReference = 'String0'; +``` + diff --git a/doc/models/containers/metafield-enum.md b/doc/models/containers/metafield-enum.md index 5aa43fa3..232c1f18 100644 --- a/doc/models/containers/metafield-enum.md +++ b/doc/models/containers/metafield-enum.md @@ -12,3 +12,25 @@ | `string` | | `string[]` | +## string + +### Initialization Code + +#### Example + +```ts +const value: MetafieldEnum = 'String0'; +``` + +## string[] + +### Initialization Code + +#### Example + +```ts +const value: MetafieldEnum = [ + 'String1' +]; +``` + diff --git a/doc/models/containers/metered-component-unit-price.md b/doc/models/containers/metered-component-unit-price.md index c6cf4c4d..aa19bc8f 100644 --- a/doc/models/containers/metered-component-unit-price.md +++ b/doc/models/containers/metered-component-unit-price.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: MeteredComponentUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: MeteredComponentUnitPrice = 0; +``` + diff --git a/doc/models/containers/on-off-component-unit-price.md b/doc/models/containers/on-off-component-unit-price.md index a3dcf7bf..84125f16 100644 --- a/doc/models/containers/on-off-component-unit-price.md +++ b/doc/models/containers/on-off-component-unit-price.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: OnOffComponentUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: OnOffComponentUnitPrice = 0; +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-month.md b/doc/models/containers/payment-profile-attributes-expiration-month.md index c942683f..65c6647a 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-month.md +++ b/doc/models/containers/payment-profile-attributes-expiration-month.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfileAttributesExpirationMonth = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfileAttributesExpirationMonth = 'String0'; +``` + diff --git a/doc/models/containers/payment-profile-attributes-expiration-year.md b/doc/models/containers/payment-profile-attributes-expiration-year.md index d150958d..c1bfac9e 100644 --- a/doc/models/containers/payment-profile-attributes-expiration-year.md +++ b/doc/models/containers/payment-profile-attributes-expiration-year.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfileAttributesExpirationYear = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfileAttributesExpirationYear = 'String0'; +``` + diff --git a/doc/models/containers/payment-profile.md b/doc/models/containers/payment-profile.md index c144cb25..2be7077a 100644 --- a/doc/models/containers/payment-profile.md +++ b/doc/models/containers/payment-profile.md @@ -14,3 +14,71 @@ | [`CreditCardPaymentProfile`](../../../doc/models/credit-card-payment-profile.md) | | [`PaypalPaymentProfile`](../../../doc/models/paypal-payment-profile.md) | +## ApplePayPaymentProfile + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfile = { + paymentType: PaymentType.ApplePay, +}; +``` + +## BankAccountPaymentProfile + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfile = { + paymentType: PaymentType.BankAccount, + verified: false, +}; +``` + +## CreditCardPaymentProfile + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfile = { + paymentType: PaymentType.CreditCard, + 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', +}; +``` + +## PaypalPaymentProfile + +### Initialization Code + +#### Example + +```ts +const value: PaymentProfile = { + paymentType: PaymentType.PaypalAccount, +}; +``` + diff --git a/doc/models/containers/prepaid-usage-component-unit-price.md b/doc/models/containers/prepaid-usage-component-unit-price.md index f2c7389a..3306e061 100644 --- a/doc/models/containers/prepaid-usage-component-unit-price.md +++ b/doc/models/containers/prepaid-usage-component-unit-price.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: PrepaidUsageComponentUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: PrepaidUsageComponentUnitPrice = 0; +``` + diff --git a/doc/models/containers/price-ending-quantity.md b/doc/models/containers/price-ending-quantity.md index 175761f3..cce6cbca 100644 --- a/doc/models/containers/price-ending-quantity.md +++ b/doc/models/containers/price-ending-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: PriceEndingQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: PriceEndingQuantity = 'String0'; +``` + diff --git a/doc/models/containers/price-starting-quantity.md b/doc/models/containers/price-starting-quantity.md index 4dcf677f..4857bfbf 100644 --- a/doc/models/containers/price-starting-quantity.md +++ b/doc/models/containers/price-starting-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: PriceStartingQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: PriceStartingQuantity = 'String0'; +``` + diff --git a/doc/models/containers/price-unit-price.md b/doc/models/containers/price-unit-price.md index 137fa542..5252d092 100644 --- a/doc/models/containers/price-unit-price.md +++ b/doc/models/containers/price-unit-price.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: PriceUnitPrice = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: PriceUnitPrice = 'String0'; +``` + diff --git a/doc/models/containers/quantity-based-component-unit-price.md b/doc/models/containers/quantity-based-component-unit-price.md index 23077690..00f2f342 100644 --- a/doc/models/containers/quantity-based-component-unit-price.md +++ b/doc/models/containers/quantity-based-component-unit-price.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: QuantityBasedComponentUnitPrice = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: QuantityBasedComponentUnitPrice = 0; +``` + diff --git a/doc/models/containers/reactivate-subscription-request-resume.md b/doc/models/containers/reactivate-subscription-request-resume.md index 5cc249a3..913eac76 100644 --- a/doc/models/containers/reactivate-subscription-request-resume.md +++ b/doc/models/containers/reactivate-subscription-request-resume.md @@ -12,3 +12,24 @@ | `boolean` | | [`ResumeOptions`](../../../doc/models/resume-options.md) | +## boolean + +### Initialization Code + +#### Example + +```ts +const value: ReactivateSubscriptionRequestResume = false; +``` + +## ResumeOptions + +### Initialization Code + +#### Example + +```ts +const value: ReactivateSubscriptionRequestResume = { +}; +``` + 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 71f8e620..fbd5299c 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ReadComponentPricePointComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ReadComponentPricePointComponentId = '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 f8e0aee5..bccd5103 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ReadComponentPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ReadComponentPricePointPricePointId = '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 dcb69b40..04bfe863 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ReadProductPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ReadProductPricePointPricePointId = '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 f0aae397..18baaf24 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: ReadProductPricePointProductId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: ReadProductPricePointProductId = 'String0'; +``` + diff --git a/doc/models/containers/refund-consolidated-invoice-segment-uids.md b/doc/models/containers/refund-consolidated-invoice-segment-uids.md index 159b5a06..050ae473 100644 --- a/doc/models/containers/refund-consolidated-invoice-segment-uids.md +++ b/doc/models/containers/refund-consolidated-invoice-segment-uids.md @@ -12,3 +12,25 @@ | `string[]` | | `string` | +## string[] + +### Initialization Code + +#### Example + +```ts +const value: RefundConsolidatedInvoiceSegmentUids = [ + 'String1' +]; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: RefundConsolidatedInvoiceSegmentUids = 'String0'; +``` + diff --git a/doc/models/containers/refund-invoice-request-refund.md b/doc/models/containers/refund-invoice-request-refund.md index 087b2d96..2ca39ff5 100644 --- a/doc/models/containers/refund-invoice-request-refund.md +++ b/doc/models/containers/refund-invoice-request-refund.md @@ -12,3 +12,34 @@ | [`RefundInvoice`](../../../doc/models/refund-invoice.md) | | [`RefundConsolidatedInvoice`](../../../doc/models/refund-consolidated-invoice.md) | +## RefundInvoice + +### Initialization Code + +#### Example + +```ts +const value: RefundInvoiceRequestRefund = { + amount: 'amount8', + memo: 'memo0', + paymentId: 0, +}; +``` + +## RefundConsolidatedInvoice + +### Initialization Code + +#### Example + +```ts +const value: RefundInvoiceRequestRefund = { + memo: 'memo0', + paymentId: 46, + segmentUids: [ + 'String0', + 'String1' + ], +}; +``` + diff --git a/doc/models/containers/refund-prepayment-amount.md b/doc/models/containers/refund-prepayment-amount.md index 8676c367..2a7e6d49 100644 --- a/doc/models/containers/refund-prepayment-amount.md +++ b/doc/models/containers/refund-prepayment-amount.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: RefundPrepaymentAmount = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: RefundPrepaymentAmount = 0; +``` + diff --git a/doc/models/containers/renewal-preview-component-component-id.md b/doc/models/containers/renewal-preview-component-component-id.md index 64fca8b4..6e555f4f 100644 --- a/doc/models/containers/renewal-preview-component-component-id.md +++ b/doc/models/containers/renewal-preview-component-component-id.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: RenewalPreviewComponentComponentId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: RenewalPreviewComponentComponentId = 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 90f20a10..3b5bea9b 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: RenewalPreviewComponentPricePointId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: RenewalPreviewComponentPricePointId = 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 a3faa7d0..7eea3fa5 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,29 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem = { + itemType: 'Component', + itemId: 108, +}; +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem = { + itemType: 'Product', + itemId: 32, +}; +``` + 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 17674388..c4725516 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalProductPricePointInterval = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalProductPricePointInterval = 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 0298f3a0..285dbbe0 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,23 @@ | `string` | | `bigint` | +## string + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalProductPricePointPriceInCents = 'String0'; +``` + +## bigint + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalProductPricePointPriceInCents = BigInt(0); +``` + 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 e8d22da8..90b61faa 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,29 @@ | [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | | [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | +## ScheduledRenewalItemRequestBodyComponent + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalUpdateRequestRenewalConfigurationItem = { + itemType: 'Component', + itemId: 108, +}; +``` + +## ScheduledRenewalItemRequestBodyProduct + +### Initialization Code + +#### Example + +```ts +const value: ScheduledRenewalUpdateRequestRenewalConfigurationItem = { + itemType: 'Product', + itemId: 32, +}; +``` + diff --git a/doc/models/containers/segment-segment-property-1-value.md b/doc/models/containers/segment-segment-property-1-value.md index e813d76a..f4d949c4 100644 --- a/doc/models/containers/segment-segment-property-1-value.md +++ b/doc/models/containers/segment-segment-property-1-value.md @@ -14,3 +14,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty1Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty1Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty1Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty1Value = false; +``` + diff --git a/doc/models/containers/segment-segment-property-2-value.md b/doc/models/containers/segment-segment-property-2-value.md index 97b1bb6c..d27a78fa 100644 --- a/doc/models/containers/segment-segment-property-2-value.md +++ b/doc/models/containers/segment-segment-property-2-value.md @@ -14,3 +14,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty2Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty2Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty2Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty2Value = false; +``` + diff --git a/doc/models/containers/segment-segment-property-3-value.md b/doc/models/containers/segment-segment-property-3-value.md index 38a76684..e8445c7d 100644 --- a/doc/models/containers/segment-segment-property-3-value.md +++ b/doc/models/containers/segment-segment-property-3-value.md @@ -14,3 +14,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty3Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty3Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty3Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty3Value = false; +``` + diff --git a/doc/models/containers/segment-segment-property-4-value.md b/doc/models/containers/segment-segment-property-4-value.md index 825eb9eb..8059af86 100644 --- a/doc/models/containers/segment-segment-property-4-value.md +++ b/doc/models/containers/segment-segment-property-4-value.md @@ -14,3 +14,43 @@ | `number` | | `boolean` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty4Value = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty4Value = 0; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty4Value = 0; +``` + +## boolean + +### Initialization Code + +#### Example + +```ts +const value: SegmentSegmentProperty4Value = false; +``` + diff --git a/doc/models/containers/subscription-component-allocated-quantity.md b/doc/models/containers/subscription-component-allocated-quantity.md index 76582d9b..fb6a5aea 100644 --- a/doc/models/containers/subscription-component-allocated-quantity.md +++ b/doc/models/containers/subscription-component-allocated-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionComponentAllocatedQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionComponentAllocatedQuantity = 'String0'; +``` + diff --git a/doc/models/containers/subscription-custom-price-expiration-interval.md b/doc/models/containers/subscription-custom-price-expiration-interval.md index 8cab2a89..2fbb45c9 100644 --- a/doc/models/containers/subscription-custom-price-expiration-interval.md +++ b/doc/models/containers/subscription-custom-price-expiration-interval.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceExpirationInterval = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceExpirationInterval = 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 d676937e..cb8c453f 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,23 @@ | `string` | | `bigint` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceInitialChargeInCents = 'String0'; +``` + +## bigint + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceInitialChargeInCents = BigInt(0); +``` + diff --git a/doc/models/containers/subscription-custom-price-interval.md b/doc/models/containers/subscription-custom-price-interval.md index 132b408b..f8c4d80a 100644 --- a/doc/models/containers/subscription-custom-price-interval.md +++ b/doc/models/containers/subscription-custom-price-interval.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceInterval = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceInterval = 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 db926482..e2555a6c 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,23 @@ | `string` | | `bigint` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPricePriceInCents = 'String0'; +``` + +## bigint + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPricePriceInCents = BigInt(0); +``` + diff --git a/doc/models/containers/subscription-custom-price-trial-interval.md b/doc/models/containers/subscription-custom-price-trial-interval.md index 11f0d4a0..2c1cd8a9 100644 --- a/doc/models/containers/subscription-custom-price-trial-interval.md +++ b/doc/models/containers/subscription-custom-price-trial-interval.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceTrialInterval = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceTrialInterval = 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 440a8481..64b28719 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,23 @@ | `string` | | `bigint` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceTrialPriceInCents = 'String0'; +``` + +## bigint + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionCustomPriceTrialPriceInCents = BigInt(0); +``` + 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 5d0f1d16..33dc76c7 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,39 @@ | [`SubscriptionGroupSingleError`](../../../doc/models/subscription-group-single-error.md) | | `string` | +## SubscriptionGroupMembersArrayError + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreateErrorResponseErrors = { + members: [ + 'members6' + ], +}; +``` + +## SubscriptionGroupSingleError + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreateErrorResponseErrors = { + subscriptionGroup: 'subscription_group2', +}; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreateErrorResponseErrors = '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 69f5e5cb..dd57c884 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardExpirationMonth = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardExpirationMonth = 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 b910470f..6f872a0c 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardExpirationYear = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardExpirationYear = 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 acbcf366..c654b038 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardFullNumber = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupCreditCardFullNumber = 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 1bc05f3f..edcfd8b7 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentAllocatedQuantity = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentAllocatedQuantity = 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 dbedf054..749506ff 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentComponentId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentComponentId = 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 f1b44577..7bc2d095 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentPricePointId = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentPricePointId = 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 4772dee8..2697007e 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,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentUnitBalance = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: SubscriptionGroupSignupComponentUnitBalance = 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 a01e7209..8bca0e4e 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateComponentPricePointComponentId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateComponentPricePointComponentId = '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 aeb0fa9d..6eff4a42 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateComponentPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateComponentPricePointPricePointId = 'String0'; +``` + diff --git a/doc/models/containers/update-metafields-request-metafields.md b/doc/models/containers/update-metafields-request-metafields.md index 57723f49..b77fea2c 100644 --- a/doc/models/containers/update-metafields-request-metafields.md +++ b/doc/models/containers/update-metafields-request-metafields.md @@ -12,3 +12,27 @@ | [`UpdateMetafield`](../../../doc/models/update-metafield.md) | | [`UpdateMetafield[]`](../../../doc/models/update-metafield.md) | +## UpdateMetafield + +### Initialization Code + +#### Example + +```ts +const value: UpdateMetafieldsRequestMetafields = { +}; +``` + +## UpdateMetafield[] + +### Initialization Code + +#### Example + +```ts +const value: UpdateMetafieldsRequestMetafields = [ + { +} +]; +``` + diff --git a/doc/models/containers/update-price-ending-quantity.md b/doc/models/containers/update-price-ending-quantity.md index d2fed7a3..a38a49a0 100644 --- a/doc/models/containers/update-price-ending-quantity.md +++ b/doc/models/containers/update-price-ending-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceEndingQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceEndingQuantity = 'String0'; +``` + diff --git a/doc/models/containers/update-price-starting-quantity.md b/doc/models/containers/update-price-starting-quantity.md index 9b208d6d..cdb1d9b1 100644 --- a/doc/models/containers/update-price-starting-quantity.md +++ b/doc/models/containers/update-price-starting-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceStartingQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceStartingQuantity = 'String0'; +``` + diff --git a/doc/models/containers/update-price-unit-price.md b/doc/models/containers/update-price-unit-price.md index c9be82fc..2a0bdc9b 100644 --- a/doc/models/containers/update-price-unit-price.md +++ b/doc/models/containers/update-price-unit-price.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceUnitPrice = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdatePriceUnitPrice = '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 9832d19a..281b794e 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateProductPricePointPricePointId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateProductPricePointPricePointId = '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 87c5ad28..11e390f6 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,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateProductPricePointProductId = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateProductPricePointProductId = 'String0'; +``` + diff --git a/doc/models/containers/update-subscription-net-terms.md b/doc/models/containers/update-subscription-net-terms.md index 951520c6..0175734a 100644 --- a/doc/models/containers/update-subscription-net-terms.md +++ b/doc/models/containers/update-subscription-net-terms.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateSubscriptionNetTerms = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateSubscriptionNetTerms = 0; +``` + diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md index 1b84f1ac..49211c34 100644 --- a/doc/models/containers/update-subscription-snap-day.md +++ b/doc/models/containers/update-subscription-snap-day.md @@ -12,3 +12,23 @@ | `string` | | `number` | +## string + +### Initialization Code + +#### Example + +```ts +const value: UpdateSubscriptionSnapDay = 'String0'; +``` + +## number + +### Initialization Code + +#### Example + +```ts +const value: UpdateSubscriptionSnapDay = 0; +``` + diff --git a/doc/models/containers/usage-quantity.md b/doc/models/containers/usage-quantity.md index f0b1d179..12e9664f 100644 --- a/doc/models/containers/usage-quantity.md +++ b/doc/models/containers/usage-quantity.md @@ -12,3 +12,23 @@ | `number` | | `string` | +## number + +### Initialization Code + +#### Example + +```ts +const value: UsageQuantity = 0; +``` + +## string + +### Initialization Code + +#### Example + +```ts +const value: UsageQuantity = 'String0'; +``` + diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index 5c7c7e72..5e5ec823 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -22,7 +22,7 @@ | `accrueCharge` | `boolean \| undefined` | 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. | | `initiateDunning` | `boolean \| undefined` | 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. | | `pricePointId` | [`CreateAllocationPricePointId \| null \| undefined`](../../doc/models/containers/create-allocation-price-point-id.md) | Optional | This is a container for one-of cases. | -| `billingSchedule` | [`BillingSchedule \| undefined`](../../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` | [`BillingSchedule \| undefined`](../../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. | | `customPrice` | [`ComponentCustomPrice \| undefined`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/create-invoice.md b/doc/models/create-invoice.md index 50c50469..14aed863 100644 --- a/doc/models/create-invoice.md +++ b/doc/models/create-invoice.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `lineItems` | [`CreateInvoiceItem[] \| undefined`](../../doc/models/create-invoice-item.md) | Optional | - | -| `issueDate` | `string \| undefined` | Optional | - | +| `issueDate` | `string \| undefined` | 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. | | `netTerms` | `number \| undefined` | 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. | | `paymentInstructions` | `string \| undefined` | Optional | - | | `memo` | `string \| undefined` | Optional | A custom memo can be sent to override the site's default. | diff --git a/doc/models/create-on-off-component.md b/doc/models/create-on-off-component.md index 835967ed..2634498c 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 1f5787c0..787658ee 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 0da5bfb4..d2a89e04 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 2539dbcb..eb6ee547 100644 --- a/doc/models/create-payment-profile.md +++ b/doc/models/create-payment-profile.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `chargifyToken` | `string \| undefined` | Optional | Token received after sending billing information using chargify.js. | +| `chargifyToken` | `string \| undefined` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). | | `id` | `number \| undefined` | Optional | - | | `paymentType` | [`PaymentType \| undefined`](../../doc/models/payment-type.md) | Optional | - | | `firstName` | `string \| undefined` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | @@ -29,8 +29,8 @@ | `vaultToken` | `string \| undefined` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `customerVaultToken` | `string \| undefined` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | | `customerId` | `number \| undefined` | Optional | (Required when creating a new payment profile) The Chargify customer id. | -| `paypalEmail` | `string \| undefined` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | -| `paymentMethodNonce` | `string \| undefined` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | +| `paypalEmail` | `string \| undefined` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | +| `paymentMethodNonce` | `string \| undefined` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | | `gatewayHandle` | `string \| undefined` | 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. | | `cvv` | `string \| undefined` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | `bankName` | `string \| undefined` | Optional | (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides | diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 117b150e..3c5137ba 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 22801f56..f5fc3c7a 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -58,7 +58,7 @@ | `achAgreement` | [`ACHAgreement \| undefined`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | | `dunningCommunicationDelayEnabled` | `boolean \| undefined` | 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` | | `dunningCommunicationDelayTimeZone` | `string \| null \| undefined` | Optional | Time zone for the Dunning Communication Delay feature. | -| `skipBillingManifestTaxes` | `boolean \| undefined` | 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` | +| `skipBillingManifestTaxes` | `boolean \| undefined` | 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. | ## 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 639e40b5..565d67a4 100644 --- a/doc/models/create-usage.md +++ b/doc/models/create-usage.md @@ -12,7 +12,7 @@ | `quantity` | `number \| undefined` | Optional | integer by default or decimal number if fractional quantities are enabled for the component | | `pricePointId` | `string \| undefined` | Optional | - | | `memo` | `string \| undefined` | Optional | - | -| `billingSchedule` | [`BillingSchedule \| undefined`](../../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` | [`BillingSchedule \| undefined`](../../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. | | `customPrice` | [`ComponentCustomPrice \| undefined`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ## Example (as JSON) diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index c20f5347..fbc88488 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -28,7 +28,7 @@ | `billingAddress2` | `string \| null \| undefined` | Optional | The current billing street address, second line, for the card. | | `paymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.CreditCard` | | `disabled` | `boolean \| undefined` | Optional | - | -| `chargifyToken` | `string \| undefined` | 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) | +| `chargifyToken` | `string \| undefined` | 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) | | `siteGatewaySettingId` | `number \| null \| undefined` | Optional | - | | `gatewayHandle` | `string \| null \| undefined` | Optional | An identifier of connected gateway. | | `createdAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was created | diff --git a/doc/models/credit-note-line-item.md b/doc/models/credit-note-line-item.md index 736d3b48..4d1e195f 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -17,6 +17,7 @@ | `subtotalAmount` | `string \| undefined` | 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). | | `discountAmount` | `string \| undefined` | 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. | | `taxAmount` | `string \| undefined` | 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. | +| `taxIncluded` | `boolean \| undefined` | 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`. | | `totalAmount` | `string \| undefined` | 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`. | | `tieredUnitPrice` | `boolean \| undefined` | 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. | | `periodRangeStart` | `string \| undefined` | Optional | Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. | @@ -27,6 +28,7 @@ | `pricePointId` | `number \| null \| undefined` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. | | `billingScheduleItemId` | `number \| null \| undefined` | Optional | - | | `customItem` | `boolean \| undefined` | Optional | - | +| `prepaidAllocationExpiresAt` | `string \| null \| undefined` | 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"`. | ## Example (as JSON) diff --git a/doc/models/customer.md b/doc/models/customer.md index 02741456..29d8abcb 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -39,6 +39,7 @@ | `salesforceId` | `string \| null \| undefined` | Optional | The Salesforce ID for the customer | | `taxExemptReason` | `string \| null \| undefined` | Optional | The Tax Exemption Reason Code for the customer | | `defaultAutoRenewalProfileId` | `number \| null \| undefined` | Optional | The default auto-renewal profile ID for the customer | +| `maxioid` | `string \| null \| undefined` | Optional | The Maxio-generated unique identifier for the customer. | ## Example (as JSON) diff --git a/doc/models/event-key.md b/doc/models/event-key.md index d38126df..351618c0 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -42,6 +42,7 @@ | `TrialEndNotice` | | `DunningStepReached` | | `InvoiceIssued` | +| `InvoicePending` | | `PrepaidSubscriptionBalanceChanged` | | `SubscriptionGroupSignupSuccess` | | `SubscriptionGroupSignupFailure` | @@ -85,6 +86,8 @@ | `ChargebackWon` | | `PaymentCollectionMethodChanged` | | `ComponentBillingDateChanged` | +| `ChjsTokenizationFailure` | +| `ChjsTokenizationSuccess` | | `SubscriptionTermRenewalScheduled` | | `SubscriptionTermRenewalPending` | | `SubscriptionTermRenewalActivated` | diff --git a/doc/models/event-response.md b/doc/models/event-response.md index 75b10614..1c4163af 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 07f612b7..5b9fa1eb 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 d257592f..f310b2c7 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -17,6 +17,7 @@ | `subtotalAmount` | `string \| undefined` | 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). | | `discountAmount` | `string \| undefined` | 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. | | `taxAmount` | `string \| undefined` | 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. | +| `taxIncluded` | `boolean \| undefined` | 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`. | | `totalAmount` | `string \| undefined` | 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`. | | `tieredUnitPrice` | `boolean \| undefined` | 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. | | `periodRangeStart` | `string \| undefined` | 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. | @@ -32,6 +33,7 @@ | `productPricePointId` | `number \| null \| undefined` | Optional | The price point ID of the line item's product | | `customItem` | `boolean \| undefined` | Optional | - | | `kind` | `string \| undefined` | Optional | - | +| `prepaidAllocationExpiresAt` | `string \| null \| undefined` | 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"`. | ## Example (as JSON) diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md index fb53b477..3d8073e3 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 | | --- | --- | --- | --- | -| `chargifyToken` | `string \| undefined` | 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) | +| `chargifyToken` | `string \| undefined` | 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) | | `id` | `number \| undefined` | Optional | - | | `paymentType` | [`PaymentType \| undefined`](../../doc/models/payment-type.md) | Optional | - | | `firstName` | `string \| undefined` | Optional | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | diff --git a/doc/models/payment-profile-params.md b/doc/models/payment-profile-params.md new file mode 100644 index 00000000..d1b510aa --- /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 | +| --- | --- | --- | --- | +| `firstName` | `string \| undefined` | Optional | - | +| `lastName` | `string \| undefined` | Optional | - | +| `cardType` | `string \| undefined` | Optional | - | + +## 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 3f2ead81..e061473a 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -25,6 +25,9 @@ | `organizationAddress` | [`OrganizationAddress \| undefined`](../../doc/models/organization-address.md) | Optional | - | | `taxConfiguration` | [`TaxConfiguration \| undefined`](../../doc/models/tax-configuration.md) | Optional | - | | `netTerms` | [`NetTerms \| undefined`](../../doc/models/net-terms.md) | Optional | - | +| `multiFrequencyEnabled` | `boolean \| undefined` | Optional | Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. | +| `autoRenewalsEnabled` | `boolean \| undefined` | Optional | Whether the auto-renewals feature is enabled for this site. | +| `portalEnabled` | `boolean \| undefined` | Optional | Whether the Billing Portal is enabled for this site. | | `test` | `boolean \| undefined` | Optional | - | ## 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..4495a715 --- /dev/null +++ b/doc/models/tokenized-payment-profile.md @@ -0,0 +1,27 @@ + +# Tokenized Payment Profile + +## Structure + +`TokenizedPaymentProfile` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `number` | Required | - | +| `vaultToken` | `string \| undefined` | Optional | - | +| `gatewayHandle` | `string \| null \| undefined` | Optional | - | +| `customerVaultToken` | `string \| null \| undefined` | Optional | - | + +## 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 3847d799..6a308306 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -11,12 +11,15 @@ | --- | | `BillingDateChange` | | `ComponentAllocationChange` | +| `ChjsTokenizationFailure` | +| `ChjsTokenizationSuccess` | | `CustomerCreate` | | `CustomerUpdate` | | `DunningStepReached` | | `ExpiringCard` | | `ExpirationDateChange` | | `InvoiceIssued` | +| `InvoicePending` | | `MeteredUsage` | | `PaymentFailure` | | `PaymentSuccess` | diff --git a/e2e/src/sitesController.spec.ts b/e2e/src/sitesController.spec.ts index 2c2caf19..f36d43ba 100644 --- a/e2e/src/sitesController.spec.ts +++ b/e2e/src/sitesController.spec.ts @@ -11,7 +11,7 @@ describe('SitesController', () => { name: 'Typescript SDK', subdomain: 'ts-sdk', currency: 'USD', - auto_renewals_enabled: false, + autoRenewalsEnabled: false, brighton_v1_enabled: false, sellerId: 58665, nonPrimaryCurrencies: ['EUR', 'GBP'], @@ -26,6 +26,7 @@ describe('SitesController', () => { downgradeCredit: 'none', }, defaultPaymentCollectionMethod: 'automatic', + portalEnabled: true, organizationAddress: { street: 'Asdf Street', line2: '123/444', diff --git a/e2e/src/subscriptionsController.spec.ts b/e2e/src/subscriptionsController.spec.ts index 0bc7d3e8..8d4f2c42 100644 --- a/e2e/src/subscriptionsController.spec.ts +++ b/e2e/src/subscriptionsController.spec.ts @@ -294,7 +294,7 @@ describe('Subscriptions Controller', () => { paymentProfile: { customerId, currentVault: AllVaults.Bogus, - vaultToken: '999999', + vaultToken: '999991', paymentType: PaymentType.BankAccount, bankName: 'Vault Bank', }, diff --git a/package.json b/package.json index 8469dc40..e2b9b647 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "9.0.0", + "version": "9.1.0", "license": "MIT", "sideEffects": false, "main": "dist/cjs/index.js", diff --git a/src/client.ts b/src/client.ts index 80a1e9ed..fa3c17d5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -51,7 +51,7 @@ export class Client implements ClientInterface { ? this._config.httpClientOptions.timeout : this._config.timeout; this._userAgent = updateUserAgent( - 'AB SDK TypeScript:9.0.0 on OS {os-info}' + 'AB SDK TypeScript:9.1.0 on OS {os-info}' ); this._requestBuilderFactory = createRequestHandlerFactory( (server) => getBaseUri(server, this._config), diff --git a/src/controllers/aPIExportsController.ts b/src/controllers/aPIExportsController.ts index 29a40929..d3059ba3 100644 --- a/src/controllers/aPIExportsController.ts +++ b/src/controllers/aPIExportsController.ts @@ -22,8 +22,8 @@ import { SingleErrorResponseError } from '../errors/singleErrorResponseError.js' export class APIExportsController extends BaseController { /** - * 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`. @@ -66,8 +66,8 @@ export class APIExportsController extends BaseController { } /** - * 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`. * @@ -109,8 +109,8 @@ export class APIExportsController extends BaseController { } /** - * 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`. @@ -153,7 +153,7 @@ export class APIExportsController extends BaseController { } /** - * 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. * @@ -178,7 +178,7 @@ export class APIExportsController extends BaseController { } /** - * This API creates an invoices export and returns a batchjob object. + * Creates an invoices export and returns a batch job object. * * @return Response from the API call */ @@ -198,7 +198,7 @@ export class APIExportsController extends BaseController { } /** - * This API creates a subscriptions export and returns a batchjob object. + * Creates a subscriptions export and returns a batch job object. * * @return Response from the API call */ @@ -217,7 +217,7 @@ export class APIExportsController extends BaseController { } /** - * This API returns a batchjob object for proforma invoices export. + * Returns a batch job object for a proforma invoices export. * * @param batchId Id of a Batch Job. * @return Response from the API call @@ -235,7 +235,7 @@ export class APIExportsController extends BaseController { } /** - * This API returns a batchjob object for invoices export. + * Returns a batch job object for an invoices export. * * @param batchId Id of a Batch Job. * @return Response from the API call @@ -253,7 +253,7 @@ export class APIExportsController extends BaseController { } /** - * This API returns a batchjob object for subscriptions export. + * Returns a batch job object for a subscriptions export. * * @param batchId Id of a Batch Job. * @return Response from the API call diff --git a/src/controllers/advanceInvoiceController.ts b/src/controllers/advanceInvoiceController.ts index 9cbd756f..bfc12d0a 100644 --- a/src/controllers/advanceInvoiceController.ts +++ b/src/controllers/advanceInvoiceController.ts @@ -23,8 +23,8 @@ export class AdvanceInvoiceController extends BaseController { /** * 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. + * 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 @@ -63,8 +63,8 @@ export class AdvanceInvoiceController extends BaseController { } /** - * 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 The Chargify id of the subscription. * @return Response from the API call diff --git a/src/controllers/billingPortalController.ts b/src/controllers/billingPortalController.ts index 80803f93..ad3c636f 100644 --- a/src/controllers/billingPortalController.ts +++ b/src/controllers/billingPortalController.ts @@ -30,13 +30,16 @@ import { TooManyManagementLinkRequestsError } from '../errors/tooManyManagementL export class BillingPortalController extends BaseController { /** + * 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. @@ -84,8 +87,7 @@ export class BillingPortalController extends BaseController { } /** - * 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 * @@ -125,19 +127,16 @@ export class BillingPortalController extends BaseController { } /** - * 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 when the Billing Portal is already disabled for a Customer, - * you will receive a `422` error 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 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 * @@ -165,7 +164,7 @@ export class BillingPortalController extends BaseController { } /** - * 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. diff --git a/src/controllers/componentPricePointsController.ts b/src/controllers/componentPricePointsController.ts index 4085b88e..e6ecf9cf 100644 --- a/src/controllers/componentPricePointsController.ts +++ b/src/controllers/componentPricePointsController.ts @@ -168,7 +168,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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. * @@ -229,7 +229,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * Use this endpoint to create multiple component price points in one request. + * Creates multiple component price points in one request. * * @param componentId The Advanced Billing id of the component for * which you want to fetch price points. @@ -311,8 +311,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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. * @@ -358,8 +357,8 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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 The id or handle of the component. When using the * handle, it must be prefixed with `handle:`. Example: @@ -394,8 +393,8 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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 The id or handle of the component. When using the * handle, it must be prefixed with `handle:`. @@ -432,7 +431,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * Use this endpoint to unarchive a component price point. + * Unarchives a component price point. * * @param componentId The Advanced Billing id of the component to which the price point belongs * @param pricePointId The Advanced Billing id of the price point @@ -454,8 +453,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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 @@ -494,8 +492,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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. * @@ -530,7 +527,7 @@ export class ComponentPricePointsController extends BaseController { } /** - * 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 include Allows including additional data in the response. Use in * query: `include=currency_prices`. diff --git a/src/controllers/componentsController.ts b/src/controllers/componentsController.ts index 4e38f4d1..fb3d6b1b 100644 --- a/src/controllers/componentsController.ts +++ b/src/controllers/componentsController.ts @@ -49,11 +49,11 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class ComponentsController extends BaseController { /** - * 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 + * 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 @@ -93,11 +93,10 @@ export class ComponentsController extends BaseController { } /** - * 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 * 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 @@ -144,8 +143,8 @@ export class ComponentsController extends BaseController { } /** - * 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). @@ -183,8 +182,8 @@ export class ComponentsController extends BaseController { } /** - * 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 @@ -224,8 +223,8 @@ export class ComponentsController extends BaseController { } /** - * 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 @@ -269,8 +268,8 @@ export class ComponentsController extends BaseController { } /** - * 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 The handle of the component to find * @return Response from the API call @@ -313,7 +312,7 @@ export class ComponentsController extends BaseController { } /** - * 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:`. @@ -351,8 +350,7 @@ export class ComponentsController extends BaseController { } /** - * 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 The Advanced Billing id of the product family to which the component belongs * @param componentId Either the Advanced Billing id of the component or the handle for the @@ -381,7 +379,7 @@ export class ComponentsController extends BaseController { } /** - * This request will return a list of components for a site. + * Lists components for a site. * * @param dateField The type of filter you would like to apply to your search. * @param startDate The start date (format YYYY-MM-DD) with which to filter @@ -470,7 +468,7 @@ export class ComponentsController extends BaseController { } /** - * 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:`. @@ -503,7 +501,7 @@ export class ComponentsController extends BaseController { } /** - * This request will return a list of components for a particular product family. + * Lists components for a particular product family. * * @param productFamilyId The Advanced Billing id of the product family * @param includeArchived Include archived items. diff --git a/src/controllers/couponsController.ts b/src/controllers/couponsController.ts index a9efcd09..288bfc77 100644 --- a/src/controllers/couponsController.ts +++ b/src/controllers/couponsController.ts @@ -40,27 +40,22 @@ import { SingleStringErrorResponseError } from '../errors/singleStringErrorRespo export class CouponsController extends BaseController { /** - * ## 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. + * * @param productFamilyId The Advanced Billing id of the product family to which the * coupon belongs * @param body @@ -90,7 +85,7 @@ export class CouponsController extends BaseController { } /** - * List coupons for a specific Product Family in a Site. + * Lists coupons for a specific product family in a site. * * @param productFamilyId The Advanced Billing id of the product family to which the * coupon belongs @@ -148,8 +143,8 @@ export class CouponsController extends BaseController { } /** - * 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 @@ -182,8 +177,8 @@ export class CouponsController extends BaseController { } /** - * 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 @@ -220,9 +215,7 @@ export class CouponsController extends BaseController { } /** - * ## 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: @@ -260,7 +253,8 @@ export class CouponsController extends BaseController { } /** - * 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. @@ -285,7 +279,7 @@ export class CouponsController extends BaseController { } /** - * You can retrieve a list of coupons. + * Lists coupons for a site. * * @param page Result records are organized in pages. By default, the first * page of results is displayed. The page parameter specifies a @@ -337,7 +331,7 @@ export class CouponsController extends BaseController { } /** - * 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 The Advanced Billing id of the product family to which the coupon belongs. * @param couponId The Advanced Billing id of the coupon. @@ -359,9 +353,9 @@ export class CouponsController extends BaseController { } /** - * 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 @@ -417,9 +411,9 @@ export class CouponsController extends BaseController { } /** - * 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. @@ -452,6 +446,8 @@ export class CouponsController extends BaseController { } /** + * 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 @@ -523,7 +519,7 @@ export class CouponsController extends BaseController { } /** - * This request allows you to request the subcodes that are attached to a coupon. + * Lists the subcodes attached to a coupon. * * @param couponId The Advanced Billing id of the coupon * @param page Result records are organized in pages. By default, the first page of results is @@ -563,8 +559,7 @@ export class CouponsController extends BaseController { } /** - * 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 @@ -599,6 +594,8 @@ export class CouponsController extends BaseController { } /** + * 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 diff --git a/src/controllers/customFieldsController.ts b/src/controllers/customFieldsController.ts index 79a627b7..32ea64bb 100644 --- a/src/controllers/customFieldsController.ts +++ b/src/controllers/customFieldsController.ts @@ -182,7 +182,7 @@ export class CustomFieldsController extends BaseController { * * - 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. * @@ -340,7 +340,7 @@ export class CustomFieldsController extends BaseController { * 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. + * for the Subscription resource and another 100 for the Customer resource. * * @param resourceType The resource type to which the metafields belong. * @param resourceId The Advanced Billing id of the customer or the subscription @@ -407,7 +407,7 @@ export class CustomFieldsController extends BaseController { } /** - * Lists metadata for a specified array of subscriptions or customers. + * Lists metadata for a specified array of subscriptions or customers. * * @param resourceType The resource type to which the metafields belong. * @param page Result records are organized in pages. By default, the first page of diff --git a/src/controllers/customersController.ts b/src/controllers/customersController.ts index 52cc2b09..1f1b7857 100644 --- a/src/controllers/customersController.ts +++ b/src/controllers/customersController.ts @@ -36,9 +36,8 @@ import { CustomerErrorResponseError } from '../errors/customerErrorResponseError export class CustomersController extends BaseController { /** - * 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 @@ -98,7 +97,7 @@ export class CustomersController extends BaseController { } /** - * 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 * @@ -216,7 +215,7 @@ export class CustomersController extends BaseController { } /** - * This method allows to update the Customer. + * Updates the customer. * * @param id The Advanced Billing id of the customer * @param body @@ -247,7 +246,7 @@ export class CustomersController extends BaseController { } /** - * This method allows you to delete the Customer. + * Deletes the customer. * * @param id The Advanced Billing id of the customer * @return Response from the API call @@ -264,8 +263,7 @@ export class CustomersController extends BaseController { } /** - * 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 Customer reference * @return Response from the API call @@ -282,7 +280,7 @@ export class CustomersController extends BaseController { } /** - * This method lists all subscriptions that belong to a customer. + * Lists all subscriptions that belong to a customer. * * @param customerId The Chargify id of the customer * @return Response from the API call diff --git a/src/controllers/eventsBasedBillingSegmentsController.ts b/src/controllers/eventsBasedBillingSegmentsController.ts index 71b64a17..53a62cb0 100644 --- a/src/controllers/eventsBasedBillingSegmentsController.ts +++ b/src/controllers/eventsBasedBillingSegmentsController.ts @@ -42,9 +42,9 @@ import { EventBasedBillingSegmentErrorsError } from '../errors/eventBasedBilling export class EventsBasedBillingSegmentsController extends BaseController { /** - * 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. @@ -81,8 +81,7 @@ export class EventsBasedBillingSegmentsController extends BaseController { } /** - * 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. @@ -147,8 +146,8 @@ export class EventsBasedBillingSegmentsController extends BaseController { } /** - * 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. @@ -188,7 +187,7 @@ export class EventsBasedBillingSegmentsController extends BaseController { } /** - * 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. @@ -223,8 +222,7 @@ export class EventsBasedBillingSegmentsController extends BaseController { } /** - * 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 @@ -265,8 +263,7 @@ export class EventsBasedBillingSegmentsController extends BaseController { } /** - * 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 diff --git a/src/controllers/eventsController.ts b/src/controllers/eventsController.ts index bef5be55..63795e89 100644 --- a/src/controllers/eventsController.ts +++ b/src/controllers/eventsController.ts @@ -18,6 +18,8 @@ import { BaseController } from './baseController.js'; export class EventsController extends BaseController { /** + * Lists events for a site. + * * ## Events Intro * * Advanced Billing Events include various activity that happens around a Site. This information is @@ -25,8 +27,8 @@ export class EventsController extends BaseController { * 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). + * 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 * @@ -184,7 +186,7 @@ export class EventsController extends BaseController { } /** - * The following request will return a list of events for a subscription. + * Lists events for a subscription. * * ## Event Key * The event type is identified by the key property. You can check supported keys @@ -255,7 +257,7 @@ export class EventsController extends BaseController { } /** - * 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 page Result records are organized in pages. By default, the first page of results is * displayed. The page parameter specifies a page number of results to fetch. You can diff --git a/src/controllers/insightsController.ts b/src/controllers/insightsController.ts index 795d259b..c041f3c9 100644 --- a/src/controllers/insightsController.ts +++ b/src/controllers/insightsController.ts @@ -27,8 +27,8 @@ import { SubscriptionsMrrErrorResponseError } from '../errors/subscriptionsMrrEr export class InsightsController extends BaseController { /** - * 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 * @@ -51,7 +51,7 @@ export class InsightsController extends BaseController { } /** - * This endpoint returns your site's current MRR, including plan and usage breakouts. + * Returns your site's current MRR, including plan and usage breakouts. * * @param atTime submit a timestamp in ISO8601 format to request MRR for a historic time * @param subscriptionId submit the id of a subscription in order to limit results @@ -76,7 +76,7 @@ export class InsightsController extends BaseController { } /** - * This endpoint returns your site's MRR movements. + * Lists your site's MRR movements. * * ## Understanding MRR movements * diff --git a/src/controllers/invoicesController.ts b/src/controllers/invoicesController.ts index fd05e9b1..e3f857e6 100644 --- a/src/controllers/invoicesController.ts +++ b/src/controllers/invoicesController.ts @@ -99,8 +99,8 @@ export class InvoicesController extends BaseController { * * 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). * * @param uid The unique identifier for the invoice, this does not refer to * the public facing invoice number. @@ -475,8 +475,8 @@ export class InvoicesController extends BaseController { /** * 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. * * ``` * { @@ -814,10 +814,10 @@ export class InvoicesController extends BaseController { * 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: + * ### Line item types + * 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 * 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 @@ -827,7 +827,7 @@ export class InvoicesController extends BaseController { * 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 + * 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. * @@ -964,9 +964,10 @@ export class InvoicesController extends BaseController { * * #### 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 * @@ -983,7 +984,7 @@ export class InvoicesController extends BaseController { * #### 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. + * payment instructions can be sent with the `payment_instructions` parameter. * * #### Status * @@ -1064,9 +1065,9 @@ export class InvoicesController extends BaseController { } /** - * 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. @@ -1101,7 +1102,7 @@ export class InvoicesController extends BaseController { /** * 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. + * `/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. @@ -1142,10 +1143,10 @@ export class InvoicesController extends BaseController { * * 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. + * 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 + * 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: diff --git a/src/controllers/offersController.ts b/src/controllers/offersController.ts index 040f19e7..080b5a11 100644 --- a/src/controllers/offersController.ts +++ b/src/controllers/offersController.ts @@ -21,7 +21,7 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class OffersController extends BaseController { /** - * Create an offer within your Advanced Billing site by sending a POST request. + * Creates an offer within your Advanced Billing site. * * ## Documentation * @@ -63,7 +63,7 @@ export class OffersController extends BaseController { } /** - * This endpoint will list offers for a site. + * Lists offers for a site. * * @param page Result records are organized in pages. By default, the first page of results * is displayed. The page parameter specifies a page number of results to fetch. @@ -109,8 +109,8 @@ export class OffersController extends BaseController { } /** - * 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 The Chargify id of the offer * @return Response from the API call @@ -127,7 +127,7 @@ export class OffersController extends BaseController { } /** - * 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 The Chargify id of the offer * @return Response from the API call @@ -144,7 +144,7 @@ export class OffersController extends BaseController { } /** - * Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the + * Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive the * correct item. * * @param offerId The Chargify id of the offer diff --git a/src/controllers/paymentProfilesController.ts b/src/controllers/paymentProfilesController.ts index da6fff3b..528d628f 100644 --- a/src/controllers/paymentProfilesController.ts +++ b/src/controllers/paymentProfilesController.ts @@ -52,9 +52,9 @@ export class PaymentProfilesController extends BaseController { * * 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. + * 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: * @@ -65,19 +65,20 @@ export class PaymentProfilesController extends BaseController { * + [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- + * + [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 example](https://docs.maxio.com/hc/en- + * + [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 example](https://docs.maxio.com/hc/en- + * + [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 example](https://docs.maxio.com/hc/en- + * + [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 example](https://developers.chargify. + * + [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 example](https://developers.chargify. + * + [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- @@ -89,80 +90,15 @@ export class PaymentProfilesController extends BaseController { * + [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. * * @param body When following the IBAN or the Local Bank details * examples, a customer, bank account and mandate will be @@ -194,8 +130,8 @@ export class PaymentProfilesController extends BaseController { } /** - * 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 page Result records are organized in pages. By default, the first page of results is * displayed. The page parameter specifies a page number of results to fetch. You can @@ -235,7 +171,7 @@ export class PaymentProfilesController extends BaseController { } /** - * 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. * @@ -291,6 +227,8 @@ export class PaymentProfilesController extends BaseController { } /** + * Updates a payment profile. + * * ## Partial Card Updates * * In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue @@ -426,8 +364,8 @@ export class PaymentProfilesController extends BaseController { } /** - * 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 Identifier of the bank account in the system. * @param body @@ -483,8 +421,8 @@ export class PaymentProfilesController extends BaseController { } /** - * 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. diff --git a/src/controllers/productFamiliesController.ts b/src/controllers/productFamiliesController.ts index 26039e31..aaadb961 100644 --- a/src/controllers/productFamiliesController.ts +++ b/src/controllers/productFamiliesController.ts @@ -140,7 +140,7 @@ export class ProductFamiliesController extends BaseController { /** * Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a - * container for your products, components and coupons. + * 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). @@ -169,7 +169,7 @@ export class ProductFamiliesController extends BaseController { } /** - * Retrieve a list of Product Families for a site. + * Returns a list of Product Families for a site. * * @param dateField The type of filter you would like to apply to your search. Use in query: * `date_field=created_at`. diff --git a/src/controllers/productPricePointsController.ts b/src/controllers/productPricePointsController.ts index 5b9f7f79..a84aaf85 100644 --- a/src/controllers/productPricePointsController.ts +++ b/src/controllers/productPricePointsController.ts @@ -239,8 +239,8 @@ export class ProductPricePointsController extends BaseController { } /** - * 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 The id or handle of the product. When using the * handle, it must be prefixed with `handle:`. Example: @@ -314,7 +314,7 @@ export class ProductPricePointsController extends BaseController { } /** - * Use this endpoint to unarchive an archived product price point. + * Unarchives an archived product price point. * * @param productId The Advanced Billing id of the product to which the price point belongs * @param pricePointId The Advanced Billing id of the product price point @@ -469,7 +469,7 @@ export class ProductPricePointsController extends BaseController { } /** - * This method allows retrieval of a list of Products Price Points belonging to a Site. + * Lists Product Price Points belonging to a site. * * @param direction Controls the order in which results are returned. Use in query * `direction=asc`. diff --git a/src/controllers/productsController.ts b/src/controllers/productsController.ts index 64937bc6..02ee458e 100644 --- a/src/controllers/productsController.ts +++ b/src/controllers/productsController.ts @@ -33,7 +33,7 @@ export class ProductsController extends BaseController { /** * 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) @@ -127,7 +127,7 @@ export class ProductsController extends BaseController { } /** - * Archives the product. All current subscribers will be unffected; their subscription/purchase will + * 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 @@ -171,7 +171,7 @@ export class ProductsController extends BaseController { } /** - * This method allows to retrieve a list of Products belonging to a Site. + * Lists products belonging to a site. * * @param dateField The type of filter you would like to apply to your search. * Use in query: `date_field=created_at`. diff --git a/src/controllers/proformaInvoicesController.ts b/src/controllers/proformaInvoicesController.ts index 93a4f259..c5d15ce9 100644 --- a/src/controllers/proformaInvoicesController.ts +++ b/src/controllers/proformaInvoicesController.ts @@ -47,10 +47,10 @@ import { ProformaBadRequestErrorResponseError } from '../errors/proformaBadReque export class ProformaInvoicesController extends BaseController { /** - * 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. @@ -81,7 +81,7 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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 @@ -140,7 +140,7 @@ export class ProformaInvoicesController extends BaseController { } /** - * Use this endpoint to read the details of an existing proforma invoice. + * Returns the details of an existing proforma invoice. * * ## Restrictions * @@ -164,8 +164,8 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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. @@ -198,7 +198,7 @@ export class ProformaInvoicesController extends BaseController { } /** - * By default, proforma invoices returned on the index will only include totals, not detailed + * 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`. * @@ -295,7 +295,7 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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 @@ -333,7 +333,7 @@ export class ProformaInvoicesController extends BaseController { } /** - * This endpoint will void a proforma invoice that has the status "draft". + * Voids a proforma invoice that has the status "draft". * * ## Restrictions * @@ -375,8 +375,8 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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 + * 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. * @@ -415,11 +415,10 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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 @@ -462,12 +461,11 @@ export class ProformaInvoicesController extends BaseController { } /** - * 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 diff --git a/src/controllers/reasonCodesController.ts b/src/controllers/reasonCodesController.ts index 10ff5c60..a7753f86 100644 --- a/src/controllers/reasonCodesController.ts +++ b/src/controllers/reasonCodesController.ts @@ -25,9 +25,11 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class ReasonCodesController extends BaseController { /** + * 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 + * 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 @@ -42,7 +44,7 @@ export class ReasonCodesController extends BaseController { * * ## 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. * * @param body * @return Response from the API call @@ -68,8 +70,7 @@ export class ReasonCodesController extends BaseController { } /** - * 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 page Result records are organized in pages. By default, the first page of results is * displayed. The page parameter specifies a page number of results to fetch. You can start @@ -109,8 +110,7 @@ export class ReasonCodesController extends BaseController { } /** - * 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 The Advanced Billing id of the reason code * @return Response from the API call @@ -128,7 +128,7 @@ export class ReasonCodesController extends BaseController { } /** - * 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 The Advanced Billing id of the reason code * @param body @@ -159,8 +159,8 @@ export class ReasonCodesController extends BaseController { } /** - * 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 The Advanced Billing id of the reason code * @return Response from the API call diff --git a/src/controllers/referralCodesController.ts b/src/controllers/referralCodesController.ts index 4f1ace8f..b35f081a 100644 --- a/src/controllers/referralCodesController.ts +++ b/src/controllers/referralCodesController.ts @@ -15,8 +15,8 @@ import { SingleStringErrorResponseError } from '../errors/singleStringErrorRespo export class ReferralCodesController extends BaseController { /** - * 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 * diff --git a/src/controllers/salesCommissionsController.ts b/src/controllers/salesCommissionsController.ts index 6234f37b..c7f8f4fc 100644 --- a/src/controllers/salesCommissionsController.ts +++ b/src/controllers/salesCommissionsController.ts @@ -19,7 +19,7 @@ import { BaseController } from './baseController.js'; export class SalesCommissionsController extends BaseController { /** - * Endpoint returns subscriptions with associated sales reps + * Lists subscriptions with associated sales reps. * * ## Modified Authentication Process * @@ -86,7 +86,7 @@ export class SalesCommissionsController extends BaseController { } /** - * Endpoint returns sales rep list with details + * Returns a sales rep list with details. * * ## Modified Authentication Process * @@ -153,7 +153,7 @@ export class SalesCommissionsController extends BaseController { } /** - * Endpoint returns sales rep and attached subscriptions details. + * Returns a sales rep and attached subscription details. * * ## Modified Authentication Process * diff --git a/src/controllers/sitesController.ts b/src/controllers/sitesController.ts index c40253b9..45dfba75 100644 --- a/src/controllers/sitesController.ts +++ b/src/controllers/sitesController.ts @@ -16,16 +16,16 @@ import { BaseController } from './baseController.js'; export class SitesController extends BaseController { /** - * 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. + * 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, @@ -45,9 +45,10 @@ export class SitesController extends BaseController { } /** - * 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.** @@ -73,7 +74,7 @@ export class SitesController extends BaseController { } /** - * This endpoint returns public keys used for Chargify.js. + * Returns public keys used for Maxio.js (formerly Chargify.js). * * @param page Result records are organized in pages. By default, the first page of results is * displayed. The page parameter specifies a page number of results to fetch. You can start diff --git a/src/controllers/subscriptionComponentsController.ts b/src/controllers/subscriptionComponentsController.ts index 49758506..5382ff74 100644 --- a/src/controllers/subscriptionComponentsController.ts +++ b/src/controllers/subscriptionComponentsController.ts @@ -113,7 +113,7 @@ import { SubscriptionComponentAllocationError } from '../errors/subscriptionComp export class SubscriptionComponentsController extends BaseController { /** - * This request will list information regarding a specific component owned by a subscription. + * Returns information for a specific component on a subscription. * * @param subscriptionId The Chargify id of the subscription. * @param componentId The Advanced Billing id of the component. Alternatively, the component's handle @@ -137,7 +137,7 @@ export class SubscriptionComponentsController extends BaseController { } /** - * This request will list a subscription's applied components. + * Lists a subscription's applied components. * * ## Archived Components * @@ -335,8 +335,8 @@ export class SubscriptionComponentsController extends BaseController { * 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- @@ -360,7 +360,7 @@ export class SubscriptionComponentsController extends BaseController { * > **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- + * For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en- * us/articles/24251883961485-Component-Allocations-Overview) product Documentation. * * @param subscriptionId The Chargify id of the subscription. @@ -394,7 +394,7 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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 * @@ -438,7 +438,7 @@ export class SubscriptionComponentsController extends BaseController { /** * 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. + * 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. @@ -461,8 +461,8 @@ export class SubscriptionComponentsController extends BaseController { * > **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. * * @param subscriptionId The Chargify id of the subscription. * @param body @@ -493,9 +493,9 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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` * @@ -534,9 +534,8 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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. @@ -586,8 +585,10 @@ export class SubscriptionComponentsController extends BaseController { } /** + * 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 + * reduce a subscription's allocated quantity for a prepaid usage component, each allocation must be * destroyed individually via this endpoint. * * ## Credit Scheme @@ -648,14 +649,14 @@ export class SubscriptionComponentsController extends BaseController { * 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 + * 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 + * 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- @@ -751,8 +752,8 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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. * @@ -874,6 +875,8 @@ export class SubscriptionComponentsController extends BaseController { } /** + * 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. * @@ -912,8 +915,8 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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 The Advanced Billing id of the subscription * @param componentId The Advanced Billing id of the component @@ -935,6 +938,8 @@ export class SubscriptionComponentsController extends BaseController { } /** + * 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 @@ -987,7 +992,7 @@ export class SubscriptionComponentsController extends BaseController { } /** - * 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.* @@ -1023,7 +1028,7 @@ export class SubscriptionComponentsController extends BaseController { } /** - * This request will list components applied to each subscription. + * Lists components applied to each subscription. * * @param page Result records are organized in pages. * By default, the first page of results diff --git a/src/controllers/subscriptionGroupInvoiceAccountController.ts b/src/controllers/subscriptionGroupInvoiceAccountController.ts index a3b4e51c..eba8038e 100644 --- a/src/controllers/subscriptionGroupInvoiceAccountController.ts +++ b/src/controllers/subscriptionGroupInvoiceAccountController.ts @@ -41,9 +41,8 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class SubscriptionGroupInvoiceAccountController extends BaseController { /** - * 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 The uid of the subscription group * @param body @@ -76,7 +75,7 @@ export class SubscriptionGroupInvoiceAccountController extends BaseController { } /** - * This request will list a subscription group's prepayments. + * Lists a subscription group's prepayments. * * @param uid The uid of the subscription group * @param page Result records are organized in pages. By default, the first page @@ -127,9 +126,9 @@ export class SubscriptionGroupInvoiceAccountController extends BaseController { } /** - * 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 The uid of the subscription group * @param body @@ -159,8 +158,8 @@ export class SubscriptionGroupInvoiceAccountController extends BaseController { } /** - * 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 The uid of the subscription group * @param body diff --git a/src/controllers/subscriptionGroupStatusController.ts b/src/controllers/subscriptionGroupStatusController.ts index fa9ffad3..dc5c0056 100644 --- a/src/controllers/subscriptionGroupStatusController.ts +++ b/src/controllers/subscriptionGroupStatusController.ts @@ -58,8 +58,8 @@ export class SubscriptionGroupStatusController extends BaseController { } /** - * 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. @@ -85,6 +85,8 @@ export class SubscriptionGroupStatusController extends BaseController { } /** + * 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. @@ -110,10 +112,10 @@ export class SubscriptionGroupStatusController extends BaseController { } /** - * 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 @@ -123,12 +125,12 @@ export class SubscriptionGroupStatusController extends BaseController { * * 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 + * 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. + * 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. @@ -148,6 +150,16 @@ export class SubscriptionGroupStatusController extends BaseController { * 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 The uid of the subscription group * @param body * @return Response from the API call diff --git a/src/controllers/subscriptionGroupsController.ts b/src/controllers/subscriptionGroupsController.ts index 00cfd5d9..cd32da95 100644 --- a/src/controllers/subscriptionGroupsController.ts +++ b/src/controllers/subscriptionGroupsController.ts @@ -64,7 +64,7 @@ import { SubscriptionGroupUpdateErrorResponseError } from '../errors/subscriptio export class SubscriptionGroupsController extends BaseController { /** - * 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 @@ -76,12 +76,12 @@ export class SubscriptionGroupsController extends BaseController { * * 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 + * 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. + * you are using a secure chargify_token generated by Maxio.js (formerly Chargify.js). * * @param body * @return Response from the API call @@ -188,7 +188,7 @@ export class SubscriptionGroupsController extends BaseController { } /** - * Use this endpoint to find subscription group details. + * Returns subscription group details. * * #### Current Billing Amount in Cents * @@ -217,10 +217,10 @@ export class SubscriptionGroupsController extends BaseController { } /** - * Use this endpoint to update subscription group members. + * 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 - * subscription group. To clean up members, just leave the array empty. + * the subscription group. To clean up members, just leave the array empty. * * @param uid The uid of the subscription group * @param body @@ -272,9 +272,9 @@ export class SubscriptionGroupsController extends BaseController { } /** - * 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. * * @param subscriptionId The Advanced Billing id of the subscription associated with the subscription * group @@ -348,7 +348,7 @@ export class SubscriptionGroupsController extends BaseController { * 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. + * hierarchies) features, it is possible to remove an existing subscription from a subscription group. * * @param subscriptionId The Chargify id of the subscription. * @return Response from the API call diff --git a/src/controllers/subscriptionInvoiceAccountController.ts b/src/controllers/subscriptionInvoiceAccountController.ts index abe6f3f4..3ee2ab08 100644 --- a/src/controllers/subscriptionInvoiceAccountController.ts +++ b/src/controllers/subscriptionInvoiceAccountController.ts @@ -78,7 +78,7 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * ## Create Prepayment + * Creates a prepayment for a subscription. * * In order to specify a prepayment made against a subscription, specify the `amount, memo, details, * method`. @@ -89,6 +89,16 @@ export class SubscriptionInvoiceAccountController extends BaseController { * * 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 The Chargify id of the subscription. * @param body @@ -118,7 +128,7 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * This request will list a subscription's prepayments. + * Lists a subscription's prepayments. * * @param subscriptionId The Chargify id of the subscription. * @param page Result records are organized in pages. By default, the @@ -167,8 +177,8 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * 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 The Chargify id of the subscription. * @param body @@ -198,8 +208,8 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * 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 The Chargify id of the subscription. * @param body @@ -229,7 +239,7 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * This request will list a subscription's service credits. + * Lists a subscription's service credits. * * @param subscriptionId The Chargify id of the subscription. * @param page Result records are organized in pages. By default, the first page of @@ -276,9 +286,9 @@ export class SubscriptionInvoiceAccountController extends BaseController { } /** - * 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`. diff --git a/src/controllers/subscriptionNotesController.ts b/src/controllers/subscriptionNotesController.ts index 2069fb86..c8a832e6 100644 --- a/src/controllers/subscriptionNotesController.ts +++ b/src/controllers/subscriptionNotesController.ts @@ -19,7 +19,7 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class SubscriptionNotesController extends BaseController { /** - * Use the following method to create a note for a subscription. + * Creates a note for a subscription. * * ## How to Use Subscription Notes * @@ -58,8 +58,7 @@ export class SubscriptionNotesController extends BaseController { } /** - * 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 subscriptionId The Chargify id of the subscription. * @param page Result records are organized in pages. By default, the first page of results is @@ -108,8 +107,7 @@ export class SubscriptionNotesController extends BaseController { } /** - * 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 The Chargify id of the subscription. * @param noteId The Advanced Billing id of the note @@ -131,7 +129,7 @@ export class SubscriptionNotesController extends BaseController { } /** - * Use the following method to update a note for a Subscription. + * Updates a note for a subscription. * * @param subscriptionId The Chargify id of the subscription. * @param noteId The Advanced Billing id of the note diff --git a/src/controllers/subscriptionProductsController.ts b/src/controllers/subscriptionProductsController.ts index 14459418..1147a145 100644 --- a/src/controllers/subscriptionProductsController.ts +++ b/src/controllers/subscriptionProductsController.ts @@ -27,7 +27,8 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class SubscriptionProductsController extends BaseController { /** - * + * 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 @@ -51,76 +52,18 @@ export class SubscriptionProductsController extends BaseController { * * ## 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: + * 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. * - * - whether the authentication was successful (`success`) - * - the gateway ID for the payment (`gateway_payment_id`) - * - the subscription ID (`subscription_id`) + * ## 3D Secure (3DS) Authentication post-authentication flow * - * 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. + * 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. * - * 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. + * 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 The Chargify id of the subscription. * @param body @@ -150,10 +93,12 @@ export class SubscriptionProductsController extends BaseController { } /** + * 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"`). + * 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. diff --git a/src/controllers/subscriptionStatusController.ts b/src/controllers/subscriptionStatusController.ts index 2a827c63..1dd1f914 100644 --- a/src/controllers/subscriptionStatusController.ts +++ b/src/controllers/subscriptionStatusController.ts @@ -41,16 +41,18 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class SubscriptionStatusController extends BaseController { /** - * 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. * * @param subscriptionId The Chargify id of the subscription. * @return Response from the API call @@ -108,7 +110,7 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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. * @@ -148,7 +150,7 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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 * @@ -182,15 +184,14 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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 + * Alternatively, you can change the `automatically_resume_at` to `null` if you would like the * subscription to not have a resume date. * * @param subscriptionId The Chargify id of the subscription. @@ -221,9 +222,9 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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.** @@ -253,9 +254,9 @@ export class SubscriptionStatusController extends BaseController { * 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 + * 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. + * resuming the previous billing period was possible. * * | Canceled | Reactivation | Resumable? | * |---|---|---| @@ -395,6 +396,16 @@ export class SubscriptionStatusController extends BaseController { * + 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. + * * @param subscriptionId The Chargify id of the subscription. * @param body * @return Response from the API call @@ -456,9 +467,8 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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. @@ -481,8 +491,7 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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 The Chargify id of the subscription. * @return Response from the API call @@ -507,9 +516,9 @@ export class SubscriptionStatusController extends BaseController { } /** - * 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. diff --git a/src/controllers/subscriptionsController.ts b/src/controllers/subscriptionsController.ts index 34054afe..6538dd75 100644 --- a/src/controllers/subscriptionsController.ts +++ b/src/controllers/subscriptionsController.ts @@ -87,9 +87,9 @@ import { SubscriptionResponseError } from '../errors/subscriptionResponseError.j export class SubscriptionsController extends BaseController { /** * - * 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, + * 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 @@ -99,6 +99,11 @@ export class SubscriptionsController extends BaseController { * 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 @@ -110,12 +115,19 @@ export class SubscriptionsController extends BaseController { * * 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. + * 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. * * @param body * @return Response from the API call @@ -141,7 +153,7 @@ export class SubscriptionsController extends BaseController { } /** - * returns an array of subscriptions from a Site. Pay close attention to query string filters and + * 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 @@ -356,7 +368,7 @@ export class SubscriptionsController extends BaseController { * * ## Billing Date Changes * - * You can update dates for a subscrption. + * You can update dates for a subscription. * * ### Regular Billing Date Changes * @@ -364,14 +376,14 @@ export class SubscriptionsController extends BaseController { * 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 + * > 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 @@ -379,8 +391,8 @@ export class SubscriptionsController extends BaseController { * * > 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. + * `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 The Chargify id of the subscription. * @param body @@ -439,9 +451,8 @@ export class SubscriptionsController extends BaseController { } /** - * 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 @@ -501,7 +512,7 @@ export class SubscriptionsController extends BaseController { } /** - * Use this endpoint to find a subscription by its reference. + * Finds a subscription by its reference. * * @param reference Subscription reference * @return Response from the API call @@ -521,7 +532,7 @@ export class SubscriptionsController extends BaseController { } /** - * 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 @@ -566,7 +577,7 @@ export class SubscriptionsController extends BaseController { } /** - * Use this endpoint to update a subscription's prepaid configuration. + * Updates a subscription's prepaid configuration. * * @param subscriptionId The Chargify id of the subscription. * @param body @@ -596,8 +607,7 @@ export class SubscriptionsController extends BaseController { } /** - * 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. * @@ -652,6 +662,8 @@ export class SubscriptionsController extends BaseController { } /** + * 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- @@ -698,9 +710,9 @@ export class SubscriptionsController extends BaseController { } /** - * 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 + * 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) * @@ -731,9 +743,8 @@ export class SubscriptionsController extends BaseController { } /** - * 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](#). diff --git a/src/controllers/webhooksController.ts b/src/controllers/webhooksController.ts index b249de9a..a1a4d224 100644 --- a/src/controllers/webhooksController.ts +++ b/src/controllers/webhooksController.ts @@ -43,8 +43,8 @@ import { ErrorListResponseError } from '../errors/errorListResponseError.js'; export class WebhooksController extends BaseController { /** - * 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 status Webhooks with matching status would be returned. * @param sinceDate Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or @@ -106,7 +106,7 @@ export class WebhooksController extends BaseController { } /** - * Allows you to enable webhooks for your site + * Enables webhooks for your site. * * @param body * @return Response from the API call @@ -148,7 +148,7 @@ export class WebhooksController extends BaseController { } /** - * 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. * @@ -196,7 +196,7 @@ export class WebhooksController extends BaseController { * 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 + * If you want to unsubscribe from a specific event, send a list of `webhook_subscriptions` without the * specific event key. * * @param endpointId The Advanced Billing id for the endpoint that should diff --git a/src/index.ts b/src/index.ts index 3387d2e6..107da676 100644 --- a/src/index.ts +++ b/src/index.ts @@ -147,6 +147,8 @@ export type { ChangeInvoiceStatusEvent } from './models/changeInvoiceStatusEvent export type { ChangeInvoiceStatusEventData } from './models/changeInvoiceStatusEventData.js'; export { ChargebackStatus } from './models/chargebackStatus.js'; export type { ChargifyEBB } from './models/chargifyEBB.js'; +export type { ChjsTokenizationFailure } from './models/chjsTokenizationFailure.js'; +export type { ChjsTokenizationSuccess } from './models/chjsTokenizationSuccess.js'; export { CleanupScope } from './models/cleanupScope.js'; export type { CloneComponentPricePoint } from './models/cloneComponentPricePoint.js'; export type { CloneComponentPricePointRequest } from './models/cloneComponentPricePointRequest.js'; @@ -448,6 +450,7 @@ export type { PaymentMethodCreditCard } from './models/paymentMethodCreditCard.j export type { PaymentMethodExternal } from './models/paymentMethodExternal.js'; export type { PaymentMethodPaypal } from './models/paymentMethodPaypal.js'; export type { PaymentProfileAttributes } from './models/paymentProfileAttributes.js'; +export type { PaymentProfileParams } from './models/paymentProfileParams.js'; export type { PaymentProfileResponse } from './models/paymentProfileResponse.js'; export type { PaymentRelatedEvents } from './models/paymentRelatedEvents.js'; export { PaymentType } from './models/paymentType.js'; @@ -627,6 +630,7 @@ export { SubscriptionStateFilter } from './models/subscriptionStateFilter.js'; export type { TaxConfiguration } from './models/taxConfiguration.js'; export { TaxConfigurationKind } from './models/taxConfigurationKind.js'; export { TaxDestinationAddress } from './models/taxDestinationAddress.js'; +export type { TokenizedPaymentProfile } from './models/tokenizedPaymentProfile.js'; export type { TooManyManagementLinkRequests } from './models/tooManyManagementLinkRequests.js'; export { TrialType } from './models/trialType.js'; export type { UpdateAllocationExpirationDate } from './models/updateAllocationExpirationDate.js'; diff --git a/src/models/activateEventBasedComponent.ts b/src/models/activateEventBasedComponent.ts index 24b3abfa..d291fb4b 100644 --- a/src/models/activateEventBasedComponent.ts +++ b/src/models/activateEventBasedComponent.ts @@ -14,7 +14,7 @@ import { export interface ActivateEventBasedComponent { /** The Chargify id of the price point */ pricePointId?: number; - /** 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. */ billingSchedule?: BillingSchedule; /** Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. */ customPrice?: ComponentCustomPrice; diff --git a/src/models/bankAccountPaymentProfile.ts b/src/models/bankAccountPaymentProfile.ts index d183a1bf..99130163 100644 --- a/src/models/bankAccountPaymentProfile.ts +++ b/src/models/bankAccountPaymentProfile.ts @@ -35,7 +35,7 @@ export interface BankAccountPaymentProfile { customerId?: number; /** The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. */ currentVault?: BankAccountVault; - /** 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 */ vaultToken?: string; /** The current billing street address for the bank account */ billingAddress?: string | null; @@ -53,10 +53,10 @@ export interface BankAccountPaymentProfile { billingAddress2?: string | null; /** The bank where the account resides */ bankName?: string; - /** 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 */ - maskedBankRoutingNumber?: string; - /** A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) */ - maskedBankAccountNumber: string; + /** 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 */ + maskedBankRoutingNumber?: string | null; + /** A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') */ + maskedBankAccountNumber?: string | null; /** Defaults to checking */ bankAccountType?: BankAccountType; /** Defaults to personal */ @@ -89,8 +89,14 @@ export const bankAccountPaymentProfileSchema: Schema customerVaultToken: ['customer_vault_token', optional(nullable(string()))], billingAddress2: ['billing_address_2', optional(nullable(string()))], bankName: ['bank_name', optional(string())], - maskedBankRoutingNumber: ['masked_bank_routing_number', optional(string())], - maskedBankAccountNumber: ['masked_bank_account_number', string()], + maskedBankRoutingNumber: [ + 'masked_bank_routing_number', + optional(nullable(string())), + ], + maskedBankAccountNumber: [ + 'masked_bank_account_number', + optional(nullable(string())), + ], bankAccountType: ['bank_account_type', optional(bankAccountTypeSchema)], bankAccountHolderType: [ 'bank_account_holder_type', diff --git a/src/models/billingSchedule.ts b/src/models/billingSchedule.ts index b74a9629..a1cd9fda 100644 --- a/src/models/billingSchedule.ts +++ b/src/models/billingSchedule.ts @@ -4,15 +4,21 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { expandoObject, optional, Schema, string } from '../schema.js'; +import { + expandoObject, + nullable, + optional, + Schema, + string, +} from '../schema.js'; -/** 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. */ export interface BillingSchedule { - /** 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. */ - initialBillingAt?: string; + /** 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. */ + initialBillingAt?: string | null; [key: string]: unknown; } export const billingScheduleSchema: Schema = expandoObject({ - initialBillingAt: ['initial_billing_at', optional(string())], + initialBillingAt: ['initial_billing_at', optional(nullable(string()))], }); diff --git a/src/models/chjsTokenizationFailure.ts b/src/models/chjsTokenizationFailure.ts new file mode 100644 index 00000000..47160f77 --- /dev/null +++ b/src/models/chjsTokenizationFailure.ts @@ -0,0 +1,29 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { expandoObject, lazy, optional, Schema, string } from '../schema.js'; +import { + PaymentProfileParams, + paymentProfileParamsSchema, +} from './paymentProfileParams.js'; + +export interface ChjsTokenizationFailure { + errors: string; + /** PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. */ + paymentProfileParams?: PaymentProfileParams; + [key: string]: unknown; +} + +export const chjsTokenizationFailureSchema: Schema = lazy( + () => + expandoObject({ + errors: ['errors', string()], + paymentProfileParams: [ + 'payment_profile_params', + optional(paymentProfileParamsSchema), + ], + }) +); diff --git a/src/models/chjsTokenizationSuccess.ts b/src/models/chjsTokenizationSuccess.ts new file mode 100644 index 00000000..6e07375e --- /dev/null +++ b/src/models/chjsTokenizationSuccess.ts @@ -0,0 +1,32 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { + expandoObject, + lazy, + nullable, + number, + optional, + Schema, +} from '../schema.js'; +import { + TokenizedPaymentProfile, + tokenizedPaymentProfileSchema, +} from './tokenizedPaymentProfile.js'; + +export interface ChjsTokenizationSuccess { + paymentProfile: TokenizedPaymentProfile; + gatewayCustomerId?: number | null; + [key: string]: unknown; +} + +export const chjsTokenizationSuccessSchema: Schema = lazy( + () => + expandoObject({ + paymentProfile: ['payment_profile', tokenizedPaymentProfileSchema], + gatewayCustomerId: ['gateway_customer_id', optional(nullable(number()))], + }) +); diff --git a/src/models/containers/eventEventSpecificData.ts b/src/models/containers/eventEventSpecificData.ts index 011ffe1e..facc6d72 100644 --- a/src/models/containers/eventEventSpecificData.ts +++ b/src/models/containers/eventEventSpecificData.ts @@ -10,6 +10,14 @@ import { oneOf, Schema, } from '../../schema.js'; +import { + ChjsTokenizationFailure, + chjsTokenizationFailureSchema, +} from '../chjsTokenizationFailure.js'; +import { + ChjsTokenizationSuccess, + chjsTokenizationSuccessSchema, +} from '../chjsTokenizationSuccess.js'; import { ComponentAllocationChange, componentAllocationChangeSchema, @@ -90,7 +98,9 @@ export type EventEventSpecificData = | PrepaymentAccountBalanceChanged | PaymentCollectionMethodChanged | ItemPricePointChanged - | CustomFieldValueChange; + | CustomFieldValueChange + | ChjsTokenizationSuccess + | ChjsTokenizationFailure; export const eventEventSpecificDataSchema: Schema = lazy( () => @@ -113,6 +123,8 @@ export const eventEventSpecificDataSchema: Schema = lazy paymentCollectionMethodChangedSchema, itemPricePointChangedSchema, customFieldValueChangeSchema, + chjsTokenizationSuccessSchema, + chjsTokenizationFailureSchema, ]) ); @@ -321,4 +333,26 @@ export namespace EventEventSpecificData { ): value is CustomFieldValueChange { return isMappedValueValidForSchema(value, customFieldValueChangeSchema); } + + /** + * Validation method to narrow down union type to ChjsTokenizationSuccess type case. + * + * This is Chjs Tokenization Success case. + */ + export function isChjsTokenizationSuccess( + value: unknown + ): value is ChjsTokenizationSuccess { + return isMappedValueValidForSchema(value, chjsTokenizationSuccessSchema); + } + + /** + * Validation method to narrow down union type to ChjsTokenizationFailure type case. + * + * This is Chjs Tokenization Failure case. + */ + export function isChjsTokenizationFailure( + value: unknown + ): value is ChjsTokenizationFailure { + return isMappedValueValidForSchema(value, chjsTokenizationFailureSchema); + } } diff --git a/src/models/createAllocation.ts b/src/models/createAllocation.ts index 0afb9d8a..7279abda 100644 --- a/src/models/createAllocation.ts +++ b/src/models/createAllocation.ts @@ -87,7 +87,7 @@ export interface CreateAllocation { initiateDunning?: boolean; /** Price point that the allocation should be charged at. Accepts either the price point's id (integer) or handle (string). When not specified, the default price point will be used. */ pricePointId?: CreateAllocationPricePointId | null; - /** 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. */ billingSchedule?: BillingSchedule; /** Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. */ customPrice?: ComponentCustomPrice; diff --git a/src/models/createInvoice.ts b/src/models/createInvoice.ts index ac7da9ee..509a1bb8 100644 --- a/src/models/createInvoice.ts +++ b/src/models/createInvoice.ts @@ -32,6 +32,7 @@ import { export interface CreateInvoice { lineItems?: CreateInvoiceItem[]; + /** 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. */ issueDate?: string; /** 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. */ netTerms?: number; diff --git a/src/models/createPaymentProfile.ts b/src/models/createPaymentProfile.ts index 0449c85a..2cc6df96 100644 --- a/src/models/createPaymentProfile.ts +++ b/src/models/createPaymentProfile.ts @@ -31,7 +31,7 @@ import { import { PaymentType, paymentTypeSchema } from './paymentType.js'; export interface CreatePaymentProfile { - /** Token received after sending billing information using chargify.js. */ + /** Token received after sending billing information using Maxio.js (formerly Chargify.js). */ chargifyToken?: string; id?: number; paymentType?: PaymentType; @@ -68,9 +68,9 @@ export interface CreatePaymentProfile { customerVaultToken?: string; /** (Required when creating a new payment profile) The Chargify customer id. */ customerId?: number; - /** used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. */ + /** used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. */ paypalEmail?: string; - /** used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. */ + /** used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. */ paymentMethodNonce?: string; /** 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. */ gatewayHandle?: string; diff --git a/src/models/createSubscription.ts b/src/models/createSubscription.ts index 521dc55f..822018d2 100644 --- a/src/models/createSubscription.ts +++ b/src/models/createSubscription.ts @@ -148,7 +148,7 @@ export interface CreateSubscription { dunningCommunicationDelayEnabled?: boolean; /** Time zone for the Dunning Communication Delay feature. */ dunningCommunicationDelayTimeZone?: string | null; - /** Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests. */ + /** 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. */ skipBillingManifestTaxes?: boolean; [key: string]: unknown; } diff --git a/src/models/createUsage.ts b/src/models/createUsage.ts index c8ece674..f7741346 100644 --- a/src/models/createUsage.ts +++ b/src/models/createUsage.ts @@ -23,7 +23,7 @@ export interface CreateUsage { quantity?: number; pricePointId?: string; memo?: string; - /** 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. */ billingSchedule?: BillingSchedule; /** Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. */ customPrice?: ComponentCustomPrice; diff --git a/src/models/creditCardPaymentProfile.ts b/src/models/creditCardPaymentProfile.ts index e7953094..361ed469 100644 --- a/src/models/creditCardPaymentProfile.ts +++ b/src/models/creditCardPaymentProfile.ts @@ -54,7 +54,7 @@ export interface CreditCardPaymentProfile { billingAddress2?: string | null; paymentType: PaymentType; disabled?: boolean; - /** 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) */ + /** 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) */ chargifyToken?: string; siteGatewaySettingId?: number | null; /** An identifier of connected gateway. */ diff --git a/src/models/creditNoteLineItem.ts b/src/models/creditNoteLineItem.ts index ca2d765e..02e2dc58 100644 --- a/src/models/creditNoteLineItem.ts +++ b/src/models/creditNoteLineItem.ts @@ -46,6 +46,12 @@ export interface CreditNoteLineItem { * 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. */ taxAmount?: string; + /** + * 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`. + */ + taxIncluded?: boolean; /** * 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`. @@ -70,6 +76,8 @@ export interface CreditNoteLineItem { pricePointId?: number | null; billingScheduleItemId?: number | null; customItem?: boolean; + /** The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. */ + prepaidAllocationExpiresAt?: string | null; [key: string]: unknown; } @@ -83,6 +91,7 @@ export const creditNoteLineItemSchema: Schema = expandoObjec subtotalAmount: ['subtotal_amount', optional(string())], discountAmount: ['discount_amount', optional(string())], taxAmount: ['tax_amount', optional(string())], + taxIncluded: ['tax_included', optional(boolean())], totalAmount: ['total_amount', optional(string())], tieredUnitPrice: ['tiered_unit_price', optional(boolean())], periodRangeStart: ['period_range_start', optional(string())], @@ -96,5 +105,9 @@ export const creditNoteLineItemSchema: Schema = expandoObjec optional(nullable(number())), ], customItem: ['custom_item', optional(boolean())], + prepaidAllocationExpiresAt: [ + 'prepaid_allocation_expires_at', + optional(nullable(string())), + ], } ); diff --git a/src/models/customer.ts b/src/models/customer.ts index 11afa171..4c9eee54 100644 --- a/src/models/customer.ts +++ b/src/models/customer.ts @@ -74,6 +74,8 @@ export interface Customer { taxExemptReason?: string | null; /** The default auto-renewal profile ID for the customer */ defaultAutoRenewalProfileId?: number | null; + /** The Maxio-generated unique identifier for the customer. */ + maxioid?: string | null; [key: string]: unknown; } @@ -123,4 +125,5 @@ export const customerSchema: Schema = expandoObject({ 'default_auto_renewal_profile_id', optional(nullable(number())), ], + maxioid: ['maxioid', optional(nullable(string()))], }); diff --git a/src/models/event.ts b/src/models/event.ts index bc9beff7..21b0e060 100644 --- a/src/models/event.ts +++ b/src/models/event.ts @@ -46,6 +46,8 @@ export interface Event { * * `subscription_service_credit_account_balance_changed` - CreditAccountBalanceChanged * * `item_price_point_changed` - ItemPricePointChanged * * `custom_field_value_change` - 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`, diff --git a/src/models/eventKey.ts b/src/models/eventKey.ts index 10e5e69e..d6bf0601 100644 --- a/src/models/eventKey.ts +++ b/src/models/eventKey.ts @@ -43,6 +43,7 @@ export enum EventKey { TrialEndNotice = 'trial_end_notice', DunningStepReached = 'dunning_step_reached', InvoiceIssued = 'invoice_issued', + InvoicePending = 'invoice_pending', PrepaidSubscriptionBalanceChanged = 'prepaid_subscription_balance_changed', SubscriptionGroupSignupSuccess = 'subscription_group_signup_success', SubscriptionGroupSignupFailure = 'subscription_group_signup_failure', @@ -86,6 +87,8 @@ export enum EventKey { ChargebackWon = 'chargeback_won', PaymentCollectionMethodChanged = 'payment_collection_method_changed', ComponentBillingDateChanged = 'component_billing_date_changed', + ChjsTokenizationFailure = 'chjs_tokenization_failure', + ChjsTokenizationSuccess = 'chjs_tokenization_success', SubscriptionTermRenewalScheduled = 'subscription_term_renewal_scheduled', SubscriptionTermRenewalPending = 'subscription_term_renewal_pending', SubscriptionTermRenewalActivated = 'subscription_term_renewal_activated', diff --git a/src/models/invoiceLineItem.ts b/src/models/invoiceLineItem.ts index c3a52d3f..5f61ac25 100644 --- a/src/models/invoiceLineItem.ts +++ b/src/models/invoiceLineItem.ts @@ -51,6 +51,12 @@ export interface InvoiceLineItem { * 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. */ taxAmount?: string; + /** + * 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`. + */ + taxIncluded?: boolean; /** * 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`. @@ -91,6 +97,8 @@ export interface InvoiceLineItem { productPricePointId?: number | null; customItem?: boolean; kind?: string; + /** The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. */ + prepaidAllocationExpiresAt?: string | null; [key: string]: unknown; } @@ -104,6 +112,7 @@ export const invoiceLineItemSchema: Schema = lazy(() => subtotalAmount: ['subtotal_amount', optional(string())], discountAmount: ['discount_amount', optional(string())], taxAmount: ['tax_amount', optional(string())], + taxIncluded: ['tax_included', optional(boolean())], totalAmount: ['total_amount', optional(string())], tieredUnitPrice: ['tiered_unit_price', optional(boolean())], periodRangeStart: ['period_range_start', optional(string())], @@ -128,5 +137,9 @@ export const invoiceLineItemSchema: Schema = lazy(() => ], customItem: ['custom_item', optional(boolean())], kind: ['kind', optional(string())], + prepaidAllocationExpiresAt: [ + 'prepaid_allocation_expires_at', + optional(nullable(string())), + ], }) ); diff --git a/src/models/paymentProfileAttributes.ts b/src/models/paymentProfileAttributes.ts index a1df2bbf..f585ef09 100644 --- a/src/models/paymentProfileAttributes.ts +++ b/src/models/paymentProfileAttributes.ts @@ -27,7 +27,7 @@ import { PaymentType, paymentTypeSchema } from './paymentType.js'; /** alias to credit_card_attributes */ export interface PaymentProfileAttributes { - /** (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) */ chargifyToken?: string; id?: number; paymentType?: PaymentType; diff --git a/src/models/paymentProfileParams.ts b/src/models/paymentProfileParams.ts new file mode 100644 index 00000000..624b83de --- /dev/null +++ b/src/models/paymentProfileParams.ts @@ -0,0 +1,23 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { expandoObject, optional, Schema, string } from '../schema.js'; + +/** PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. */ +export interface PaymentProfileParams { + firstName?: string; + lastName?: string; + cardType?: string; + [key: string]: unknown; +} + +export const paymentProfileParamsSchema: Schema = expandoObject( + { + firstName: ['first_name', optional(string())], + lastName: ['last_name', optional(string())], + cardType: ['card_type', optional(string())], + } +); diff --git a/src/models/site.ts b/src/models/site.ts index 5fd3cfc7..106f1f0b 100644 --- a/src/models/site.ts +++ b/src/models/site.ts @@ -45,6 +45,12 @@ export interface Site { organizationAddress?: OrganizationAddress; taxConfiguration?: TaxConfiguration; netTerms?: NetTerms; + /** Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. */ + multiFrequencyEnabled?: boolean; + /** Whether the auto-renewals feature is enabled for this site. */ + autoRenewalsEnabled?: boolean; + /** Whether the Billing Portal is enabled for this site. */ + portalEnabled?: boolean; test?: boolean; [key: string]: unknown; } @@ -85,6 +91,9 @@ export const siteSchema: Schema = lazy(() => ], taxConfiguration: ['tax_configuration', optional(taxConfigurationSchema)], netTerms: ['net_terms', optional(netTermsSchema)], + multiFrequencyEnabled: ['multi_frequency_enabled', optional(boolean())], + autoRenewalsEnabled: ['auto_renewals_enabled', optional(boolean())], + portalEnabled: ['portal_enabled', optional(boolean())], test: ['test', optional(boolean())], }) ); diff --git a/src/models/tokenizedPaymentProfile.ts b/src/models/tokenizedPaymentProfile.ts new file mode 100644 index 00000000..2378ccad --- /dev/null +++ b/src/models/tokenizedPaymentProfile.ts @@ -0,0 +1,31 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { + expandoObject, + nullable, + number, + optional, + Schema, + string, +} from '../schema.js'; + +export interface TokenizedPaymentProfile { + id: number; + vaultToken?: string; + gatewayHandle?: string | null; + customerVaultToken?: string | null; + [key: string]: unknown; +} + +export const tokenizedPaymentProfileSchema: Schema = expandoObject( + { + id: ['id', number()], + vaultToken: ['vault_token', optional(string())], + gatewayHandle: ['gateway_handle', optional(nullable(string()))], + customerVaultToken: ['customer_vault_token', optional(nullable(string()))], + } +); diff --git a/src/models/webhookSubscription.ts b/src/models/webhookSubscription.ts index a5942a6a..41a7d89c 100644 --- a/src/models/webhookSubscription.ts +++ b/src/models/webhookSubscription.ts @@ -12,12 +12,15 @@ import { Schema, stringEnum } from '../schema.js'; export enum WebhookSubscription { BillingDateChange = 'billing_date_change', ComponentAllocationChange = 'component_allocation_change', + ChjsTokenizationFailure = 'chjs_tokenization_failure', + ChjsTokenizationSuccess = 'chjs_tokenization_success', CustomerCreate = 'customer_create', CustomerUpdate = 'customer_update', DunningStepReached = 'dunning_step_reached', ExpiringCard = 'expiring_card', ExpirationDateChange = 'expiration_date_change', InvoiceIssued = 'invoice_issued', + InvoicePending = 'invoice_pending', MeteredUsage = 'metered_usage', PaymentFailure = 'payment_failure', PaymentSuccess = 'payment_success',