From 7cd2bc9e5be2827e29ff10b0199a8aba0c4bffaf Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Thu, 17 Jul 2025 11:10:12 +0000 Subject: [PATCH 1/2] Automated commit message --- README.md | 143 ++++++++---------- doc/api-error.md | 10 +- doc/api-response.md | 29 +++- doc/client.md | 33 +--- doc/controllers/advance-invoice.md | 6 +- doc/controllers/api-exports.md | 30 ++-- doc/controllers/billing-portal.md | 8 +- doc/controllers/component-price-points.md | 30 ++-- doc/controllers/components.md | 44 +++--- doc/controllers/coupons.md | 40 ++--- doc/controllers/custom-fields.md | 34 ++--- doc/controllers/customers.md | 18 +-- .../events-based-billing-segments.md | 16 +- doc/controllers/events.md | 24 +-- doc/controllers/insights.md | 18 +-- doc/controllers/invoices.md | 133 ++++++---------- doc/controllers/offers.md | 14 +- doc/controllers/payment-profiles.md | 36 +++-- doc/controllers/product-families.md | 12 +- doc/controllers/product-price-points.md | 30 ++-- doc/controllers/products.md | 16 +- doc/controllers/proforma-invoices.md | 48 +++--- doc/controllers/reason-codes.md | 20 +-- doc/controllers/referral-codes.md | 2 +- doc/controllers/sales-commissions.md | 24 +-- doc/controllers/sites.md | 12 +- doc/controllers/subscription-components.md | 46 +++--- .../subscription-group-invoice-account.md | 12 +- doc/controllers/subscription-group-status.md | 8 +- doc/controllers/subscription-groups.md | 22 +-- .../subscription-invoice-account.md | 107 ++++++++++++- doc/controllers/subscription-notes.md | 14 +- doc/controllers/subscription-products.md | 4 +- doc/controllers/subscription-status.md | 22 +-- doc/controllers/subscriptions.md | 80 +++------- doc/controllers/webhooks.md | 16 +- doc/http-client-options.md | 14 ++ doc/http-request.md | 54 +++++++ doc/models/apple-pay-payment-profile.md | 2 + doc/models/bank-account-payment-profile.md | 4 +- doc/models/chargify-ebb.md | 2 +- doc/models/component.md | 1 + doc/models/coupon-request.md | 4 +- doc/models/create-component-price-point.md | 2 +- doc/models/create-or-update-product.md | 2 +- ...ate-prepaid-usage-component-price-point.md | 2 +- doc/models/create-product-price-point.md | 2 +- doc/models/create-subscription-request.md | 1 + doc/models/create-subscription.md | 12 +- doc/models/credit-card-payment-profile.md | 2 + doc/models/ebb-component.md | 2 +- doc/models/group-billing.md | 6 +- doc/models/issue-invoice-request.md | 2 +- doc/models/list-components-filter.md | 2 +- doc/models/list-coupons-filter.md | 2 +- doc/models/list-mrr-filter.md | 2 +- doc/models/list-products-filter.md | 2 +- doc/models/list-service-credits-response.md | 36 +++++ .../list-subscription-components-filter.md | 2 +- ...subscription-components-for-site-filter.md | 2 +- doc/models/metered-component.md | 2 +- doc/models/on-off-component.md | 2 +- doc/models/override-subscription.md | 2 +- doc/models/paypal-payment-profile.md | 2 + .../prepaid-product-price-point-filter.md | 2 +- doc/models/prepaid-usage-component.md | 2 +- doc/models/quantity-based-component.md | 2 +- doc/models/reactivation-billing.md | 2 +- doc/models/service-credit-1.md | 32 ++++ doc/models/subscription-filter.md | 2 +- doc/models/subscription-group-credit-card.md | 15 +- .../subscription-migration-preview-options.md | 8 +- doc/models/subscription-product-migration.md | 8 +- doc/models/tax-configuration.md | 2 +- doc/models/update-subscription-request.md | 1 + doc/models/update-subscription.md | 4 + doc/retry-configuration.md | 17 +++ package.json | 9 +- src/client.ts | 2 +- src/controllers/couponsController.ts | 7 +- src/controllers/customFieldsController.ts | 2 +- src/controllers/insightsController.ts | 2 +- src/controllers/invoicesController.ts | 63 ++------ src/controllers/paymentProfilesController.ts | 2 + src/controllers/productFamiliesController.ts | 2 +- src/controllers/reasonCodesController.ts | 6 +- .../subscriptionInvoiceAccountController.ts | 56 +++++++ src/controllers/subscriptionsController.ts | 51 ++----- src/index.ts | 2 + src/models/applePayPaymentProfile.ts | 6 + src/models/bankAccountPaymentProfile.ts | 6 + src/models/component.ts | 3 + src/models/couponRequest.ts | 4 +- src/models/createSubscription.ts | 9 +- src/models/creditCardPaymentProfile.ts | 6 + src/models/listServiceCreditsResponse.ts | 22 +++ src/models/metafield.ts | 5 +- src/models/overrideSubscription.ts | 2 +- src/models/paypalPaymentProfile.ts | 6 + src/models/serviceCredit1.ts | 49 ++++++ src/models/subscriptionGroupCreditCard.ts | 30 ++-- src/models/updateSubscription.ts | 9 ++ src/models/usage.ts | 5 +- tsconfig.base.json | 1 + 104 files changed, 1040 insertions(+), 755 deletions(-) create mode 100644 doc/http-client-options.md create mode 100644 doc/http-request.md create mode 100644 doc/models/list-service-credits-response.md create mode 100644 doc/models/service-credit-1.md create mode 100644 doc/retry-configuration.md create mode 100644 src/models/listServiceCreditsResponse.ts create mode 100644 src/models/serviceCredit1.ts diff --git a/README.md b/README.md index f29946f2..dab171e5 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,21 @@ ## Introduction Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST. -One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries). -The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for Merchants who require it. +One of the many reasons to use Advanced Billing is the immense feature set and [client libraries](page:development-tools/client-libraries). +The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for merchants who require it. ### Steps to make your first Maxio Advanced Billing API call 1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio.zendesk.com/hc/en-us/articles/24250712113165-Testing-Overview) account. -2. [Setup and configure authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. -3. Submit your API request and try it out. -4. Verify results through response. -5. Test our integrations. +2. [Setup authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. +3. [Submit an API request and verify the response](page:development-tools/client-libraries#make-your-first-maxio-advanced-billing-api-request). +4. Test the Advanced Billing [integrations](https://www.maxio.com/integrations). -We strongly suggest exploring the developer portal, our [integrations](https://www.maxio.com/integrations) and the API guide, as well as the entire set of application-based documentation to aid in your discovery of the product. +Next, you can explore [authentication methods](page:introduction/authentication), [basic concepts](page:introduction/basic-concepts/connected-sites) for interacting with Advanced Billing via the API, and the entire set of [application-based documentation](https://docs.maxio.com/hc/en-us) to aid in your discovery of the product. -#### Example +#### Request Example -The following example uses the curl command-line tool to execute API requests. +The following example uses the curl command-line tool to make an API request. **Request** @@ -30,46 +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@6.1.0 +npm install @maxio-com/advanced-billing-sdk@7.0.0 ``` -For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@6.1.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/6.1.0). +For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@7.0.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/7.0.0). ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.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` | The API environment.
**Default: `Environment.US`** | -| `timeout` | `number` | Timeout for API calls.
*Default*: `120000` | -| `httpClientOptions` | `Partial` | Stable configurable http client options. | -| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. | -| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/auth/basic-authentication.md) | The credential object for basicAuth | - -### HttpClientOptions - -| Parameter | Type | Description | -| --- | --- | --- | -| `timeout` | `number` | Timeout in milliseconds. | -| `httpAgent` | `any` | Custom http agent to be used when performing http requests. | -| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. | -| `retryConfig` | `Partial` | Configurations to retry requests. | - -### RetryConfiguration - -| Parameter | Type | Description | -| --- | --- | --- | -| `maxNumberOfRetries` | `number` | Maximum number of retries.
*Default*: `0` | -| `retryOnTimeout` | `boolean` | Whether to retry on request timeout.
*Default*: `true` | -| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure.
*Default*: `1` | -| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried.
*Default*: `0` | -| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure.
*Default*: `2` | -| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against.
*Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` | -| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against.
*Default*: `['GET', 'PUT']` | +| site | `string` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | +| environment | `Environment` | 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/7.0.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/7.0.0/doc/auth/basic-authentication.md) | The credential object for basicAuth | The API client can be initialized as follows: @@ -100,45 +78,56 @@ 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/6.1.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/controllers/webhooks.md) - -## Classes Documentation - -* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/api-response.md) -* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.1.0/doc/api-error.md) +* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/webhooks.md) + +## SDK Infrastructure + +### Configuration + +* [HttpClientOptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/http-client-options.md) +* [RetryConfiguration](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/retry-configuration.md) + +### HTTP + +* [HttpRequest](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/http-request.md) + +### Utilities + +* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/api-response.md) +* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/api-error.md) diff --git a/doc/api-error.md b/doc/api-error.md index 9d092411..fbd25023 100644 --- a/doc/api-error.md +++ b/doc/api-error.md @@ -9,9 +9,9 @@ The ApiError extends the ApiResponse interface, so all ApiResponse properties ar | Name | Type | Description | | --- | --- | --- | -| request | HttpRequest | Original request that resulted in this response. | -| statusCode | number | Response status code. | -| headers | Record | Response headers. | -| result | T | Response data. | -| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. | +| request | [`HttpRequest`](../doc/http-request.md) | Original request that resulted in this response. | +| statusCode | `number` | Response status code. | +| headers | `Record` | Response headers. | +| result | `T` | Response data. | +| body | `string \| Blob \| NodeJS.ReadableStream` | Original body from the response. | diff --git a/doc/api-response.md b/doc/api-response.md index 1e886c9e..068f0705 100644 --- a/doc/api-response.md +++ b/doc/api-response.md @@ -1,15 +1,32 @@ # ApiResponse -An interface for the result of an API call. +Represents the result of an API call, including response metadata and the returned data of type `T`. ## Properties | Name | Type | Description | | --- | --- | --- | -| request | HttpRequest | Original request that resulted in this response. | -| statusCode | number | Response status codee. | -| headers | Record | Response headers. | -| result | T | Response data. | -| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. | +| request | [`HttpRequest`](../doc/http-request.md) | Original request that resulted in this response. | +| statusCode | `number` | Response status codee. | +| headers | `Record` | Response headers. | +| result | `T` | Response data. | +| body | `string \| Blob \| NodeJS.ReadableStream` | Original body from the response. | + +## Usage Example + +```ts +try { + const exampleController = new ExampleController(client); + const response = exampleController.getExampleType(body); + console.log('Success! Result:', response.result); + console.log('Status Code:', response.statusCode); +} catch (error) { + if (error instanceof ApiError) { + console.log('Error:', error.message); + console.log('Result:', error.body); + console.log('Status Code:', error.statusCode); + } +} +``` diff --git a/doc/client.md b/doc/client.md index 65458e9c..6cbba4e5 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,33 +5,12 @@ 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` | The API environment.
**Default: `Environment.US`** | -| `timeout` | `number` | Timeout for API calls.
*Default*: `120000` | -| `httpClientOptions` | `Partial` | Stable configurable http client options. | -| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. | -| `basicAuthCredentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for basicAuth | - -## HttpClientOptions - -| Parameter | Type | Description | -| --- | --- | --- | -| `timeout` | `number` | Timeout in milliseconds. | -| `httpAgent` | `any` | Custom http agent to be used when performing http requests. | -| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. | -| `retryConfig` | `Partial` | Configurations to retry requests. | - -## RetryConfiguration - -| Parameter | Type | Description | -| --- | --- | --- | -| `maxNumberOfRetries` | `number` | Maximum number of retries.
*Default*: `0` | -| `retryOnTimeout` | `boolean` | Whether to retry on request timeout.
*Default*: `true` | -| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure.
*Default*: `1` | -| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried.
*Default*: `0` | -| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure.
*Default*: `2` | -| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against.
*Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` | -| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against.
*Default*: `['GET', 'PUT']` | +| site | `string` | The subdomain for your Advanced Billing site.
*Default*: `'subdomain'` | +| environment | `Environment` | The API environment.
**Default: `Environment.US`** | +| timeout | `number` | Timeout for API calls.
*Default*: `120000` | +| httpClientOptions | [`Partial`](../doc/http-client-options.md) | Stable configurable http client options. | +| unstableHttpClientOptions | `any` | Unstable configurable http client options. | +| basicAuthCredentials | [`BasicAuthCredentials`](auth/basic-authentication.md) | The credential object for basicAuth | The API client can be initialized as follows: diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 520a9ebc..a3fc677c 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -40,7 +40,7 @@ async issueAdvanceInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -94,7 +94,7 @@ async readAdvanceInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -143,7 +143,7 @@ async voidAdvanceInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 41d3897f..38a2a0eb 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -41,13 +41,13 @@ async listExportedProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ProformaInvoice[]`](../../doc/models/proforma-invoice.md) +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,13 +97,13 @@ async listExportedInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`Invoice[]`](../../doc/models/invoice.md) +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 @@ -153,13 +153,13 @@ async listExportedSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batchId` | `string` | Template, Required | Id of a Batch Job. | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.
**Default**: `100`
**Constraints**: `>= 1`, `<= 10000` | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`Subscription[]`](../../doc/models/subscription.md) +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 @@ -209,7 +209,7 @@ async exportProformaInvoices( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 @@ -252,7 +252,7 @@ async exportInvoices( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 @@ -295,7 +295,7 @@ async exportSubscriptions( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 @@ -339,7 +339,7 @@ async readProformaInvoicesExport( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 @@ -385,7 +385,7 @@ async readInvoicesExport( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 @@ -431,7 +431,7 @@ async readSubscriptionsExport( ## Response Type -[`BatchJobResponse`](../../doc/models/batch-job-response.md) +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 37146027..1aececb3 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -52,7 +52,7 @@ async enableBillingPortalForCustomer( ## Response Type -[`CustomerResponse`](../../doc/models/customer-response.md) +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 @@ -106,7 +106,7 @@ async readBillingPortalLink( ## Response Type -[`PortalManagementLink`](../../doc/models/portal-management-link.md) +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 @@ -178,7 +178,7 @@ async resendBillingPortalInvitation( ## Response Type -[`ResentInvitation`](../../doc/models/resent-invitation.md) +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 @@ -242,7 +242,7 @@ async revokeBillingPortalAccess( ## Response Type -[`RevokedInvitation`](../../doc/models/revoked-invitation.md) +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 f1d87a61..d909f689 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -49,7 +49,7 @@ async promoteComponentPricePointToDefault( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -129,7 +129,7 @@ async createComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +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 @@ -205,14 +205,14 @@ async listComponentPricePoints( | --- | --- | --- | --- | | `componentId` | `number` | Template, Required | The Advanced Billing id of the component | | `currencyPrices` | `boolean \| undefined` | Query, Optional | Include an array of currency price data | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filterType` | [`PricePointType[] \| undefined`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) +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 @@ -307,7 +307,7 @@ async bulkCreateComponentPricePoints( ## Response Type -[`ComponentPricePointsResponse`](../../doc/models/component-price-points-response.md) +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 @@ -453,7 +453,7 @@ async updateComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +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 @@ -530,7 +530,7 @@ async readComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +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 @@ -577,7 +577,7 @@ async archiveComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +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 @@ -664,7 +664,7 @@ async unarchiveComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +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 @@ -749,7 +749,7 @@ async createCurrencyPrices( ## Response Type -[`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) +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 @@ -834,7 +834,7 @@ async updateCurrencyPrices( ## Response Type -[`ComponentCurrencyPricesResponse`](../../doc/models/component-currency-prices-response.md) +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 @@ -913,15 +913,15 @@ async listAllComponentPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `include` | [`ListComponentsPricePointsInclude \| undefined`](../../doc/models/list-components-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListPricePointsFilter \| undefined`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListComponentsPricePointsResponse`](../../doc/models/list-components-price-points-response.md) +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 f1e32824..76cce4f2 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -52,7 +52,7 @@ async createMeteredComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -183,7 +183,7 @@ async createQuantityBasedComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -305,7 +305,7 @@ async createOnOffComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -412,7 +412,7 @@ async createPrepaidUsageComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -559,7 +559,7 @@ async createEventBasedComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -666,7 +666,7 @@ async findComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -735,12 +735,12 @@ async readComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -789,7 +789,8 @@ try { "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", - "product_family_name": "Chargify" + "product_family_name": "Chargify", + "product_family_handle": "chargify" } } ``` @@ -815,13 +816,13 @@ async updateProductFamilyComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `body` | [`UpdateComponentRequest \| undefined`](../../doc/models/update-component-request.md) | Body, Optional | - | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -906,12 +907,12 @@ async archiveComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `string` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`Component`](../../doc/models/component.md) +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 @@ -997,14 +998,14 @@ async listComponents( | `startDatetime` | `string \| undefined` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | | `includeArchived` | `boolean \| undefined` | Query, Optional | Include archived items | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListComponentsFilter \| undefined`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ComponentResponse[]`](../../doc/models/component-response.md) +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 @@ -1072,6 +1073,7 @@ try { "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -1098,6 +1100,7 @@ try { "created_at": "2019-08-01T09:35:37-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -1124,6 +1127,7 @@ try { "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } } @@ -1155,7 +1159,7 @@ async updateComponent( ## Response Type -[`ComponentResponse`](../../doc/models/component-response.md) +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 @@ -1246,8 +1250,8 @@ async listComponentsForProductFamily( | --- | --- | --- | --- | | `productFamilyId` | `number` | Template, Required | The Advanced Billing id of the product family | | `includeArchived` | `boolean \| undefined` | Query, Optional | Include archived items. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListComponentsFilter \| undefined`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | | `dateField` | [`BasicDateField \| undefined`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | @@ -1258,7 +1262,7 @@ async listComponentsForProductFamily( ## Response Type -[`ComponentResponse[]`](../../doc/models/component-response.md) +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 9ee06eeb..46de50d1 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -61,7 +61,7 @@ async createCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -136,15 +136,15 @@ async listCouponsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListCouponsFilter \| undefined`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `boolean \| undefined` | Query, Optional | When fetching coupons, 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. Use in query `currency_prices=true`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`CouponResponse[]`](../../doc/models/coupon-response.md) +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 @@ -301,7 +301,7 @@ async findCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -354,7 +354,7 @@ async readCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -440,7 +440,7 @@ async updateCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -547,7 +547,7 @@ async archiveCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -621,15 +621,15 @@ async listCoupons( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListCouponsFilter \| undefined`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `boolean \| undefined` | Query, Optional | When fetching coupons, 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. Use in query `currency_prices=true`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`CouponResponse[]`](../../doc/models/coupon-response.md) +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 @@ -738,7 +738,7 @@ async readCouponUsage( ## Response Type -[`CouponUsage[]`](../../doc/models/coupon-usage.md) +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 @@ -839,7 +839,7 @@ async validateCoupon( ## Response Type -[`CouponResponse`](../../doc/models/coupon-response.md) +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 @@ -918,7 +918,7 @@ async createOrUpdateCouponCurrencyPrices( ## Response Type -[`CouponCurrencyResponse`](../../doc/models/coupon-currency-response.md) +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 @@ -1021,7 +1021,7 @@ async createCouponSubcodes( ## Response Type -[`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) +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 @@ -1082,13 +1082,13 @@ async listCouponSubcodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `couponId` | `number` | Template, Required | The Advanced Billing id of the coupon | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`CouponSubcodes`](../../doc/models/coupon-subcodes.md) +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 @@ -1173,7 +1173,7 @@ async updateCouponSubcodes( ## Response Type -[`CouponSubcodesResponse`](../../doc/models/coupon-subcodes-response.md) +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 @@ -1247,7 +1247,7 @@ async deleteCouponSubcode( ## Response Type -`void` +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 cee5fb2b..6a6c3ce4 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -42,7 +42,7 @@ Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource ### Metafields "On-the-Fly" -It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existant name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. +It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. ### Metafield Scope Warning @@ -66,7 +66,7 @@ async createMetafields( ## Response Type -[`Metafield[]`](../../doc/models/metafield.md) +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 @@ -162,14 +162,14 @@ async listMetafields( | --- | --- | --- | --- | | `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `name` | `string \| undefined` | Query, Optional | filter by the name of the metafield | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListMetafieldsResponse`](../../doc/models/list-metafields-response.md) +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 @@ -243,7 +243,7 @@ async updateMetafield( ## Response Type -[`Metafield[]`](../../doc/models/metafield.md) +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 @@ -293,7 +293,7 @@ async deleteMetafield( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -364,7 +364,7 @@ async createMetadata( ## Response Type -[`Metadata[]`](../../doc/models/metadata.md) +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 @@ -433,13 +433,13 @@ async listMetadata( | --- | --- | --- | --- | | `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | | `resourceId` | `number` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`PaginatedMetadata`](../../doc/models/paginated-metadata.md) +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 @@ -488,7 +488,7 @@ async updateMetadata( ## Response Type -[`Metadata[]`](../../doc/models/metadata.md) +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 @@ -567,7 +567,7 @@ async deleteMetadata( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -636,21 +636,21 @@ async listMetadataForResourceType( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `dateField` | [`BasicDateField \| undefined`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `startDatetime` | `string \| undefined` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `withDeleted` | `boolean \| undefined` | Query, Optional | Allow to fetch deleted metadata. | -| `resourceIds` | `number[] \| undefined` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.
**Constraints**: *Maximum Items*: `50` | +| `resourceIds` | `number[] \| undefined` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.

**Constraints**: *Maximum Items*: `50` | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`PaginatedMetadata`](../../doc/models/paginated-metadata.md) +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 c686bd71..ed131aea 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -62,7 +62,7 @@ async createCustomer( ## Response Type -[`CustomerResponse`](../../doc/models/customer-response.md) +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 @@ -178,8 +178,8 @@ async listCustomers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Direction to sort customers by time of creation | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `50`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `50`

**Constraints**: `<= 200` | | `dateField` | [`BasicDateField \| undefined`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | @@ -190,7 +190,7 @@ async listCustomers( ## Response Type -[`CustomerResponse[]`](../../doc/models/customer-response.md) +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 @@ -318,7 +318,7 @@ async readCustomer( ## Response Type -[`CustomerResponse`](../../doc/models/customer-response.md) +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 @@ -360,7 +360,7 @@ async updateCustomer( ## Response Type -[`CustomerResponse`](../../doc/models/customer-response.md) +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 @@ -449,7 +449,7 @@ async deleteCustomer( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -489,7 +489,7 @@ async readCustomerByReference( ## Response Type -[`CustomerResponse`](../../doc/models/customer-response.md) +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 @@ -529,7 +529,7 @@ async listCustomerSubscriptions( ## Response Type -[`SubscriptionResponse[]`](../../doc/models/subscription-response.md) +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 c65df282..5d4953f9 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -44,7 +44,7 @@ async createSegment( ## Response Type -[`SegmentResponse`](../../doc/models/segment-response.md) +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 @@ -121,14 +121,14 @@ async listSegmentsForPricePoint( | --- | --- | --- | --- | | `componentId` | `string` | Template, Required | ID or Handle for the Component | | `pricePointId` | `string` | Template, Required | ID or Handle for the Price Point belonging to the Component | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `30`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`ListSegmentsFilter \| undefined`](../../doc/models/list-segments-filter.md) | Query, Optional | Filter to use for List Segments for a Price Point operation | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListSegmentsResponse`](../../doc/models/list-segments-response.md) +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 @@ -191,7 +191,7 @@ async updateSegment( ## Response Type -[`SegmentResponse`](../../doc/models/segment-response.md) +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 @@ -252,7 +252,7 @@ async deleteSegment( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -315,7 +315,7 @@ async bulkCreateSegments( ## Response Type -[`ListSegmentsResponse`](../../doc/models/list-segments-response.md) +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 @@ -375,7 +375,7 @@ async bulkUpdateSegments( ## Response Type -[`ListSegmentsResponse`](../../doc/models/list-segments-response.md) +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 45bdea81..23bc0552 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -107,11 +107,11 @@ async listEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sinceId` | `bigint \| undefined` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `bigint \| undefined` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `Direction.Desc` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.Desc` | | `filter` | [`EventKey[] \| undefined`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `dateField` | [`ListEventsDateField \| undefined`](../../doc/models/list-events-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -122,7 +122,7 @@ async listEvents( ## Response Type -[`EventResponse[]`](../../doc/models/event-response.md) +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 @@ -245,17 +245,17 @@ async listSubscriptionEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sinceId` | `bigint \| undefined` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `bigint \| undefined` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `Direction.Desc` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.Desc` | | `filter` | [`EventKey[] \| undefined`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`EventResponse[]`](../../doc/models/event-response.md) +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 @@ -347,17 +347,17 @@ async readEventsCount( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sinceId` | `bigint \| undefined` | Query, Optional | Returns events with an id greater than or equal to the one specified | | `maxId` | `bigint \| undefined` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.
**Default**: `Direction.Desc` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.Desc` | | `filter` | [`EventKey[] \| undefined`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`CountResponse`](../../doc/models/count-response.md) +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 104b98f7..b165bb05 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -22,7 +22,7 @@ The Stats API is a very basic view of some Site-level stats. This API call only ## Stats Documentation -There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats reposnse. +There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats response. ``` https://subdomain.chargify.com/dashboard @@ -42,7 +42,7 @@ async readSiteStats( ## Response Type -[`SiteSummary`](../../doc/models/site-summary.md) +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 @@ -103,7 +103,7 @@ async readMrr( ## Response Type -[`MRRResponse`](../../doc/models/mrr-response.md) +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 @@ -185,14 +185,14 @@ async listMrrMovements( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number \| undefined` | Query, Optional | optionally filter results by subscription | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.
**Default**: `10`
**Constraints**: `<= 50` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.

**Default**: `10`

**Constraints**: `<= 50` | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListMRRResponse`](../../doc/models/list-mrr-response.md) +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 @@ -290,14 +290,14 @@ async listMrrPerSubscription( | --- | --- | --- | --- | | `filter` | [`ListMrrFilter \| undefined`](../../doc/models/list-mrr-filter.md) | Query, Optional | Filter to use for List MRR per subscription operation | | `atTime` | `string \| undefined` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SubscriptionMRRResponse`](../../doc/models/subscription-mrr-response.md) +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 0c65ba62..b473d3f7 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -57,7 +57,7 @@ async refundInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -108,6 +108,7 @@ async listInvoices( status?: InvoiceStatus, subscriptionId?: number, subscriptionGroupUid?: string, + consolidationLevel?: string, page?: number, perPage?: number, direction?: Direction, @@ -138,28 +139,29 @@ async listInvoices( | `status` | [`InvoiceStatus \| undefined`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | | `subscriptionId` | `number \| undefined` | Query, Optional | The subscription's ID. | | `subscriptionGroupUid` | `string \| undefined` | Query, Optional | The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `Direction.Desc` | -| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data
**Default**: `false` | -| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data
**Default**: `false` | -| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data
**Default**: `false` | -| `credits` | `boolean \| undefined` | Query, Optional | Include credits data
**Default**: `false` | -| `payments` | `boolean \| undefined` | Query, Optional | Include payments data
**Default**: `false` | -| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data
**Default**: `false` | -| `refunds` | `boolean \| undefined` | Query, Optional | Include refunds data
**Default**: `false` | -| `dateField` | [`InvoiceDateField \| undefined`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.
**Default**: `InvoiceDateField.DueDate` | +| `consolidationLevel` | `string \| undefined` | Query, Optional | The consolidation level of the invoice. Allowed Values: none, parent, child or comma-separated lists of thereof, e.g. none,parent. | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `Direction.Desc` | +| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data

**Default**: `false` | +| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data

**Default**: `false` | +| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data

**Default**: `false` | +| `credits` | `boolean \| undefined` | Query, Optional | Include credits data

**Default**: `false` | +| `payments` | `boolean \| undefined` | Query, Optional | Include payments data

**Default**: `false` | +| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data

**Default**: `false` | +| `refunds` | `boolean \| undefined` | Query, Optional | Include refunds data

**Default**: `false` | +| `dateField` | [`InvoiceDateField \| undefined`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `InvoiceDateField.DueDate` | | `startDatetime` | `string \| undefined` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `customerIds` | `number[] \| undefined` | Query, Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | | `number` | `string[] \| undefined` | Query, Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | | `productIds` | `number[] \| undefined` | Query, Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | -| `sort` | [`InvoiceSortField \| undefined`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.
**Default**: `InvoiceSortField.Number` | +| `sort` | [`InvoiceSortField \| undefined`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.

**Default**: `InvoiceSortField.Number` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListInvoicesResponse`](../../doc/models/list-invoices-response.md) +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 @@ -511,7 +513,7 @@ async readInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -631,7 +633,8 @@ try { "type": "credit_card" }, "transaction_id": 253028955, - "prepayment": false + "prepayment": false, + "received_on": "2018-07-26" } ], "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" @@ -685,8 +688,8 @@ async listInvoiceEvents( | --- | --- | --- | --- | | `sinceDate` | `string \| undefined` | Query, Optional | The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns data from the beginning of the day). of the event from which you want to start the search. All the events before the `since_date` timestamp are not returned in the response. | | `sinceId` | `bigint \| undefined` | Query, Optional | The ID of the event from which you want to start the search(ID is not included. e.g. if ID is set to 2, then all events with ID 3 and more will be shown) This parameter is not used if since_date is defined. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `100` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `100` | | `invoiceUid` | `string \| undefined` | Query, Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | | `withChangeInvoiceStatus` | `string \| undefined` | Query, Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | | `eventTypes` | [`InvoiceEventType[] \| undefined`](../../doc/models/invoice-event-type.md) | Query, Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | @@ -694,7 +697,7 @@ async listInvoiceEvents( ## Response Type -[`ListInvoiceEventsResponse`](../../doc/models/list-invoice-events-response.md) +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 @@ -1102,51 +1105,7 @@ try { # Record Payment for Invoice -This API call should be used when you want to record a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. - -## Create a Payment from the existing payment profile - -In order to apply a payment to an invoice using an existing payment profile, specify `type` as `payment`, the amount less than the invoice total, and the customer's `payment_profile_id`. The ID of a payment profile might be retrieved via the Payment Profiles API endpoint. - -``` -{ - "type": "payment", - "payment": { - "amount": 10.00, - "payment_profile_id": 123 - } -} -``` - -## Create a Payment from the Subscription's Prepayment Account - -In order apply a prepayment to an invoice, specify the `type` as `prepayment`, and also the `amount`. - -``` -{ - "type": "prepayment", - "payment": { - "amount": 10.00 - } -} -``` - -Note that the `amount` must be less than or equal to the Subscription's Prepayment account balance. - -## Create a Payment from the Subscription's Service Credit Account - -In order to apply a service credit to an invoice, specify the `type` as `service_credit`, and also the `amount`: - -``` -{ - "type": "service_credit", - "payment": { - "amount": 10.00 - } -} -``` - -Note that Advanced Billing will attempt to fully pay the invoice's `due_amount` from the Subscription's Service Credit account. At this time, partial payments from a Service Credit Account are only allowed for consolidated invoices (subscription groups). Therefore, for normal invoices the Service Credit account balance must be greater than or equal to the invoice's `due_amount`. +Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. ```ts async recordPaymentForInvoice( @@ -1166,7 +1125,7 @@ async recordPaymentForInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -1249,7 +1208,7 @@ async recordPaymentForMultipleInvoices( ## Response Type -[`MultiInvoicePaymentResponse`](../../doc/models/multi-invoice-payment-response.md) +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 @@ -1341,18 +1300,18 @@ async listCreditNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number \| undefined` | Query, Optional | The subscription's Advanced Billing id | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data
**Default**: `false` | -| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data
**Default**: `false` | -| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data
**Default**: `false` | -| `refunds` | `boolean \| undefined` | Query, Optional | Include refunds data
**Default**: `false` | -| `applications` | `boolean \| undefined` | Query, Optional | Include applications data
**Default**: `false` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data

**Default**: `false` | +| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data

**Default**: `false` | +| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data

**Default**: `false` | +| `refunds` | `boolean \| undefined` | Query, Optional | Include refunds data

**Default**: `false` | +| `applications` | `boolean \| undefined` | Query, Optional | Include applications data

**Default**: `false` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListCreditNotesResponse`](../../doc/models/list-credit-notes-response.md) +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 @@ -1701,7 +1660,7 @@ async readCreditNote( ## Response Type -[`CreditNote`](../../doc/models/credit-note.md) +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 @@ -2058,7 +2017,7 @@ async recordPaymentForSubscription( ## Response Type -[`RecordPaymentResponse`](../../doc/models/record-payment-response.md) +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 @@ -2149,7 +2108,7 @@ async reopenInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -2198,7 +2157,7 @@ async voidInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -2253,14 +2212,14 @@ async listConsolidatedInvoiceSegments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `invoiceUid` | `string` | Template, Required | The unique identifier of the consolidated invoice | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.
**Default**: `Direction.Asc` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.

**Default**: `Direction.Asc` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ConsolidatedInvoice`](../../doc/models/consolidated-invoice.md) +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 @@ -2746,7 +2705,7 @@ async createInvoice( ## Response Type -[`InvoiceResponse`](../../doc/models/invoice-response.md) +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 @@ -2910,7 +2869,7 @@ async sendInvoice( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -2973,7 +2932,7 @@ async previewCustomerInformationChanges( ## Response Type -[`CustomerChangesPreviewResponse`](../../doc/models/customer-changes-preview-response.md) +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 @@ -3075,7 +3034,7 @@ async updateCustomerInformation( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 @@ -3322,7 +3281,7 @@ async issueInvoice( ## Response Type -[`Invoice`](../../doc/models/invoice.md) +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 0eddfcf6..fada7676 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -49,7 +49,7 @@ async createOffer( ## Response Type -[`OfferResponse`](../../doc/models/offer-response.md) +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,14 +151,14 @@ async listOffers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `includeArchived` | `boolean \| undefined` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListOffersResponse`](../../doc/models/list-offers-response.md) +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 @@ -263,7 +263,7 @@ async readOffer( ## Response Type -[`OfferResponse`](../../doc/models/offer-response.md) +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 @@ -303,7 +303,7 @@ async archiveOffer( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -343,7 +343,7 @@ async unarchiveOffer( ## Response Type -`void` +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 2a6c6a2e..60dfcd69 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -315,7 +315,7 @@ async createPaymentProfile( ## Response Type -[`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) +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 @@ -398,14 +398,14 @@ async listPaymentProfiles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `customerId` | `number \| undefined` | Query, Optional | The ID of the customer for which you wish to list payment profiles | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`PaymentProfileResponse[]`](../../doc/models/payment-profile-response.md) +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 @@ -436,6 +436,8 @@ try { "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -462,6 +464,8 @@ try { "id": 10188522, "first_name": "Frankie", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543712, "current_vault": "bogus", "vault_token": "123456789", @@ -503,6 +507,8 @@ Example response for Bank Account: "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -541,7 +547,7 @@ async readPaymentProfile( ## Response Type -[`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) +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 @@ -572,6 +578,8 @@ try { "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", @@ -651,7 +659,7 @@ async updatePaymentProfile( ## Response Type -[`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) +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 @@ -750,7 +758,7 @@ async deleteUnusedPaymentProfile( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -803,7 +811,7 @@ async deleteSubscriptionsPaymentProfile( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -850,7 +858,7 @@ async verifyBankAccount( ## Response Type -[`BankAccountResponse`](../../doc/models/bank-account-response.md) +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 @@ -939,7 +947,7 @@ async deleteSubscriptionGroupPaymentProfile( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -988,7 +996,7 @@ async changeSubscriptionDefaultPaymentProfile( ## Response Type -[`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) +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 @@ -1075,7 +1083,7 @@ async changeSubscriptionGroupDefaultPaymentProfile( ## Response Type -[`PaymentProfileResponse`](../../doc/models/payment-profile-response.md) +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 @@ -1159,7 +1167,7 @@ async readOneTimeToken( ## Response Type -[`GetOneTimeTokenRequest`](../../doc/models/get-one-time-token-request.md) +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 @@ -1211,7 +1219,7 @@ async sendRequestUpdatePaymentEmail( ## Response Type -`void` +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 ce2c6730..1c2885a2 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -42,8 +42,8 @@ async listProductsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `string` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `dateField` | [`BasicDateField \| undefined`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `filter` | [`ListProductsFilter \| undefined`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -56,7 +56,7 @@ async listProductsForProductFamily( ## Response Type -[`ProductResponse[]`](../../doc/models/product-response.md) +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 @@ -216,7 +216,7 @@ async createProductFamily( ## Response Type -[`ProductFamilyResponse`](../../doc/models/product-family-response.md) +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 @@ -289,7 +289,7 @@ async listProductFamilies( ## Response Type -[`ProductFamilyResponse[]`](../../doc/models/product-family-response.md) +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 @@ -362,7 +362,7 @@ async readProductFamily( ## Response Type -[`ProductFamilyResponse`](../../doc/models/product-family-response.md) +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 bf9e2f00..d7991465 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -45,7 +45,7 @@ async createProductPricePoint( ## Response Type -[`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) +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 @@ -140,8 +140,8 @@ async listProductPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productId` | [`ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Template, Required | This is a container for one-of cases. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
**Default**: `10`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `10`

**Constraints**: `<= 200` | | `currencyPrices` | `boolean \| undefined` | Query, Optional | When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. | | `filterType` | [`PricePointType[] \| undefined`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | | `archived` | `boolean \| undefined` | Query, Optional | Set to include archived price points in the response. | @@ -149,7 +149,7 @@ async listProductPricePoints( ## Response Type -[`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) +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 @@ -228,7 +228,7 @@ async updateProductPricePoint( ## Response Type -[`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) +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 @@ -312,7 +312,7 @@ async readProductPricePoint( ## Response Type -[`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) +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 @@ -386,7 +386,7 @@ async archiveProductPricePoint( ## Response Type -[`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) +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 @@ -466,7 +466,7 @@ async unarchiveProductPricePoint( ## Response Type -[`ProductPricePointResponse`](../../doc/models/product-price-point-response.md) +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 @@ -542,7 +542,7 @@ async promoteProductPricePointToDefault( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -642,7 +642,7 @@ async bulkCreateProductPricePoints( ## Response Type -[`BulkCreateProductPricePointsResponse`](../../doc/models/bulk-create-product-price-points-response.md) +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 @@ -761,7 +761,7 @@ async createProductCurrencyPrices( ## Response Type -[`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) +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 @@ -853,7 +853,7 @@ async updateProductCurrencyPrices( ## Response Type -[`CurrencyPricesResponse`](../../doc/models/currency-prices-response.md) +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 @@ -934,13 +934,13 @@ async listAllProductPricePoints( | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListPricePointsFilter \| undefined`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | | `include` | [`ListProductsPricePointsInclude \| undefined`](../../doc/models/list-products-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListProductPricePointsResponse`](../../doc/models/list-product-price-points-response.md) +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 85f00187..19846de9 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -43,7 +43,7 @@ async createProduct( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -156,7 +156,7 @@ async readProduct( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -249,7 +249,7 @@ async updateProduct( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -345,7 +345,7 @@ async archiveProduct( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -434,7 +434,7 @@ async readProductByHandle( ## Response Type -[`ProductResponse`](../../doc/models/product-response.md) +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 @@ -552,15 +552,15 @@ async listProducts( | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `startDatetime` | `string \| undefined` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `includeArchived` | `boolean \| undefined` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `include` | [`ListProductsInclude \| undefined`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ProductResponse[]`](../../doc/models/product-response.md) +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 08d02bcb..cd2b635d 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -47,7 +47,7 @@ async createConsolidatedProformaInvoice( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -97,17 +97,17 @@ async listSubscriptionGroupProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `string` | Template, Required | The uid of the subscription group | -| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data
**Default**: `false` | -| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data
**Default**: `false` | -| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data
**Default**: `false` | -| `credits` | `boolean \| undefined` | Query, Optional | Include credits data
**Default**: `false` | -| `payments` | `boolean \| undefined` | Query, Optional | Include payments data
**Default**: `false` | -| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data
**Default**: `false` | +| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data

**Default**: `false` | +| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data

**Default**: `false` | +| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data

**Default**: `false` | +| `credits` | `boolean \| undefined` | Query, Optional | Include credits data

**Default**: `false` | +| `payments` | `boolean \| undefined` | Query, Optional | Include payments data

**Default**: `false` | +| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data

**Default**: `false` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) +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 @@ -165,7 +165,7 @@ async readProformaInvoice( ## Response Type -[`ProformaInvoice`](../../doc/models/proforma-invoice.md) +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 @@ -217,7 +217,7 @@ async createProformaInvoice( ## Response Type -[`ProformaInvoice`](../../doc/models/proforma-invoice.md) +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 @@ -274,20 +274,20 @@ async listProformaInvoices( | `startDate` | `string \| undefined` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `endDate` | `string \| undefined` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `status` | [`ProformaInvoiceStatus \| undefined`](../../doc/models/proforma-invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.
**Default**: `Direction.Desc` | -| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data
**Default**: `false` | -| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data
**Default**: `false` | -| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data
**Default**: `false` | -| `credits` | `boolean \| undefined` | Query, Optional | Include credits data
**Default**: `false` | -| `payments` | `boolean \| undefined` | Query, Optional | Include payments data
**Default**: `false` | -| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data
**Default**: `false` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`Direction \| undefined`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `Direction.Desc` | +| `lineItems` | `boolean \| undefined` | Query, Optional | Include line items data

**Default**: `false` | +| `discounts` | `boolean \| undefined` | Query, Optional | Include discounts data

**Default**: `false` | +| `taxes` | `boolean \| undefined` | Query, Optional | Include taxes data

**Default**: `false` | +| `credits` | `boolean \| undefined` | Query, Optional | Include credits data

**Default**: `false` | +| `payments` | `boolean \| undefined` | Query, Optional | Include payments data

**Default**: `false` | +| `customFields` | `boolean \| undefined` | Query, Optional | Include custom fields data

**Default**: `false` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md) +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 @@ -348,7 +348,7 @@ async voidProformaInvoice( ## Response Type -[`ProformaInvoice`](../../doc/models/proforma-invoice.md) +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 @@ -401,7 +401,7 @@ async previewProformaInvoice( ## Response Type -[`ProformaInvoice`](../../doc/models/proforma-invoice.md) +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 @@ -454,7 +454,7 @@ async createSignupProformaInvoice( ## Response Type -[`ProformaInvoice`](../../doc/models/proforma-invoice.md) +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 @@ -518,7 +518,7 @@ async previewSignupProformaInvoice( ## Response Type -[`SignupProformaPreviewResponse`](../../doc/models/signup-proforma-preview-response.md) +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 84b58c31..b7bc8677 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -21,7 +21,7 @@ const reasonCodesController = new ReasonCodesController(client); # Reason Codes Intro -ReasonCodes are a way to gain a high level view of why your customers are cancelling the subcription to your product or service. +ReasonCodes are a way to gain a high level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -51,7 +51,7 @@ async createReasonCode( ## Response Type -[`ReasonCodeResponse`](../../doc/models/reason-code-response.md) +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 @@ -99,13 +99,13 @@ async listReasonCodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ReasonCodeResponse[]`](../../doc/models/reason-code-response.md) +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 @@ -147,7 +147,7 @@ try { "id": 1, "site_id": 2, "code": "CH1", - "description": "This doesnt meet my needs", + "description": "This does not meet my needs", "position": 2, "created_at": "2017-02-16T16:48:45-05:00", "updated_at": "2017-02-17T16:29:59-05:00" @@ -194,7 +194,7 @@ async readReasonCode( ## Response Type -[`ReasonCodeResponse`](../../doc/models/reason-code-response.md) +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 @@ -242,7 +242,7 @@ async updateReasonCode( ## Response Type -[`ReasonCodeResponse`](../../doc/models/reason-code-response.md) +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 @@ -271,7 +271,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 reversable. +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. ```ts async deleteReasonCode( @@ -289,7 +289,7 @@ async deleteReasonCode( ## Response Type -[`OkResponse`](../../doc/models/ok-response.md) +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 3bd6e3f0..f50a8f55 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -37,7 +37,7 @@ async validateReferralCode( ## Response Type -[`ReferralValidationResponse`](../../doc/models/referral-validation-response.md) +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 18334054..3a961558 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -43,15 +43,15 @@ async listSalesCommissionSettings( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | -| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `liveMode` | `boolean \| undefined` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SaleRepSettings[]`](../../doc/models/sale-rep-settings.md) +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 @@ -138,15 +138,15 @@ async listSalesReps( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | -| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `liveMode` | `boolean \| undefined` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListSaleRepItem[]`](../../doc/models/list-sale-rep-item.md) +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 @@ -284,15 +284,15 @@ async readSalesRep( | --- | --- | --- | --- | | `sellerId` | `string` | Template, Required | The Chargify id of your seller account | | `salesRepId` | `string` | Template, Required | The Advanced Billing id of sales rep. | -| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
**Default**: `'Bearer <>'` | +| `authorization` | `string \| undefined` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `'Bearer <>'` | | `liveMode` | `boolean \| undefined` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.
**Default**: `100` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SaleRep`](../../doc/models/sale-rep.md) +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 13dddbe1..0d33740c 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -48,7 +48,7 @@ async readSite( ## Response Type -[`SiteResponse`](../../doc/models/site-response.md) +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 @@ -134,12 +134,12 @@ async clearSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `cleanupScope` | [`CleanupScope \| undefined`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.
**Default**: `CleanupScope.All` | +| `cleanupScope` | [`CleanupScope \| undefined`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.

**Default**: `CleanupScope.All` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -175,13 +175,13 @@ async listChargifyJsPublicKeys( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListPublicKeysResponse`](../../doc/models/list-public-keys-response.md) +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 8b874152..67031450 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -51,7 +51,7 @@ async readSubscriptionComponent( ## Response Type -[`SubscriptionComponentResponse`](../../doc/models/subscription-component-response.md) +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 @@ -149,7 +149,7 @@ async listSubscriptionComponents( ## Response Type -[`SubscriptionComponentResponse[]`](../../doc/models/subscription-component-response.md) +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 @@ -247,7 +247,7 @@ async bulkUpdateSubscriptionComponentsPricePoints( ## Response Type -[`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) +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 @@ -332,7 +332,7 @@ async bulkResetSubscriptionComponentsPricePoints( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -524,7 +524,7 @@ async allocateComponent( ## Response Type -[`AllocationResponse`](../../doc/models/allocation-response.md) +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 @@ -629,12 +629,12 @@ async listAllocations( | --- | --- | --- | --- | | `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | | `componentId` | `number` | Template, Required | The Advanced Billing id of the component | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`AllocationResponse[]`](../../doc/models/allocation-response.md) +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 @@ -740,7 +740,7 @@ async allocateComponents( ## Response Type -[`AllocationResponse[]`](../../doc/models/allocation-response.md) +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 @@ -858,7 +858,7 @@ async previewAllocations( ## Response Type -[`AllocationPreviewResponse`](../../doc/models/allocation-preview-response.md) +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 @@ -1040,7 +1040,7 @@ async updatePrepaidUsageAllocationExpirationDate( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1116,7 +1116,7 @@ async deletePrepaidUsageAllocation( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1235,7 +1235,7 @@ async createUsage( ## Response Type -[`UsageResponse`](../../doc/models/usage-response.md) +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 @@ -1334,13 +1334,13 @@ async listUsages( | `maxId` | `bigint \| undefined` | Query, Optional | Returns usages with an id less than or equal to the one specified | | `sinceDate` | `string \| undefined` | Query, Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | | `untilDate` | `string \| undefined` | Query, Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`UsageResponse[]`](../../doc/models/usage-response.md) +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 @@ -1426,7 +1426,7 @@ async activateEventBasedComponent( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1493,7 +1493,7 @@ async deactivateEventBasedComponent( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1560,7 +1560,7 @@ async recordEvent( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1619,7 +1619,7 @@ async bulkRecordEvents( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1680,8 +1680,8 @@ async listSubscriptionComponentsForSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sort` | [`ListSubscriptionComponentsSort \| undefined`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`ListSubscriptionComponentsForSiteFilter \| undefined`](../../doc/models/list-subscription-components-for-site-filter.md) | Query, Optional | Filter to use for List Subscription Components For Site operation | @@ -1690,7 +1690,7 @@ async listSubscriptionComponentsForSite( | `startDatetime` | `string \| undefined` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2011-12-16`. | | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-07-01 09:00:05`. | -| `subscriptionIds` | `number[] \| undefined` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | +| `subscriptionIds` | `number[] \| undefined` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.

**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | | `pricePointIds` | [`IncludeNotNull \| undefined`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `productFamilyIds` | `number[] \| undefined` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | | `include` | [`ListSubscriptionComponentsInclude \| undefined`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | @@ -1698,7 +1698,7 @@ async listSubscriptionComponentsForSite( ## Response Type -[`ListSubscriptionComponentsResponse`](../../doc/models/list-subscription-components-response.md) +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 2c80570d..1577a84c 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -38,7 +38,7 @@ async createSubscriptionGroupPrepayment( ## Response Type -[`SubscriptionGroupPrepaymentResponse`](../../doc/models/subscription-group-prepayment-response.md) +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 @@ -95,14 +95,14 @@ async listPrepaymentsForSubscriptionGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `string` | Template, Required | The uid of the subscription group | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListPrepaymentsFilter \| undefined`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListSubscriptionGroupPrepaymentResponse`](../../doc/models/list-subscription-group-prepayment-response.md) +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 @@ -181,7 +181,7 @@ async issueSubscriptionGroupServiceCredit( ## Response Type -[`ServiceCreditResponse`](../../doc/models/service-credit-response.md) +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 @@ -253,7 +253,7 @@ async deductSubscriptionGroupServiceCredit( ## Response Type -[`ServiceCredit`](../../doc/models/service-credit.md) +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 de8717a1..246f6040 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -40,7 +40,7 @@ async cancelSubscriptionsInGroup( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -95,7 +95,7 @@ async initiateDelayedCancellationForGroup( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -141,7 +141,7 @@ async cancelDelayedCancellationForGroup( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -207,7 +207,7 @@ async reactivateSubscriptionGroup( ## Response Type -[`ReactivateSubscriptionGroupResponse`](../../doc/models/reactivate-subscription-group-response.md) +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 4ac7a820..3e4c8d84 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -49,7 +49,7 @@ async signupWithSubscriptionGroup( ## Response Type -[`SubscriptionGroupSignupResponse`](../../doc/models/subscription-group-signup-response.md) +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 @@ -112,7 +112,7 @@ async createSubscriptionGroup( ## Response Type -[`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) +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 @@ -190,14 +190,14 @@ async listSubscriptionGroups( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include` | [`SubscriptionGroupsListInclude[] \| undefined`](../../doc/models/subscription-groups-list-include.md) | Query, Optional | A list of additional information to include in the response. The following values are supported:

- `account_balances`: Account balance information for the subscription groups. Use in query: `include[]=account_balances` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`ListSubscriptionGroupsResponse`](../../doc/models/list-subscription-groups-response.md) +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 @@ -287,7 +287,7 @@ async readSubscriptionGroup( ## Response Type -[`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) +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 @@ -379,7 +379,7 @@ async updateSubscriptionGroupMembers( ## Response Type -[`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) +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 @@ -460,7 +460,7 @@ async deleteSubscriptionGroup( ## Response Type -[`DeleteSubscriptionGroupResponse`](../../doc/models/delete-subscription-group-response.md) +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 @@ -517,7 +517,7 @@ async findSubscriptionGroup( ## Response Type -[`FullSubscriptionGroupResponse`](../../doc/models/full-subscription-group-response.md) +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 @@ -619,7 +619,7 @@ async addSubscriptionToGroup( ## Response Type -[`SubscriptionGroupResponse`](../../doc/models/subscription-group-response.md) +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 @@ -698,7 +698,7 @@ async removeSubscriptionFromGroup( ## Response Type -`void` +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 711fa618..4792e3e1 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -15,6 +15,7 @@ const subscriptionInvoiceAccountController = new SubscriptionInvoiceAccountContr * [List Prepayments](../../doc/controllers/subscription-invoice-account.md#list-prepayments) * [Issue Service Credit](../../doc/controllers/subscription-invoice-account.md#issue-service-credit) * [Deduct Service Credit](../../doc/controllers/subscription-invoice-account.md#deduct-service-credit) +* [List Service Credits](../../doc/controllers/subscription-invoice-account.md#list-service-credits) * [Refund Prepayment](../../doc/controllers/subscription-invoice-account.md#refund-prepayment) @@ -38,7 +39,7 @@ async readAccountBalances( ## Response Type -[`AccountBalances`](../../doc/models/account-balances.md) +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 @@ -86,7 +87,7 @@ async createPrepayment( ## Response Type -[`CreatePrepaymentResponse`](../../doc/models/create-prepayment-response.md) +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 @@ -159,14 +160,14 @@ async listPrepayments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`ListPrepaymentsFilter \| undefined`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`PrepaymentsResponse`](../../doc/models/prepayments-response.md) +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 @@ -244,7 +245,7 @@ async issueServiceCredit( ## Response Type -[`ServiceCredit`](../../doc/models/service-credit.md) +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 @@ -313,7 +314,7 @@ async deductServiceCredit( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -349,6 +350,96 @@ try { | 422 | Unprocessable Entity (WebDAV) | `ApiError` | +# List Service Credits + +This request will list a subscription's service credits. + +```ts +async listServiceCredits( + subscriptionId: number, + page?: number, + perPage?: number, + direction?: SortingDirection, + requestOptions?: RequestOptions +): Promise> +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | + +## Response Type + +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 + +```ts +const subscriptionId = 222; + +const page = 2; + +const perPage = 50; + +try { + const { result, ...httpResponse } = await subscriptionInvoiceAccountController.listServiceCredits( + subscriptionId, + page, + perPage +); + // Get more response info... + // const { statusCode, headers } = httpResponse; +} catch (error) { + if (error instanceof ApiError) { + const errors = error.result; + // const { statusCode, headers } = error; + } +} +``` + +## Example Response *(as JSON)* + +```json +{ + "service_credits": [ + { + "id": 68, + "amount_in_cents": 2200, + "ending_balance_in_cents": 1100, + "entry_type": "Debit", + "memo": "Service credit memo", + "invoice_uid": "inv_brntdvmmqxc3j", + "remaining_balance_in_cents": 1100, + "created_at": "2025-04-01T09:54:49-04:00" + }, + { + "id": 67, + "amount_in_cents": 3300, + "ending_balance_in_cents": 3300, + "entry_type": "Credit", + "memo": "Service credit memo", + "invoice_uid": null, + "remaining_balance_in_cents": 1100, + "created_at": "2025-03-05T16:06:08-05:00" + } + ] +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | `ApiError` | +| 422 | Unprocessable Entity | [`ErrorListResponseError`](../../doc/models/error-list-response-error.md) | + + # 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. @@ -375,7 +466,7 @@ async refundPrepayment( ## Response Type -[`PrepaymentResponse`](../../doc/models/prepayment-response.md) +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 3ba80ae7..93ae3a64 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -47,7 +47,7 @@ async createSubscriptionNote( ## Response Type -[`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) +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 @@ -101,13 +101,13 @@ async listSubscriptionNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SubscriptionNoteResponse[]`](../../doc/models/subscription-note-response.md) +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 @@ -186,7 +186,7 @@ async readSubscriptionNote( ## Response Type -[`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) +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 @@ -250,7 +250,7 @@ async updateSubscriptionNote( ## Response Type -[`SubscriptionNoteResponse`](../../doc/models/subscription-note-response.md) +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 @@ -311,7 +311,7 @@ async deleteSubscriptionNote( ## Response Type -`void` +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 fa90df5e..9a20fbee 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -91,7 +91,7 @@ async migrateSubscriptionProduct( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -280,7 +280,7 @@ async previewSubscriptionProductMigration( ## Response Type -[`SubscriptionMigrationPreviewResponse`](../../doc/models/subscription-migration-preview-response.md) +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-status.md b/doc/controllers/subscription-status.md index 2dc5f75b..2d0067f3 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -50,7 +50,7 @@ async retrySubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -234,7 +234,7 @@ async cancelSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -414,12 +414,12 @@ async resumeSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `number` | Template, Required | The Chargify id of the subscription | -| `calendarBillingResumptionCharge` | [`ResumptionCharge \| undefined`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled
**Default**: `ResumptionCharge.Prorated` | +| `calendarBillingResumptionCharge` | [`ResumptionCharge \| undefined`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled

**Default**: `ResumptionCharge.Prorated` | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -580,7 +580,7 @@ async pauseSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -752,7 +752,7 @@ async updateAutomaticSubscriptionResumption( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1087,7 +1087,7 @@ async reactivateSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1263,7 +1263,7 @@ async initiateDelayedCancellation( ## Response Type -[`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) +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 @@ -1312,7 +1312,7 @@ async cancelDelayedCancellation( ## Response Type -[`DelayedCancellationResponse`](../../doc/models/delayed-cancellation-response.md) +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 @@ -1366,7 +1366,7 @@ async cancelDunning( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1435,7 +1435,7 @@ async previewRenewal( ## Response Type -[`RenewalPreviewResponse`](../../doc/models/renewal-preview-response.md) +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 fd52a7a5..dcd9e1d5 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -164,42 +164,6 @@ If you already have a customer and card stored in your payment gateway, you may } ``` -## Subscription with Credit Card - -```json -"subscription": { - "product_handle": "basic", - "customer_attributes": { - "first_name": "Joe", - "last_name": "Blow", - "email": "joe@example.com", - "zip": "02120", - "state": "MA", - "reference": "XYZ", - "phone": "(617) 111 - 0000", - "organization": "Acme", - "country": "US", - "city": "Boston", - "address_2": null, - "address": "123 Mass Ave." - }, - "credit_card_attributes": { - "last_name": "Smith", - "first_name": "Joe", - "full_number": "4111111111111111", - "expiration_year": "2021", - "expiration_month": "1", - "card_type": "visa", - "billing_zip": "02120", - "billing_state": "MA", - "billing_country": "US", - "billing_city": "Boston", - "billing_address_2": null, - "billing_address": "123 Mass Ave." - } -} -``` - ## Subscription with ACH as Payment Profile ```json @@ -697,7 +661,7 @@ async createSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -901,6 +865,7 @@ async listSubscriptions( product?: number, productPricePointId?: number, coupon?: number, + couponCode?: string, dateField?: SubscriptionDateField, startDate?: string, endDate?: string, @@ -918,12 +883,13 @@ async listSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `state` | [`SubscriptionStateFilter \| undefined`](../../doc/models/subscription-state-filter.md) | Query, Optional | The current state of the subscription | | `product` | `number \| undefined` | Query, Optional | The product id of the subscription. (Note that the product handle cannot be used.) | | `productPricePointId` | `number \| undefined` | Query, Optional | The ID of the product price point. If supplied, product is required | | `coupon` | `number \| undefined` | Query, Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | +| `couponCode` | `string \| undefined` | Query, Optional | The coupon code currently applied to the subscription | | `dateField` | [`SubscriptionDateField \| undefined`](../../doc/models/subscription-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | | `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2022-07-01`. | | `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2022-08-01`. | @@ -931,13 +897,13 @@ async listSubscriptions( | `endDatetime` | `string \| undefined` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-08-01 10:00:05`. | | `metadata` | `Record \| undefined` | Query, Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | | `direction` | [`SortingDirection \| undefined`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `sort` | [`SubscriptionSort \| undefined`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort
**Default**: `SubscriptionSort.SignupDate` | +| `sort` | [`SubscriptionSort \| undefined`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort

**Default**: `SubscriptionSort.SignupDate` | | `include` | [`SubscriptionListInclude[] \| undefined`](../../doc/models/subscription-list-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`SubscriptionResponse[]`](../../doc/models/subscription-response.md) +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 @@ -1030,7 +996,7 @@ async updateSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1039,12 +1005,8 @@ const subscriptionId = 222; const body: UpdateSubscriptionRequest = { subscription: { - creditCardAttributes: { - fullNumber: '4111111111111111', - expirationMonth: '10', - expirationYear: '2030', - }, nextBillingAt: '2010-08-06T15:34:00Z', + paymentCollectionMethod: 'remittance', }, }; @@ -1206,7 +1168,7 @@ async readSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1413,7 +1375,7 @@ async overrideSubscription( ## Response Type -`void` +This method returns an [`ApiResponse`](../../doc/api-response.md) instance. ## Example Usage @@ -1471,7 +1433,7 @@ async findSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1527,7 +1489,7 @@ async purgeSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -1586,7 +1548,7 @@ async updatePrepaidSubscriptionConfiguration( ## Response Type -[`PrepaidConfigurationResponse`](../../doc/models/prepaid-configuration-response.md) +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 @@ -1642,11 +1604,11 @@ try { The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. -The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). +The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. -## Side effects +A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction. -A subscription will not be created by sending a POST to this endpoint. It is meant to serve as a prediction. +For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). ## Taxable Subscriptions @@ -1682,7 +1644,7 @@ async previewSubscription( ## Response Type -[`SubscriptionPreviewResponse`](../../doc/models/subscription-preview-response.md) +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 @@ -1856,7 +1818,7 @@ async applyCouponsToSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 @@ -2067,7 +2029,7 @@ async removeCouponFromSubscription( ## Response Type -`string` +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 @@ -2163,7 +2125,7 @@ async activateSubscription( ## Response Type -[`SubscriptionResponse`](../../doc/models/subscription-response.md) +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 f3713e87..77b46b5b 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -55,15 +55,15 @@ async listWebhooks( | `status` | [`WebhookStatus \| undefined`](../../doc/models/webhook-status.md) | Query, Optional | Webhooks with matching status would be returned. | | `sinceDate` | `string \| undefined` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | | `untilDate` | `string \| undefined` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | -| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` | -| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` | +| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | +| `perPage` | `number \| undefined` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `order` | [`WebhookOrder \| undefined`](../../doc/models/webhook-order.md) | Query, Optional | The order in which the Webhooks are returned. | | `subscription` | `number \| undefined` | Query, Optional | The Advanced Billing id of a subscription you'd like to filter for | | `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. | ## Response Type -[`WebhookResponse[]`](../../doc/models/webhook-response.md) +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 @@ -145,7 +145,7 @@ async enableWebhooks( ## Response Type -[`EnableWebhooksResponse`](../../doc/models/enable-webhooks-response.md) +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 @@ -197,7 +197,7 @@ async replayWebhooks( ## Response Type -[`ReplayWebhooksResponse`](../../doc/models/replay-webhooks-response.md) +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 @@ -253,7 +253,7 @@ async createEndpoint( ## Response Type -[`EndpointResponse`](../../doc/models/endpoint-response.md) +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 @@ -322,7 +322,7 @@ async listEndpoints( ## Response Type -[`Endpoint[]`](../../doc/models/endpoint.md) +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 @@ -398,7 +398,7 @@ async updateEndpoint( ## Response Type -[`EndpointResponse`](../../doc/models/endpoint-response.md) +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 diff --git a/doc/http-client-options.md b/doc/http-client-options.md new file mode 100644 index 00000000..fdd6a53c --- /dev/null +++ b/doc/http-client-options.md @@ -0,0 +1,14 @@ + +# HttpClientOptions + +Represents the HTTP client configurations for API calls. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| timeout | `number` | Timeout in milliseconds. | +| httpAgent | `any` | Custom http agent to be used when performing http requests. | +| httpsAgent | `any` | Custom https agent to be used when performing http requests. | +| retryConfig | [`Partial`](../doc/retry-configuration.md) | Configurations to retry requests. | + diff --git a/doc/http-request.md b/doc/http-request.md new file mode 100644 index 00000000..cbcfef4c --- /dev/null +++ b/doc/http-request.md @@ -0,0 +1,54 @@ + +# HttpRequest + +Represents an HTTP request. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| method | `GET \| DELETE \| HEAD \| OPTIONS \| POST \| PUT \| PATCH \| LINK \| UNLINK` | HTTP method. | +| headers | `Record` | HTTP headers. | +| url | `string` | Request URL including the query part. | +| body | `HttpRequestBody` | HTTP request body. | +| responseType | `text \| stream` | Expected response type. | + +## HttpRequestBody + +Represents the HTTP request body, which can be of different types. + +| Type | Description | +| --- | --- | +| `HttpRequestTextBody` | Text-based body. | +| `HttpRequestUrlEncodedFormBody` | URL-encoded form data. | +| `HttpRequestMultipartFormBody` | Multipart form data. | +| `HttpRequestStreamBody` | Stream-based body. | + +### HttpRequestTextBody + +| Name | Type | Description | +| --- | --- | --- | +| type | `text` | Type identifier. | +| content | `string` | Text content. | + +### HttpRequestUrlEncodedFormBody + +| Name | Type | Description | +| --- | --- | --- | +| type | `form` | Type identifier. | +| content | `Array<{ key: string; value: string; }>` | Form data. | + +### HttpRequestMultipartFormBody + +| Name | Type | Description | +| --- | --- | --- | +| type | `form-data` | Type identifier. | +| content | `Array<{ key: string; value: string \| FileWrapper; }>` | Multipart form data. | + +### HttpRequestStreamBody + +| Name | Type | Description | +| --- | --- | --- | +| type | `stream` | Type identifier. | +| content | `FileWrapper` | Stream content. | + diff --git a/doc/models/apple-pay-payment-profile.md b/doc/models/apple-pay-payment-profile.md index aba900de..bd29620b 100644 --- a/doc/models/apple-pay-payment-profile.md +++ b/doc/models/apple-pay-payment-profile.md @@ -25,6 +25,8 @@ | `paymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.ApplePay` | | `siteGatewaySettingId` | `number \| null \| undefined` | Optional | - | | `gatewayHandle` | `string \| null \| undefined` | Optional | - | +| `createdAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was created | +| `updatedAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index e5ecc797..6560cc6a 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -28,9 +28,11 @@ | `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` | -| `verified` | `boolean \| undefined` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account
**Default**: `false` | +| `verified` | `boolean \| undefined` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account

**Default**: `false` | | `siteGatewaySettingId` | `number \| null \| undefined` | Optional | - | | `gatewayHandle` | `string \| null \| undefined` | Optional | - | +| `createdAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was created | +| `updatedAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/chargify-ebb.md b/doc/models/chargify-ebb.md index c8a58c9b..9892813e 100644 --- a/doc/models/chargify-ebb.md +++ b/doc/models/chargify-ebb.md @@ -12,7 +12,7 @@ | `timestamp` | `string \| undefined` | Optional | This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`. | | `id` | `string \| undefined` | Optional | A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | | `createdAt` | `string \| undefined` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | -| `uniquenessToken` | `string \| undefined` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.
**Constraints**: *Maximum Length*: `64` | +| `uniquenessToken` | `string \| undefined` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.

**Constraints**: *Maximum Length*: `64` | | `subscriptionId` | `number \| undefined` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | | `subscriptionReference` | `string \| undefined` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | diff --git a/doc/models/component.md b/doc/models/component.md index 287ddc0c..7807c443 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -17,6 +17,7 @@ | `unitPrice` | `string \| null \| undefined` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | | `productFamilyId` | `number \| undefined` | Optional | The id of the Product Family to which the Component belongs | | `productFamilyName` | `string \| undefined` | Optional | The name of the Product Family to which the Component belongs | +| `productFamilyHandle` | `string \| undefined` | Optional | The handle of the Product Family to which the Component belongs | | `pricePerUnitInCents` | `bigint \| null \| undefined` | Optional | deprecated - use unit_price instead | | `kind` | [`ComponentKind \| undefined`](../../doc/models/component-kind.md) | Optional | A handle for the component type | | `archived` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is archived or not. | diff --git a/doc/models/coupon-request.md b/doc/models/coupon-request.md index 6cdb7377..e6d542ca 100644 --- a/doc/models/coupon-request.md +++ b/doc/models/coupon-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `coupon` | [`CouponPayload \| undefined`](../../doc/models/coupon-payload.md) | Optional | - | -| `restrictedProducts` | `Record \| undefined` | Optional | An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product | -| `restrictedComponents` | `Record \| undefined` | Optional | An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component | +| `restrictedProducts` | `Record \| undefined` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product | +| `restrictedComponents` | `Record \| undefined` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component | ## Example (as JSON) diff --git a/doc/models/create-component-price-point.md b/doc/models/create-component-price-point.md index ee5828e9..a5a26ab3 100644 --- a/doc/models/create-component-price-point.md +++ b/doc/models/create-component-price-point.md @@ -13,7 +13,7 @@ | `handle` | `string \| undefined` | Optional | - | | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[]`](../../doc/models/price.md) | Required | - | -| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.
**Default**: `true` | +| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.

**Default**: `true` | | `taxIncluded` | `boolean \| undefined` | Optional | Whether or not the price point includes tax. Setting not supported when creating price points in bulk. | | `interval` | `number \| undefined` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `intervalUnit` | [`IntervalUnit \| null \| undefined`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this price point, either month or day. This property is only available for sites with Multifrequency enabled. | diff --git a/doc/models/create-or-update-product.md b/doc/models/create-or-update-product.md index 07e56c36..d7d3a165 100644 --- a/doc/models/create-or-update-product.md +++ b/doc/models/create-or-update-product.md @@ -24,7 +24,7 @@ | `expirationInterval` | `number \| undefined` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | | `expirationIntervalUnit` | [`ExpirationIntervalUnit \| null \| undefined`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `autoCreateSignupPage` | `boolean \| undefined` | Optional | - | -| `taxCode` | `string \| undefined` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
**Constraints**: *Maximum Length*: `10` | +| `taxCode` | `string \| undefined` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.

**Constraints**: *Maximum Length*: `10` | ## Example (as JSON) diff --git a/doc/models/create-prepaid-usage-component-price-point.md b/doc/models/create-prepaid-usage-component-price-point.md index aa688940..f5a290d6 100644 --- a/doc/models/create-prepaid-usage-component-price-point.md +++ b/doc/models/create-prepaid-usage-component-price-point.md @@ -14,7 +14,7 @@ | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[]`](../../doc/models/price.md) | Required | - | | `overagePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | -| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.
**Default**: `true` | +| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.

**Default**: `true` | | `rolloverPrepaidRemainder` | `boolean \| undefined` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period | | `renewPrepaidAllocation` | `boolean \| undefined` | Optional | (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period | | `expirationInterval` | `number \| undefined` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md index 52726c59..b0d673d3 100644 --- a/doc/models/create-product-price-point.md +++ b/doc/models/create-product-price-point.md @@ -22,7 +22,7 @@ | `initialChargeAfterTrial` | `boolean \| undefined` | Optional | - | | `expirationInterval` | `number \| undefined` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `expirationIntervalUnit` | [`ExpirationIntervalUnit \| null \| undefined`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | -| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
**Default**: `true` | +| `useSiteExchangeRate` | `boolean \| undefined` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.

**Default**: `true` | ## Example (as JSON) diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 32da40e5..117b150e 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index d2a09f34..1b7e160e 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -21,11 +21,12 @@ | `netTerms` | `string \| undefined` | Optional | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | | `customerId` | `number \| undefined` | Optional | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | | `nextBillingAt` | `string \| undefined` | Optional | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | -| `initialBillingAt` | `string \| undefined` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See further notes in the section on Delayed Signups. | +| `initialBillingAt` | `string \| undefined` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. | +| `deferSignup` | `boolean \| undefined` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `storedCredentialTransactionId` | `number \| undefined` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | `salesRepId` | `number \| undefined` | Optional | - | | `paymentProfileId` | `number \| undefined` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) | -| `reference` | `string \| undefined` | Optional | The reference value (provided by your app) for the subscription itelf. | +| `reference` | `string \| undefined` | Optional | The reference value (provided by your app) for the subscription itself. | | `customerAttributes` | [`CustomerAttributes \| undefined`](../../doc/models/customer-attributes.md) | Optional | - | | `paymentProfileAttributes` | [`PaymentProfileAttributes \| undefined`](../../doc/models/payment-profile-attributes.md) | Optional | alias to credit_card_attributes | | `creditCardAttributes` | [`PaymentProfileAttributes \| undefined`](../../doc/models/payment-profile-attributes.md) | Optional | Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property. | @@ -46,7 +47,7 @@ | `authorizerLastName` | `string \| undefined` | Optional | (Optional) The last name of the person authorizing the ACH agreement. | | `calendarBillingFirstCharge` | `string \| undefined` | Optional | (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal). | | `reasonCode` | `string \| undefined` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. | -| `productChangeDelayed` | `boolean \| undefined` | Optional | (Optional, used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | +| `productChangeDelayed` | `boolean \| undefined` | Optional | (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | | `offerId` | [`CreateSubscriptionOfferId \| undefined`](../../doc/models/containers/create-subscription-offer-id.md) | Optional | This is a container for one-of cases. | | `prepaidConfiguration` | [`UpsertPrepaidConfiguration \| undefined`](../../doc/models/upsert-prepaid-configuration.md) | Optional | - | | `previousBillingAt` | `string \| undefined` | Optional | Providing a previous_billing_at that is in the past will set the current_period_starts_at when the subscription is created. It will also set activated_at if not explicitly passed during the subscription import. Can only be used if next_billing_at is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount. | @@ -55,14 +56,15 @@ | `activatedAt` | `string \| undefined` | Optional | - | | `agreementAcceptance` | [`AgreementAcceptance \| undefined`](../../doc/models/agreement-acceptance.md) | Optional | Required when creating a subscription with Maxio Payments. | | `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` | +| `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.

**Default**: `false` | ## Example (as JSON) ```json { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index 85208594..c20f5347 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -31,6 +31,8 @@ | `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) | | `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 | +| `updatedAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/ebb-component.md b/doc/models/ebb-component.md index 8186d04b..e040d85d 100644 --- a/doc/models/ebb-component.md +++ b/doc/models/ebb-component.md @@ -12,7 +12,7 @@ | `name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `string \| undefined` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[] \| undefined`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/group-billing.md b/doc/models/group-billing.md index 05a9bd84..0e6aeb31 100644 --- a/doc/models/group-billing.md +++ b/doc/models/group-billing.md @@ -11,9 +11,9 @@ Optional attributes related to billing date and accrual. Note: Only applicable f | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `accrue` | `boolean \| undefined` | Optional | A flag indicating whether or not to accrue charges on the new subscription.
**Default**: `false` | -| `alignDate` | `boolean \| undefined` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.
**Default**: `false` | -| `prorate` | `boolean \| undefined` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.
**Default**: `false` | +| `accrue` | `boolean \| undefined` | Optional | A flag indicating whether or not to accrue charges on the new subscription.

**Default**: `false` | +| `alignDate` | `boolean \| undefined` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.

**Default**: `false` | +| `prorate` | `boolean \| undefined` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.

**Default**: `false` | ## Example (as JSON) diff --git a/doc/models/issue-invoice-request.md b/doc/models/issue-invoice-request.md index 9916a824..e08017f8 100644 --- a/doc/models/issue-invoice-request.md +++ b/doc/models/issue-invoice-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `onFailedPayment` | [`FailedPaymentAction \| undefined`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `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.
- `initiate_dunning` - prepayments and credits applied to the 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; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).
**Default**: `FailedPaymentAction.LeaveOpenInvoice` | +| `onFailedPayment` | [`FailedPaymentAction \| undefined`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `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.
- `initiate_dunning` - prepayments and credits applied to the 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; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

**Default**: `FailedPaymentAction.LeaveOpenInvoice` | ## Example (as JSON) diff --git a/doc/models/list-components-filter.md b/doc/models/list-components-filter.md index 34a29983..659bd1f6 100644 --- a/doc/models/list-components-filter.md +++ b/doc/models/list-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ids` | `number[] \| undefined` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `number[] \| undefined` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `useSiteExchangeRate` | `boolean \| undefined` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | ## Example (as JSON) diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md index 6b5d19f9..becd273d 100644 --- a/doc/models/list-coupons-filter.md +++ b/doc/models/list-coupons-filter.md @@ -14,7 +14,7 @@ | `endDate` | `string \| undefined` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | | `startDatetime` | `string \| undefined` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | | `endDatetime` | `string \| undefined` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | -| `ids` | `number[] \| undefined` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `number[] \| undefined` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `codes` | `string[] \| undefined` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | | `useSiteExchangeRate` | `boolean \| undefined` | Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | diff --git a/doc/models/list-mrr-filter.md b/doc/models/list-mrr-filter.md index 85df88f0..3be79d30 100644 --- a/doc/models/list-mrr-filter.md +++ b/doc/models/list-mrr-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionIds` | `number[] \| undefined` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `subscriptionIds` | `number[] \| undefined` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | ## Example (as JSON) diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md index 9ba76e07..10f111aa 100644 --- a/doc/models/list-products-filter.md +++ b/doc/models/list-products-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ids` | `number[] \| undefined` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | +| `ids` | `number[] \| undefined` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `prepaidProductPricePoint` | [`PrepaidProductPricePointFilter \| undefined`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | | `useSiteExchangeRate` | `boolean \| undefined` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | diff --git a/doc/models/list-service-credits-response.md b/doc/models/list-service-credits-response.md new file mode 100644 index 00000000..b7dd7254 --- /dev/null +++ b/doc/models/list-service-credits-response.md @@ -0,0 +1,36 @@ + +# List Service Credits Response + +## Structure + +`ListServiceCreditsResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `serviceCredits` | [`ServiceCredit1[] \| undefined`](../../doc/models/service-credit-1.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "service_credits": [ + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + }, + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + } + ] +} +``` + diff --git a/doc/models/list-subscription-components-filter.md b/doc/models/list-subscription-components-filter.md index 0cfe14a8..30383bce 100644 --- a/doc/models/list-subscription-components-filter.md +++ b/doc/models/list-subscription-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `currencies` | `string[] \| undefined` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.
**Constraints**: *Minimum Items*: `1` | +| `currencies` | `string[] \| undefined` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.

**Constraints**: *Minimum Items*: `1` | | `useSiteExchangeRate` | `boolean \| undefined` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | ## Example (as JSON) diff --git a/doc/models/list-subscription-components-for-site-filter.md b/doc/models/list-subscription-components-for-site-filter.md index 1dfa0c73..0c4fb592 100644 --- a/doc/models/list-subscription-components-for-site-filter.md +++ b/doc/models/list-subscription-components-for-site-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `currencies` | `string[] \| undefined` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.
**Constraints**: *Minimum Items*: `1` | +| `currencies` | `string[] \| undefined` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.

**Constraints**: *Minimum Items*: `1` | | `useSiteExchangeRate` | `boolean \| undefined` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | | `subscription` | [`SubscriptionFilter \| undefined`](../../doc/models/subscription-filter.md) | Optional | Nested filter used for List Subscription Components For Site Filter | diff --git a/doc/models/metered-component.md b/doc/models/metered-component.md index caf59f38..d727a5df 100644 --- a/doc/models/metered-component.md +++ b/doc/models/metered-component.md @@ -12,7 +12,7 @@ | `name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `string \| undefined` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[] \| undefined`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md index f25ea25f..d43bc748 100644 --- a/doc/models/on-off-component.md +++ b/doc/models/on-off-component.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `description` | `string \| undefined` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is taxable or not. | | `upgradeCharge` | [`CreditType \| null \| undefined`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | | `downgradeCredit` | [`CreditType \| null \| undefined`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | diff --git a/doc/models/override-subscription.md b/doc/models/override-subscription.md index 58f5f5df..ce35aae1 100644 --- a/doc/models/override-subscription.md +++ b/doc/models/override-subscription.md @@ -12,7 +12,7 @@ | `activatedAt` | `string \| undefined` | Optional | Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end). Only ISO8601 format is supported. | | `canceledAt` | `string \| undefined` | Optional | Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. Only ISO8601 format is supported. | | `cancellationMessage` | `string \| undefined` | Optional | Can be used to record a reason for the original cancellation. | -| `expiresAt` | `string \| undefined` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. | +| `expiresAt` | `string \| undefined` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. | | `currentPeriodStartsAt` | `string \| undefined` | Optional | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. | ## Example (as JSON) diff --git a/doc/models/paypal-payment-profile.md b/doc/models/paypal-payment-profile.md index 4d08234a..8a2a359e 100644 --- a/doc/models/paypal-payment-profile.md +++ b/doc/models/paypal-payment-profile.md @@ -26,6 +26,8 @@ | `siteGatewaySettingId` | `number \| null \| undefined` | Optional | - | | `gatewayHandle` | `string \| null \| undefined` | Optional | - | | `paypalEmail` | `string \| undefined` | Optional | - | +| `createdAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was created | +| `updatedAt` | `string \| undefined` | Optional | A timestamp indicating when this payment profile was last updated | ## Example (as JSON) diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md index 769b42e7..dba54f79 100644 --- a/doc/models/prepaid-product-price-point-filter.md +++ b/doc/models/prepaid-product-price-point-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `productPricePointId` | `string` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Value**: `'not_null'` | +| `productPricePointId` | `string` | Required, Constant | Passed as a parameter to list methods to return only non null values.

**Value**: `'not_null'` | ## Example (as JSON) diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md index 28678f0e..16f52b0d 100644 --- a/doc/models/prepaid-usage-component.md +++ b/doc/models/prepaid-usage-component.md @@ -12,7 +12,7 @@ | `name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `string \| undefined` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[] \| undefined`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md index d33968c9..18a193d1 100644 --- a/doc/models/quantity-based-component.md +++ b/doc/models/quantity-based-component.md @@ -12,7 +12,7 @@ | `name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | | `unitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `string \| undefined` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `handle` | `string \| undefined` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `boolean \| undefined` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`Price[] \| undefined`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | diff --git a/doc/models/reactivation-billing.md b/doc/models/reactivation-billing.md index 976dad3c..7fb48ac3 100644 --- a/doc/models/reactivation-billing.md +++ b/doc/models/reactivation-billing.md @@ -11,7 +11,7 @@ These values are only applicable to subscriptions using calendar billing | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `reactivationCharge` | [`ReactivationCharge \| undefined`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal
**Default**: `ReactivationCharge.Prorated` | +| `reactivationCharge` | [`ReactivationCharge \| undefined`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal

**Default**: `ReactivationCharge.Prorated` | ## Example (as JSON) diff --git a/doc/models/service-credit-1.md b/doc/models/service-credit-1.md new file mode 100644 index 00000000..0505c318 --- /dev/null +++ b/doc/models/service-credit-1.md @@ -0,0 +1,32 @@ + +# Service Credit 1 + +## Structure + +`ServiceCredit1` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `number \| undefined` | Optional | - | +| `amountInCents` | `bigint \| undefined` | Optional | The amount in cents of the entry | +| `endingBalanceInCents` | `bigint \| undefined` | Optional | The new balance for the credit account | +| `entryType` | [`ServiceCreditType \| undefined`](../../doc/models/service-credit-type.md) | Optional | The type of entry | +| `memo` | `string \| undefined` | Optional | The memo attached to the entry | +| `invoiceUid` | `string \| null \| undefined` | Optional | The invoice uid associated with the entry. Only present for debit entries | +| `remainingBalanceInCents` | `bigint \| undefined` | Optional | The remaining balance for the entry | +| `createdAt` | `string \| undefined` | Optional | The date and time the entry was created | + +## Example (as JSON) + +```json +{ + "id": 174, + "amount_in_cents": 4, + "ending_balance_in_cents": 44, + "entry_type": "Credit", + "memo": "memo8" +} +``` + diff --git a/doc/models/subscription-filter.md b/doc/models/subscription-filter.md index 25ee4787..e6fe21e1 100644 --- a/doc/models/subscription-filter.md +++ b/doc/models/subscription-filter.md @@ -11,7 +11,7 @@ Nested filter used for List Subscription Components For Site Filter | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `states` | [`SubscriptionStateFilter[] \| undefined`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.
**Constraints**: *Minimum Items*: `1` | +| `states` | [`SubscriptionStateFilter[] \| undefined`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.

**Constraints**: *Minimum Items*: `1` | | `dateField` | [`SubscriptionListDateField \| undefined`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | | `startDate` | `string \| undefined` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | | `endDate` | `string \| undefined` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | diff --git a/doc/models/subscription-group-credit-card.md b/doc/models/subscription-group-credit-card.md index 6096d70a..97f64592 100644 --- a/doc/models/subscription-group-credit-card.md +++ b/doc/models/subscription-group-credit-card.md @@ -9,9 +9,6 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `fullNumber` | [`SubscriptionGroupCreditCardFullNumber \| undefined`](../../doc/models/containers/subscription-group-credit-card-full-number.md) | Optional | This is a container for one-of cases. | -| `expirationMonth` | [`SubscriptionGroupCreditCardExpirationMonth \| undefined`](../../doc/models/containers/subscription-group-credit-card-expiration-month.md) | Optional | This is a container for one-of cases. | -| `expirationYear` | [`SubscriptionGroupCreditCardExpirationYear \| undefined`](../../doc/models/containers/subscription-group-credit-card-expiration-year.md) | Optional | This is a container for one-of cases. | | `chargifyToken` | `string \| undefined` | Optional | - | | `vaultToken` | `string \| undefined` | Optional | - | | `currentVault` | [`CreditCardVault \| undefined`](../../doc/models/credit-card-vault.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | @@ -24,6 +21,9 @@ | `billingState` | `string \| undefined` | Optional | - | | `billingZip` | `string \| undefined` | Optional | - | | `billingCountry` | `string \| undefined` | Optional | - | +| `fullNumber` | [`SubscriptionGroupCreditCardFullNumber \| undefined`](../../doc/models/containers/subscription-group-credit-card-full-number.md) | Optional | This is a container for one-of cases. | +| `expirationMonth` | [`SubscriptionGroupCreditCardExpirationMonth \| undefined`](../../doc/models/containers/subscription-group-credit-card-expiration-month.md) | Optional | This is a container for one-of cases. | +| `expirationYear` | [`SubscriptionGroupCreditCardExpirationYear \| undefined`](../../doc/models/containers/subscription-group-credit-card-expiration-year.md) | Optional | This is a container for one-of cases. | | `lastFour` | `string \| undefined` | Optional | - | | `cardType` | [`CardType \| undefined`](../../doc/models/card-type.md) | Optional | The type of card used. | | `customerVaultToken` | `string \| undefined` | Optional | - | @@ -34,11 +34,12 @@ ```json { - "full_number": 4111111111111111, "chargify_token": "tok_592nf92ng0sjd4300p", - "expiration_month": "String1", - "expiration_year": "String5", - "vault_token": "vault_token6" + "full_number": 4111111111111111, + "vault_token": "vault_token6", + "current_vault": "braintree_blue", + "gateway_handle": "gateway_handle6", + "first_name": "first_name4" } ``` diff --git a/doc/models/subscription-migration-preview-options.md b/doc/models/subscription-migration-preview-options.md index 9420611a..46188050 100644 --- a/doc/models/subscription-migration-preview-options.md +++ b/doc/models/subscription-migration-preview-options.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | | `productId` | `number \| undefined` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `productPricePointId` | `number \| undefined` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | -| `includeTrial` | `boolean \| undefined` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `false` | -| `includeInitialCharge` | `boolean \| undefined` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `false` | -| `includeCoupons` | `boolean \| undefined` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `true` | -| `preservePeriod` | `boolean \| undefined` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `false` | +| `includeTrial` | `boolean \| undefined` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | +| `includeInitialCharge` | `boolean \| undefined` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | +| `includeCoupons` | `boolean \| undefined` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | +| `preservePeriod` | `boolean \| undefined` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | | `productHandle` | `string \| undefined` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `productPricePointHandle` | `string \| undefined` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration \| undefined`](../../doc/models/proration.md) | Optional | - | diff --git a/doc/models/subscription-product-migration.md b/doc/models/subscription-product-migration.md index c1c72000..dfdd8d1b 100644 --- a/doc/models/subscription-product-migration.md +++ b/doc/models/subscription-product-migration.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | | `productId` | `number \| undefined` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `productPricePointId` | `number \| undefined` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | -| `includeTrial` | `boolean \| undefined` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `false` | -| `includeInitialCharge` | `boolean \| undefined` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `false` | -| `includeCoupons` | `boolean \| undefined` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `true` | -| `preservePeriod` | `boolean \| undefined` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `false` | +| `includeTrial` | `boolean \| undefined` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | +| `includeInitialCharge` | `boolean \| undefined` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | +| `includeCoupons` | `boolean \| undefined` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | +| `preservePeriod` | `boolean \| undefined` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | | `productHandle` | `string \| undefined` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `productPricePointHandle` | `string \| undefined` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration \| undefined`](../../doc/models/proration.md) | Optional | - | diff --git a/doc/models/tax-configuration.md b/doc/models/tax-configuration.md index 9e774834..3f884634 100644 --- a/doc/models/tax-configuration.md +++ b/doc/models/tax-configuration.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `kind` | [`TaxConfigurationKind \| undefined`](../../doc/models/tax-configuration-kind.md) | Optional | **Default**: `TaxConfigurationKind.Custom` | | `destinationAddress` | [`TaxDestinationAddress \| undefined`](../../doc/models/tax-destination-address.md) | Optional | - | -| `fullyConfigured` | `boolean \| undefined` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview
**Default**: `false` | +| `fullyConfigured` | `boolean \| undefined` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview

**Default**: `false` | ## Example (as JSON) diff --git a/doc/models/update-subscription-request.md b/doc/models/update-subscription-request.md index eba94260..ede8dd80 100644 --- a/doc/models/update-subscription-request.md +++ b/doc/models/update-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index af65d674..1bb6c77c 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -16,7 +16,10 @@ | `nextProductId` | `string \| undefined` | Optional | Set to an empty string to cancel a delayed product change. | | `nextProductPricePointId` | `string \| undefined` | Optional | - | | `snapDay` | [`UpdateSubscriptionSnapDay \| undefined`](../../doc/models/containers/update-subscription-snap-day.md) | Optional | This is a container for one-of cases. | +| `initialBillingAt` | `string \| undefined` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | +| `deferSignup` | `boolean \| undefined` | Optional | (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to Awaiting Signup Date. Use this when you want to update a subscription that has an unknown initial billing date. When the first billing date is known, update a subscription to set the `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `nextBillingAt` | `string \| undefined` | Optional | - | +| `expiresAt` | `string \| undefined` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | `paymentCollectionMethod` | `string \| undefined` | Optional | - | | `receivesInvoiceEmails` | `boolean \| undefined` | Optional | - | | `netTerms` | [`UpdateSubscriptionNetTerms \| undefined`](../../doc/models/containers/update-subscription-net-terms.md) | Optional | This is a container for one-of cases. | @@ -33,6 +36,7 @@ ```json { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/retry-configuration.md b/doc/retry-configuration.md new file mode 100644 index 00000000..4cf34227 --- /dev/null +++ b/doc/retry-configuration.md @@ -0,0 +1,17 @@ + +# RetryConfiguration + +Represents the retry configurations for API calls. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| maxNumberOfRetries | `number` | Maximum number of retries.
*Default*: `0` | +| retryOnTimeout | `boolean` | Whether to retry on request timeout.
*Default*: `true` | +| retryInterval | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure.
*Default*: `1` | +| maximumRetryWaitTime | `number` | Overall wait time for the requests getting retried.
*Default*: `0` | +| backoffFactor | `number` | Used in calculation of wait time for next request in case of failure.
*Default*: `2` | +| httpStatusCodesToRetry | `number[]` | Http status codes to retry against.
*Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` | +| httpMethodsToRetry | `HttpMethod[]` | Http methods to retry against.
*Default*: `['GET', 'PUT']` | + diff --git a/package.json b/package.json index 133882fc..3b0d7879 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "6.1.0", + "version": "7.0.0", "license": "MIT", "sideEffects": false, "main": "dist/cjs/index.js", @@ -13,8 +13,8 @@ "node": ">=14.17.0" }, "scripts": { - "build": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json", - "prepare": "rm -rf dist & tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json", + "build": "rimraf dist && tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json", + "prepare": "rimraf dist && tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json", "lint": "eslint **/*.ts --ignore-path .eslintignore", "lint:fix": "eslint **/*.ts --ignore-path .eslintignore --fix" }, @@ -38,7 +38,8 @@ "@typescript-eslint/parser": "^5.52.0", "eslint": "^8.34.0", "jest": "^29.4.3", - "ts-jest": "^29.0.5", + "rimraf": "^3.0.2", + "ts-jest": "29.2.6", "tslib": "^2.5.0", "typescript": "^4.9.5" }, diff --git a/src/client.ts b/src/client.ts index a22355b6..6feb7ead 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:6.1.0 on OS {os-info}' + 'AB SDK TypeScript:7.0.0 on OS {os-info}' ); this._requestBuilderFactory = createRequestHandlerFactory( (server) => getBaseUri(server, this._config), diff --git a/src/controllers/couponsController.ts b/src/controllers/couponsController.ts index 569b1eef..93282222 100644 --- a/src/controllers/couponsController.ts +++ b/src/controllers/couponsController.ts @@ -408,7 +408,12 @@ export class CouponsController extends BaseController { }); req.query('code', mapped.code, commaPrefix); req.query('product_family_id', mapped.productFamilyId, commaPrefix); - req.throwOn(404, SingleStringErrorResponseError, 'Not Found'); + req.throwOn( + 404, + SingleStringErrorResponseError, + true, + "Not Found: '{$response.body}'" + ); req.authenticate([{ basicAuth: true }]); return req.callAsJson(couponResponseSchema, requestOptions); } diff --git a/src/controllers/customFieldsController.ts b/src/controllers/customFieldsController.ts index 4c428e8d..c11178be 100644 --- a/src/controllers/customFieldsController.ts +++ b/src/controllers/customFieldsController.ts @@ -80,7 +80,7 @@ export class CustomFieldsController extends BaseController { * * ### Metafields "On-the-Fly" * - * It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existant + * It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent * name is passed when creating Metadata, a Metafield for that key will be automatically created. The * Metafield API, however, gives you more control over your “keys”. * diff --git a/src/controllers/insightsController.ts b/src/controllers/insightsController.ts index 193b3db1..f1cd3406 100644 --- a/src/controllers/insightsController.ts +++ b/src/controllers/insightsController.ts @@ -34,7 +34,7 @@ export class InsightsController extends BaseController { * * There currently is not a complimentary matching set of documentation that compliments this endpoint. * However, each Site's dashboard will reflect the summary of information provided in the Stats - * reposnse. + * response. * * ``` * https://subdomain.chargify.com/dashboard diff --git a/src/controllers/invoicesController.ts b/src/controllers/invoicesController.ts index 55b64ce6..88dcb429 100644 --- a/src/controllers/invoicesController.ts +++ b/src/controllers/invoicesController.ts @@ -149,6 +149,9 @@ export class InvoicesController extends BaseController { * @param subscriptionGroupUid The UID of the subscription group you want to fetch * consolidated invoices for. This will return a paginated list of * consolidated invoices for the specified group. + * @param consolidationLevel The consolidation level of the invoice. Allowed Values: none, + * parent, child or comma-separated lists of thereof, e.g. none, + * parent. * @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 navigating @@ -201,6 +204,7 @@ export class InvoicesController extends BaseController { status, subscriptionId, subscriptionGroupUid, + consolidationLevel, page, perPage, direction, @@ -224,6 +228,7 @@ export class InvoicesController extends BaseController { status?: InvoiceStatus; subscriptionId?: number; subscriptionGroupUid?: string; + consolidationLevel?: string; page?: number; perPage?: number; direction?: Direction; @@ -251,6 +256,7 @@ export class InvoicesController extends BaseController { status: [status, optional(invoiceStatusSchema)], subscriptionId: [subscriptionId, optional(number())], subscriptionGroupUid: [subscriptionGroupUid, optional(string())], + consolidationLevel: [consolidationLevel, optional(string())], page: [page, optional(number())], perPage: [perPage, optional(number())], direction: [direction, optional(directionSchema)], @@ -278,6 +284,7 @@ export class InvoicesController extends BaseController { mapped.subscriptionGroupUid, commaPrefix ); + req.query('consolidation_level', mapped.consolidationLevel, commaPrefix); req.query('page', mapped.page, commaPrefix); req.query('per_page', mapped.perPage, commaPrefix); req.query('direction', mapped.direction, commaPrefix); @@ -434,60 +441,8 @@ export class InvoicesController extends BaseController { } /** - * This API call should be used when you want to record a payment of a given type against a specific - * invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment - * endpoint. - * - * ## Create a Payment from the existing payment profile - * - * In order to apply a payment to an invoice using an existing payment profile, specify `type` as - * `payment`, the amount less than the invoice total, and the customer's `payment_profile_id`. The ID - * of a payment profile might be retrieved via the Payment Profiles API endpoint. - * - * ``` - * { - * "type": "payment", - * "payment": { - * "amount": 10.00, - * "payment_profile_id": 123 - * } - * } - * ``` - * - * ## Create a Payment from the Subscription's Prepayment Account - * - * In order apply a prepayment to an invoice, specify the `type` as `prepayment`, and also the `amount`. - * - * ``` - * { - * "type": "prepayment", - * "payment": { - * "amount": 10.00 - * } - * } - * ``` - * - * Note that the `amount` must be less than or equal to the Subscription's Prepayment account balance. - * - * ## Create a Payment from the Subscription's Service Credit Account - * - * In order to apply a service credit to an invoice, specify the `type` as `service_credit`, and also - * the `amount`: - * - * - * ``` - * { - * "type": "service_credit", - * "payment": { - * "amount": 10.00 - * } - * } - * ``` - * - * Note that Advanced Billing will attempt to fully pay the invoice's `due_amount` from the - * Subscription's Service Credit account. At this time, partial payments from a Service Credit Account - * are only allowed for consolidated invoices (subscription groups). Therefore, for normal invoices the - * Service Credit account balance must be greater than or equal to the invoice's `due_amount`. + * Applies a payment of a given type against a specific invoice. If you would like to apply a payment + * across multiple invoices, you can use the Bulk Payment endpoint. * * @param uid The unique identifier for the invoice, this does not * refer to the public facing invoice number. diff --git a/src/controllers/paymentProfilesController.ts b/src/controllers/paymentProfilesController.ts index c34391af..2b78f6eb 100644 --- a/src/controllers/paymentProfilesController.ts +++ b/src/controllers/paymentProfilesController.ts @@ -463,6 +463,8 @@ export class PaymentProfilesController extends BaseController { * "id": 10089892, * "first_name": "Chester", * "last_name": "Tester", + * "created_at": "2025-01-01T00:00:00-05:00", + * "updated_at": "2025-01-01T00:00:00-05:00", * "customer_id": 14543792, * "current_vault": "bogus", * "vault_token": "0011223344", diff --git a/src/controllers/productFamiliesController.ts b/src/controllers/productFamiliesController.ts index 9e50afb6..aaf3ab9e 100644 --- a/src/controllers/productFamiliesController.ts +++ b/src/controllers/productFamiliesController.ts @@ -130,7 +130,7 @@ export class ProductFamiliesController extends BaseController { req.query('include_archived', mapped.includeArchived, commaPrefix); req.query('include', mapped.include, commaPrefix); req.appendTemplatePath`/product_families/${mapped.productFamilyId}/products.json`; - req.throwOn(404, ApiError, 'Not Found'); + req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(productResponseSchema), requestOptions); } diff --git a/src/controllers/reasonCodesController.ts b/src/controllers/reasonCodesController.ts index 98d99fdc..663d8f22 100644 --- a/src/controllers/reasonCodesController.ts +++ b/src/controllers/reasonCodesController.ts @@ -27,8 +27,8 @@ export class ReasonCodesController extends BaseController { /** * # Reason Codes Intro * - * ReasonCodes are a way to gain a high level view of why your customers are cancelling the subcription - * to your product or service. + * ReasonCodes are a way to gain a high level view of why your customers are cancelling the + * subscription to your product or service. * * Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your * subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -160,7 +160,7 @@ 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 reversable. + * 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/subscriptionInvoiceAccountController.ts b/src/controllers/subscriptionInvoiceAccountController.ts index de4fb913..9928a5cf 100644 --- a/src/controllers/subscriptionInvoiceAccountController.ts +++ b/src/controllers/subscriptionInvoiceAccountController.ts @@ -29,6 +29,10 @@ import { ListPrepaymentsFilter, listPrepaymentsFilterSchema, } from '../models/listPrepaymentsFilter'; +import { + ListServiceCreditsResponse, + listServiceCreditsResponseSchema, +} from '../models/listServiceCreditsResponse'; import { PrepaymentResponse, prepaymentResponseSchema, @@ -42,9 +46,14 @@ import { refundPrepaymentRequestSchema, } from '../models/refundPrepaymentRequest'; import { ServiceCredit, serviceCreditSchema } from '../models/serviceCredit'; +import { + SortingDirection, + sortingDirectionSchema, +} from '../models/sortingDirection'; import { bigint, number, optional } from '../schema'; import { BaseController } from './baseController'; import { ApiError } from '@apimatic/core'; +import { ErrorListResponseError } from '../errors/errorListResponseError'; import { RefundPrepaymentBaseErrorsResponseError } from '../errors/refundPrepaymentBaseErrorsResponseError'; export class SubscriptionInvoiceAccountController extends BaseController { @@ -219,6 +228,53 @@ export class SubscriptionInvoiceAccountController extends BaseController { return req.call(requestOptions); } + /** + * This request will list 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 + * results is displayed. The page parameter specifies a page number of + * results to fetch. You can start navigating through the pages to consume + * the results. You do this by passing in a page parameter. Retrieve the + * next page by adding ?page=2 to the query string. If there are no + * results to return, then an empty result set will be returned. Use in + * query `page=1`. + * @param perPage This parameter indicates how many records to fetch in each request. + * Default value is 20. The maximum allowed values is 200; any per_page + * value over 200 will be changed to 200. Use in query `per_page=200`. + * @param direction Controls the order in which results are returned. Use in query + * `direction=asc`. + * @return Response from the API call + */ + async listServiceCredits( + subscriptionId: number, + page?: number, + perPage?: number, + direction?: SortingDirection, + requestOptions?: RequestOptions + ): Promise> { + const req = this.createRequest('GET'); + const mapped = req.prepareArgs({ + subscriptionId: [subscriptionId, number()], + page: [page, optional(number())], + perPage: [perPage, optional(number())], + direction: [direction, optional(sortingDirectionSchema)], + }); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/service_credits/list.json`; + req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); + req.throwOn( + 422, + ErrorListResponseError, + true, + "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'." + ); + req.authenticate([{ basicAuth: true }]); + return req.callAsJson(listServiceCreditsResponseSchema, requestOptions); + } + /** * 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 diff --git a/src/controllers/subscriptionsController.ts b/src/controllers/subscriptionsController.ts index 35a29b9f..6b2fd543 100644 --- a/src/controllers/subscriptionsController.ts +++ b/src/controllers/subscriptionsController.ts @@ -277,42 +277,6 @@ export class SubscriptionsController extends BaseController { * } * ``` * - * ## Subscription with Credit Card - * - * ```json - * "subscription": { - * "product_handle": "basic", - * "customer_attributes": { - * "first_name": "Joe", - * "last_name": "Blow", - * "email": "joe@example.com", - * "zip": "02120", - * "state": "MA", - * "reference": "XYZ", - * "phone": "(617) 111 - 0000", - * "organization": "Acme", - * "country": "US", - * "city": "Boston", - * "address_2": null, - * "address": "123 Mass Ave." - * }, - * "credit_card_attributes": { - * "last_name": "Smith", - * "first_name": "Joe", - * "full_number": "4111111111111111", - * "expiration_year": "2021", - * "expiration_month": "1", - * "card_type": "visa", - * "billing_zip": "02120", - * "billing_state": "MA", - * "billing_country": "US", - * "billing_city": "Boston", - * "billing_address_2": null, - * "billing_address": "123 Mass Ave." - * } - * } - * ``` - * * ## Subscription with ACH as Payment Profile * * ```json @@ -991,6 +955,7 @@ export class SubscriptionsController extends BaseController { * subscription. (This can be found in the URL when * editing a coupon. Note that the coupon code cannot be * used.) + * @param couponCode The coupon code currently applied to the subscription * @param dateField The type of filter you'd like to apply to your search. * Allowed Values: , current_period_ends_at, * current_period_starts_at, created_at, activated_at, @@ -1040,6 +1005,7 @@ export class SubscriptionsController extends BaseController { product, productPricePointId, coupon, + couponCode, dateField, startDate, endDate, @@ -1056,6 +1022,7 @@ export class SubscriptionsController extends BaseController { product?: number; productPricePointId?: number; coupon?: number; + couponCode?: string; dateField?: SubscriptionDateField; startDate?: string; endDate?: string; @@ -1076,6 +1043,7 @@ export class SubscriptionsController extends BaseController { product: [product, optional(number())], productPricePointId: [productPricePointId, optional(number())], coupon: [coupon, optional(number())], + couponCode: [couponCode, optional(string())], dateField: [dateField, optional(subscriptionDateFieldSchema)], startDate: [startDate, optional(string())], endDate: [endDate, optional(string())], @@ -1096,6 +1064,7 @@ export class SubscriptionsController extends BaseController { unindexedPrefix ); req.query('coupon', mapped.coupon, unindexedPrefix); + req.query('coupon_code', mapped.couponCode, unindexedPrefix); req.query('date_field', mapped.dateField, unindexedPrefix); req.query('start_date', mapped.startDate, unindexedPrefix); req.query('end_date', mapped.endDate, unindexedPrefix); @@ -1398,14 +1367,12 @@ 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. * - * The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For - * more information, please see our documentation [here](https://maxio.zendesk.com/hc/en- - * us/articles/24252493695757-Subscriber-Interface-Overview). + * The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. * - * ## Side effects + * A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction. * - * A subscription will not be created by sending a POST to this endpoint. It is meant to serve as a - * prediction. + * For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en- + * us/articles/24252493695757-Subscriber-Interface-Overview). * * ## Taxable Subscriptions * diff --git a/src/index.ts b/src/index.ts index f3da3d25..cfde216f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -386,6 +386,7 @@ export type { ListPublicKeysResponse } from './models/listPublicKeysResponse'; export type { ListSaleRepItem } from './models/listSaleRepItem'; export type { ListSegmentsFilter } from './models/listSegmentsFilter'; export type { ListSegmentsResponse } from './models/listSegmentsResponse'; +export type { ListServiceCreditsResponse } from './models/listServiceCreditsResponse'; export type { ListSubcriptionGroupPrepaymentItem } from './models/listSubcriptionGroupPrepaymentItem'; export type { ListSubscriptionComponentsFilter } from './models/listSubscriptionComponentsFilter'; export type { ListSubscriptionComponentsForSiteFilter } from './models/listSubscriptionComponentsForSiteFilter'; @@ -527,6 +528,7 @@ export type { SegmentPrice } from './models/segmentPrice'; export type { SegmentResponse } from './models/segmentResponse'; export type { SendInvoiceRequest } from './models/sendInvoiceRequest'; export type { ServiceCredit } from './models/serviceCredit'; +export type { ServiceCredit1 } from './models/serviceCredit1'; export type { ServiceCreditResponse } from './models/serviceCreditResponse'; export { ServiceCreditType } from './models/serviceCreditType'; export type { SignupProformaPreview } from './models/signupProformaPreview'; diff --git a/src/models/applePayPaymentProfile.ts b/src/models/applePayPaymentProfile.ts index 55cc8790..35df4f41 100644 --- a/src/models/applePayPaymentProfile.ts +++ b/src/models/applePayPaymentProfile.ts @@ -44,6 +44,10 @@ export interface ApplePayPaymentProfile { paymentType: PaymentType; siteGatewaySettingId?: number | null; gatewayHandle?: string | null; + /** A timestamp indicating when this payment profile was created */ + createdAt?: string; + /** A timestamp indicating when this payment profile was last updated */ + updatedAt?: string; [key: string]: unknown; } @@ -68,5 +72,7 @@ export const applePayPaymentProfileSchema: Schema = expa optional(nullable(number())), ], gatewayHandle: ['gateway_handle', optional(nullable(string()))], + createdAt: ['created_at', optional(string())], + updatedAt: ['updated_at', optional(string())], } ); diff --git a/src/models/bankAccountPaymentProfile.ts b/src/models/bankAccountPaymentProfile.ts index e27c37f9..755dc0bb 100644 --- a/src/models/bankAccountPaymentProfile.ts +++ b/src/models/bankAccountPaymentProfile.ts @@ -63,6 +63,10 @@ export interface BankAccountPaymentProfile { verified?: boolean; siteGatewaySettingId?: number | null; gatewayHandle?: string | null; + /** A timestamp indicating when this payment profile was created */ + createdAt?: string; + /** A timestamp indicating when this payment profile was last updated */ + updatedAt?: string; [key: string]: unknown; } @@ -96,5 +100,7 @@ export const bankAccountPaymentProfileSchema: Schema optional(nullable(number())), ], gatewayHandle: ['gateway_handle', optional(nullable(string()))], + createdAt: ['created_at', optional(string())], + updatedAt: ['updated_at', optional(string())], } ); diff --git a/src/models/component.ts b/src/models/component.ts index 8eb74837..344bc095 100644 --- a/src/models/component.ts +++ b/src/models/component.ts @@ -39,6 +39,8 @@ export interface Component { productFamilyId?: number; /** The name of the Product Family to which the Component belongs */ productFamilyName?: string; + /** The handle of the Product Family to which the Component belongs */ + productFamilyHandle?: string; /** deprecated - use unit_price instead */ pricePerUnitInCents?: bigint | null; /** A handle for the component type */ @@ -104,6 +106,7 @@ export const componentSchema: Schema = expandoObject({ unitPrice: ['unit_price', optional(nullable(string()))], productFamilyId: ['product_family_id', optional(number())], productFamilyName: ['product_family_name', optional(string())], + productFamilyHandle: ['product_family_handle', optional(string())], pricePerUnitInCents: [ 'price_per_unit_in_cents', optional(nullable(bigint())), diff --git a/src/models/couponRequest.ts b/src/models/couponRequest.ts index d9070a9d..9f5dacd7 100644 --- a/src/models/couponRequest.ts +++ b/src/models/couponRequest.ts @@ -16,9 +16,9 @@ import { CouponPayload, couponPayloadSchema } from './couponPayload'; export interface CouponRequest { coupon?: CouponPayload; - /** An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product */ + /** An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product */ restrictedProducts?: Record; - /** An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component */ + /** An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component */ restrictedComponents?: Record; [key: string]: unknown; } diff --git a/src/models/createSubscription.ts b/src/models/createSubscription.ts index f2ebca95..2f189004 100644 --- a/src/models/createSubscription.ts +++ b/src/models/createSubscription.ts @@ -78,14 +78,16 @@ export interface CreateSubscription { customerId?: number; /** (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. */ nextBillingAt?: string; - /** (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See further notes in the section on Delayed Signups. */ + /** (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. */ initialBillingAt?: string; + /** (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information. */ + deferSignup?: boolean; /** For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. */ storedCredentialTransactionId?: number; salesRepId?: number; /** The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) */ paymentProfileId?: number; - /** The reference value (provided by your app) for the subscription itelf. */ + /** The reference value (provided by your app) for the subscription itself. */ reference?: string; customerAttributes?: CustomerAttributes; /** alias to credit_card_attributes */ @@ -124,7 +126,7 @@ export interface CreateSubscription { calendarBillingFirstCharge?: string; /** (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. */ reasonCode?: string; - /** (Optional, used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. */ + /** (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. */ productChangeDelayed?: boolean; /** Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify id of the offer or its handle prefixed with `handle:`.er */ offerId?: CreateSubscriptionOfferId; @@ -169,6 +171,7 @@ export const createSubscriptionSchema: Schema = expandoObjec customerId: ['customer_id', optional(number())], nextBillingAt: ['next_billing_at', optional(string())], initialBillingAt: ['initial_billing_at', optional(string())], + deferSignup: ['defer_signup', optional(boolean())], storedCredentialTransactionId: [ 'stored_credential_transaction_id', optional(number()), diff --git a/src/models/creditCardPaymentProfile.ts b/src/models/creditCardPaymentProfile.ts index d510d0e6..7b199ba2 100644 --- a/src/models/creditCardPaymentProfile.ts +++ b/src/models/creditCardPaymentProfile.ts @@ -59,6 +59,10 @@ export interface CreditCardPaymentProfile { siteGatewaySettingId?: number | null; /** An identifier of connected gateway. */ gatewayHandle?: string | null; + /** A timestamp indicating when this payment profile was created */ + createdAt?: string; + /** A timestamp indicating when this payment profile was last updated */ + updatedAt?: string; [key: string]: unknown; } @@ -89,5 +93,7 @@ export const creditCardPaymentProfileSchema: Schema = optional(nullable(number())), ], gatewayHandle: ['gateway_handle', optional(nullable(string()))], + createdAt: ['created_at', optional(string())], + updatedAt: ['updated_at', optional(string())], } ); diff --git a/src/models/listServiceCreditsResponse.ts b/src/models/listServiceCreditsResponse.ts new file mode 100644 index 00000000..700b8e58 --- /dev/null +++ b/src/models/listServiceCreditsResponse.ts @@ -0,0 +1,22 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { array, expandoObject, lazy, optional, Schema } from '../schema'; +import { ServiceCredit1, serviceCredit1Schema } from './serviceCredit1'; + +export interface ListServiceCreditsResponse { + serviceCredits?: ServiceCredit1[]; + [key: string]: unknown; +} + +export const listServiceCreditsResponseSchema: Schema = expandoObject( + { + serviceCredits: [ + 'service_credits', + optional(array(lazy(() => serviceCredit1Schema))), + ], + } +); diff --git a/src/models/metafield.ts b/src/models/metafield.ts index e6b28505..367a7737 100644 --- a/src/models/metafield.ts +++ b/src/models/metafield.ts @@ -13,7 +13,10 @@ import { Schema, string, } from '../schema'; -import { MetafieldEnum, metafieldEnumSchema } from './containers/metafieldEnum'; +import { + MetafieldEnum, + metafieldEnumSchema, +} from './containers/metafieldEnum'; import { MetafieldInput, metafieldInputSchema } from './metafieldInput'; import { MetafieldScope, metafieldScopeSchema } from './metafieldScope'; diff --git a/src/models/overrideSubscription.ts b/src/models/overrideSubscription.ts index 4304d230..12693322 100644 --- a/src/models/overrideSubscription.ts +++ b/src/models/overrideSubscription.ts @@ -13,7 +13,7 @@ export interface OverrideSubscription { canceledAt?: string; /** Can be used to record a reason for the original cancellation. */ cancellationMessage?: string; - /** Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. */ + /** Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. */ expiresAt?: string; /** Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. */ currentPeriodStartsAt?: string; diff --git a/src/models/paypalPaymentProfile.ts b/src/models/paypalPaymentProfile.ts index 622c34cd..573727fd 100644 --- a/src/models/paypalPaymentProfile.ts +++ b/src/models/paypalPaymentProfile.ts @@ -45,6 +45,10 @@ export interface PaypalPaymentProfile { siteGatewaySettingId?: number | null; gatewayHandle?: string | null; paypalEmail?: string; + /** A timestamp indicating when this payment profile was created */ + createdAt?: string; + /** A timestamp indicating when this payment profile was last updated */ + updatedAt?: string; [key: string]: unknown; } @@ -70,5 +74,7 @@ export const paypalPaymentProfileSchema: Schema = expandoO ], gatewayHandle: ['gateway_handle', optional(nullable(string()))], paypalEmail: ['paypal_email', optional(string())], + createdAt: ['created_at', optional(string())], + updatedAt: ['updated_at', optional(string())], } ); diff --git a/src/models/serviceCredit1.ts b/src/models/serviceCredit1.ts new file mode 100644 index 00000000..ed5e635a --- /dev/null +++ b/src/models/serviceCredit1.ts @@ -0,0 +1,49 @@ +/** + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +import { + bigint, + expandoObject, + nullable, + number, + optional, + Schema, + string, +} from '../schema'; +import { + ServiceCreditType, + serviceCreditTypeSchema, +} from './serviceCreditType'; + +export interface ServiceCredit1 { + id?: number; + /** The amount in cents of the entry */ + amountInCents?: bigint; + /** The new balance for the credit account */ + endingBalanceInCents?: bigint; + /** The type of entry */ + entryType?: ServiceCreditType; + /** The memo attached to the entry */ + memo?: string; + /** The invoice uid associated with the entry. Only present for debit entries */ + invoiceUid?: string | null; + /** The remaining balance for the entry */ + remainingBalanceInCents?: bigint; + /** The date and time the entry was created */ + createdAt?: string; + [key: string]: unknown; +} + +export const serviceCredit1Schema: Schema = expandoObject({ + id: ['id', optional(number())], + amountInCents: ['amount_in_cents', optional(bigint())], + endingBalanceInCents: ['ending_balance_in_cents', optional(bigint())], + entryType: ['entry_type', optional(serviceCreditTypeSchema)], + memo: ['memo', optional(string())], + invoiceUid: ['invoice_uid', optional(nullable(string()))], + remainingBalanceInCents: ['remaining_balance_in_cents', optional(bigint())], + createdAt: ['created_at', optional(string())], +}); diff --git a/src/models/subscriptionGroupCreditCard.ts b/src/models/subscriptionGroupCreditCard.ts index 50ed4945..96a693c1 100644 --- a/src/models/subscriptionGroupCreditCard.ts +++ b/src/models/subscriptionGroupCreditCard.ts @@ -21,9 +21,6 @@ import { import { CreditCardVault, creditCardVaultSchema } from './creditCardVault'; export interface SubscriptionGroupCreditCard { - fullNumber?: SubscriptionGroupCreditCardFullNumber; - expirationMonth?: SubscriptionGroupCreditCardExpirationMonth; - expirationYear?: SubscriptionGroupCreditCardExpirationYear; chargifyToken?: string; vaultToken?: string; /** The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. */ @@ -37,6 +34,9 @@ export interface SubscriptionGroupCreditCard { billingState?: string; billingZip?: string; billingCountry?: string; + fullNumber?: SubscriptionGroupCreditCardFullNumber; + expirationMonth?: SubscriptionGroupCreditCardExpirationMonth; + expirationYear?: SubscriptionGroupCreditCardExpirationYear; lastFour?: string; /** The type of card used. */ cardType?: CardType; @@ -48,18 +48,6 @@ export interface SubscriptionGroupCreditCard { export const subscriptionGroupCreditCardSchema: Schema = expandoObject( { - fullNumber: [ - 'full_number', - optional(subscriptionGroupCreditCardFullNumberSchema), - ], - expirationMonth: [ - 'expiration_month', - optional(subscriptionGroupCreditCardExpirationMonthSchema), - ], - expirationYear: [ - 'expiration_year', - optional(subscriptionGroupCreditCardExpirationYearSchema), - ], chargifyToken: ['chargify_token', optional(string())], vaultToken: ['vault_token', optional(string())], currentVault: ['current_vault', optional(creditCardVaultSchema)], @@ -72,6 +60,18 @@ export const subscriptionGroupCreditCardSchema: Schema = expandoObjec optional(string()), ], snapDay: ['snap_day', optional(updateSubscriptionSnapDaySchema)], + initialBillingAt: ['initial_billing_at', optional(string())], + deferSignup: ['defer_signup', optional(boolean())], nextBillingAt: ['next_billing_at', optional(string())], + expiresAt: ['expires_at', optional(string())], paymentCollectionMethod: ['payment_collection_method', optional(string())], receivesInvoiceEmails: ['receives_invoice_emails', optional(boolean())], netTerms: ['net_terms', optional(updateSubscriptionNetTermsSchema)], diff --git a/src/models/usage.ts b/src/models/usage.ts index 992d68c2..c9a8c1c6 100644 --- a/src/models/usage.ts +++ b/src/models/usage.ts @@ -13,7 +13,10 @@ import { Schema, string, } from '../schema'; -import { UsageQuantity, usageQuantitySchema } from './containers/usageQuantity'; +import { + UsageQuantity, + usageQuantitySchema, +} from './containers/usageQuantity'; export interface Usage { id?: bigint; diff --git a/tsconfig.base.json b/tsconfig.base.json index ed7c2121..c827c229 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -3,6 +3,7 @@ "compilerOptions": { "importHelpers": true, "declaration": true, + "declarationMap": true, "sourceMap": true, "rootDir": "./src", "strict": true, From 011e1b652266a8470c87689c1b0d241a38eb1e1b Mon Sep 17 00:00:00 2001 From: Lukasz Bandzarewicz Date: Thu, 17 Jul 2025 13:40:07 +0200 Subject: [PATCH 2/2] Refresh pnpm lock --- pnpm-lock.yaml | 83 +++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 66 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7fa8f30..96272c3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,12 @@ importers: jest: specifier: ^29.4.3 version: 29.7.0 + rimraf: + specifier: ^3.0.2 + version: 3.0.2 ts-jest: - specifier: ^29.0.5 - version: 29.2.5(@babel/core@7.24.7)(jest@29.7.0)(typescript@4.9.5) + specifier: 29.2.6 + version: 29.2.6(@babel/core@7.24.7)(jest@29.7.0)(typescript@4.9.5) tslib: specifier: ^2.5.0 version: 2.8.1 @@ -1634,25 +1637,6 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /create-jest@29.7.0: - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0 - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - /create-jest@29.7.0(@types/node@20.14.9): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2525,10 +2509,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0 + create-jest: 29.7.0(@types/node@20.14.9) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0 + jest-config: 29.7.0(@types/node@20.14.9) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -2567,45 +2551,6 @@ packages: - ts-node dev: true - /jest-config@29.7.0: - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.24.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.7 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - /jest-config@29.7.0(@types/node@20.14.9): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2876,7 +2821,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color dev: true @@ -3524,6 +3469,12 @@ packages: hasBin: true dev: true + /semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} + engines: {node: '>=10'} + hasBin: true + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3754,8 +3705,8 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-jest@29.2.5(@babel/core@7.24.7)(jest@29.7.0)(typescript@4.9.5): - resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + /ts-jest@29.2.6(@babel/core@7.24.7)(jest@29.7.0)(typescript@4.9.5): + resolution: {integrity: sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3787,7 +3738,7 @@ packages: json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.6.3 + semver: 7.7.2 typescript: 4.9.5 yargs-parser: 21.1.1 dev: true