@stigg/typescript 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/LICENSE +201 -0
- package/README.md +362 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +186 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +186 -0
- package/client.d.ts.map +1 -0
- package/client.js +469 -0
- package/client.js.map +1 -0
- package/client.mjs +465 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +55 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +55 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +115 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +109 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +148 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +7 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -0
- package/resources/v1/coupons.d.mts +294 -0
- package/resources/v1/coupons.d.mts.map +1 -0
- package/resources/v1/coupons.d.ts +294 -0
- package/resources/v1/coupons.d.ts.map +1 -0
- package/resources/v1/coupons.js +28 -0
- package/resources/v1/coupons.js.map +1 -0
- package/resources/v1/coupons.mjs +24 -0
- package/resources/v1/coupons.mjs.map +1 -0
- package/resources/v1/customers/customers.d.mts +352 -0
- package/resources/v1/customers/customers.d.mts.map +1 -0
- package/resources/v1/customers/customers.d.ts +352 -0
- package/resources/v1/customers/customers.d.ts.map +1 -0
- package/resources/v1/customers/customers.js +58 -0
- package/resources/v1/customers/customers.js.map +1 -0
- package/resources/v1/customers/customers.mjs +53 -0
- package/resources/v1/customers/customers.mjs.map +1 -0
- package/resources/v1/customers/index.d.mts +4 -0
- package/resources/v1/customers/index.d.mts.map +1 -0
- package/resources/v1/customers/index.d.ts +4 -0
- package/resources/v1/customers/index.d.ts.map +1 -0
- package/resources/v1/customers/index.js +11 -0
- package/resources/v1/customers/index.js.map +1 -0
- package/resources/v1/customers/index.mjs +5 -0
- package/resources/v1/customers/index.mjs.map +1 -0
- package/resources/v1/customers/payment-method.d.mts +33 -0
- package/resources/v1/customers/payment-method.d.mts.map +1 -0
- package/resources/v1/customers/payment-method.d.ts +33 -0
- package/resources/v1/customers/payment-method.d.ts.map +1 -0
- package/resources/v1/customers/payment-method.js +22 -0
- package/resources/v1/customers/payment-method.js.map +1 -0
- package/resources/v1/customers/payment-method.mjs +18 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -0
- package/resources/v1/customers/usage.d.mts +98 -0
- package/resources/v1/customers/usage.d.mts.map +1 -0
- package/resources/v1/customers/usage.d.ts +98 -0
- package/resources/v1/customers/usage.d.ts.map +1 -0
- package/resources/v1/customers/usage.js +20 -0
- package/resources/v1/customers/usage.js.map +1 -0
- package/resources/v1/customers/usage.mjs +16 -0
- package/resources/v1/customers/usage.mjs.map +1 -0
- package/resources/v1/customers.d.mts +2 -0
- package/resources/v1/customers.d.mts.map +1 -0
- package/resources/v1/customers.d.ts +2 -0
- package/resources/v1/customers.d.ts.map +1 -0
- package/resources/v1/customers.js +6 -0
- package/resources/v1/customers.js.map +1 -0
- package/resources/v1/customers.mjs +3 -0
- package/resources/v1/customers.mjs.map +1 -0
- package/resources/v1/index.d.mts +5 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +5 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +13 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +6 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/v1/subscriptions/future-update.d.mts +39 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -0
- package/resources/v1/subscriptions/future-update.d.ts +39 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -0
- package/resources/v1/subscriptions/future-update.js +22 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -0
- package/resources/v1/subscriptions/future-update.mjs +18 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -0
- package/resources/v1/subscriptions/index.d.mts +3 -0
- package/resources/v1/subscriptions/index.d.mts.map +1 -0
- package/resources/v1/subscriptions/index.d.ts +3 -0
- package/resources/v1/subscriptions/index.d.ts.map +1 -0
- package/resources/v1/subscriptions/index.js +9 -0
- package/resources/v1/subscriptions/index.js.map +1 -0
- package/resources/v1/subscriptions/index.mjs +4 -0
- package/resources/v1/subscriptions/index.mjs.map +1 -0
- package/resources/v1/subscriptions/subscriptions.d.mts +949 -0
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -0
- package/resources/v1/subscriptions/subscriptions.d.ts +949 -0
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -0
- package/resources/v1/subscriptions/subscriptions.js +60 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -0
- package/resources/v1/subscriptions/subscriptions.mjs +55 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -0
- package/resources/v1/subscriptions.d.mts +2 -0
- package/resources/v1/subscriptions.d.mts.map +1 -0
- package/resources/v1/subscriptions.d.ts +2 -0
- package/resources/v1/subscriptions.d.ts.map +1 -0
- package/resources/v1/subscriptions.js +6 -0
- package/resources/v1/subscriptions.js.map +1 -0
- package/resources/v1/subscriptions.mjs +3 -0
- package/resources/v1/subscriptions.mjs.map +1 -0
- package/resources/v1/v1.d.mts +161 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +161 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +37 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +32 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +6 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +765 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +177 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +23 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/index.ts +9 -0
- package/src/resources/v1/coupons.ts +843 -0
- package/src/resources/v1/customers/customers.ts +489 -0
- package/src/resources/v1/customers/index.ts +12 -0
- package/src/resources/v1/customers/payment-method.ts +177 -0
- package/src/resources/v1/customers/usage.ts +132 -0
- package/src/resources/v1/customers.ts +3 -0
- package/src/resources/v1/index.ts +41 -0
- package/src/resources/v1/subscriptions/future-update.ts +58 -0
- package/src/resources/v1/subscriptions/index.ts +23 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +1464 -0
- package/src/resources/v1/subscriptions.ts +3 -0
- package/src/resources/v1/v1.ts +264 -0
- package/src/resources/v1.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Coupons extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new Coupon
|
|
11
|
+
*/
|
|
12
|
+
create(body: CouponCreateParams, options?: RequestOptions): APIPromise<CouponCreateResponse> {
|
|
13
|
+
return this._client.post('/api/v1/coupons', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Get a single Coupon by id
|
|
18
|
+
*/
|
|
19
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<CouponRetrieveResponse> {
|
|
20
|
+
return this._client.get(path`/api/v1/coupons/${id}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get a list of Coupons
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
query: CouponListParams | null | undefined = {},
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): APIPromise<CouponListResponse> {
|
|
30
|
+
return this._client.get('/api/v1/coupons', { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CouponCreateResponse {
|
|
35
|
+
data: CouponCreateResponse.Data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export namespace CouponCreateResponse {
|
|
39
|
+
export interface Data {
|
|
40
|
+
/**
|
|
41
|
+
* The unique identifier for the entity
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Fixed amount discounts in different currencies
|
|
47
|
+
*/
|
|
48
|
+
amountsOff: Array<Data.AmountsOff> | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The unique identifier for the entity in the billing provider
|
|
52
|
+
*/
|
|
53
|
+
billingId: string | null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The URL to the entity in the billing provider
|
|
57
|
+
*/
|
|
58
|
+
billingLinkUrl: string | null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Timestamp of when the record was created
|
|
62
|
+
*/
|
|
63
|
+
createdAt: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Description of the coupon
|
|
67
|
+
*/
|
|
68
|
+
description: string | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Duration of the coupon validity in months
|
|
72
|
+
*/
|
|
73
|
+
durationInMonths: number | null;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Name of the coupon
|
|
77
|
+
*/
|
|
78
|
+
name: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Percentage discount off the original price
|
|
82
|
+
*/
|
|
83
|
+
percentOff: number | null;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The source of the coupon
|
|
87
|
+
*/
|
|
88
|
+
source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE' | null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Current status of the coupon
|
|
92
|
+
*/
|
|
93
|
+
status: 'ACTIVE' | 'ARCHIVED';
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Type of the coupon (percentage or fixed amount)
|
|
97
|
+
*/
|
|
98
|
+
type: 'FIXED' | 'PERCENTAGE';
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Timestamp of when the record was last updated
|
|
102
|
+
*/
|
|
103
|
+
updatedAt: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export namespace Data {
|
|
107
|
+
export interface AmountsOff {
|
|
108
|
+
/**
|
|
109
|
+
* The price amount
|
|
110
|
+
*/
|
|
111
|
+
amount: number;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The price currency
|
|
115
|
+
*/
|
|
116
|
+
currency:
|
|
117
|
+
| 'usd'
|
|
118
|
+
| 'aed'
|
|
119
|
+
| 'all'
|
|
120
|
+
| 'amd'
|
|
121
|
+
| 'ang'
|
|
122
|
+
| 'aud'
|
|
123
|
+
| 'awg'
|
|
124
|
+
| 'azn'
|
|
125
|
+
| 'bam'
|
|
126
|
+
| 'bbd'
|
|
127
|
+
| 'bdt'
|
|
128
|
+
| 'bgn'
|
|
129
|
+
| 'bif'
|
|
130
|
+
| 'bmd'
|
|
131
|
+
| 'bnd'
|
|
132
|
+
| 'bsd'
|
|
133
|
+
| 'bwp'
|
|
134
|
+
| 'byn'
|
|
135
|
+
| 'bzd'
|
|
136
|
+
| 'brl'
|
|
137
|
+
| 'cad'
|
|
138
|
+
| 'cdf'
|
|
139
|
+
| 'chf'
|
|
140
|
+
| 'cny'
|
|
141
|
+
| 'czk'
|
|
142
|
+
| 'dkk'
|
|
143
|
+
| 'dop'
|
|
144
|
+
| 'dzd'
|
|
145
|
+
| 'egp'
|
|
146
|
+
| 'etb'
|
|
147
|
+
| 'eur'
|
|
148
|
+
| 'fjd'
|
|
149
|
+
| 'gbp'
|
|
150
|
+
| 'gel'
|
|
151
|
+
| 'gip'
|
|
152
|
+
| 'gmd'
|
|
153
|
+
| 'gyd'
|
|
154
|
+
| 'hkd'
|
|
155
|
+
| 'hrk'
|
|
156
|
+
| 'htg'
|
|
157
|
+
| 'idr'
|
|
158
|
+
| 'ils'
|
|
159
|
+
| 'inr'
|
|
160
|
+
| 'isk'
|
|
161
|
+
| 'jmd'
|
|
162
|
+
| 'jpy'
|
|
163
|
+
| 'kes'
|
|
164
|
+
| 'kgs'
|
|
165
|
+
| 'khr'
|
|
166
|
+
| 'kmf'
|
|
167
|
+
| 'krw'
|
|
168
|
+
| 'kyd'
|
|
169
|
+
| 'kzt'
|
|
170
|
+
| 'lbp'
|
|
171
|
+
| 'lkr'
|
|
172
|
+
| 'lrd'
|
|
173
|
+
| 'lsl'
|
|
174
|
+
| 'mad'
|
|
175
|
+
| 'mdl'
|
|
176
|
+
| 'mga'
|
|
177
|
+
| 'mkd'
|
|
178
|
+
| 'mmk'
|
|
179
|
+
| 'mnt'
|
|
180
|
+
| 'mop'
|
|
181
|
+
| 'mro'
|
|
182
|
+
| 'mvr'
|
|
183
|
+
| 'mwk'
|
|
184
|
+
| 'mxn'
|
|
185
|
+
| 'myr'
|
|
186
|
+
| 'mzn'
|
|
187
|
+
| 'nad'
|
|
188
|
+
| 'ngn'
|
|
189
|
+
| 'nok'
|
|
190
|
+
| 'npr'
|
|
191
|
+
| 'nzd'
|
|
192
|
+
| 'pgk'
|
|
193
|
+
| 'php'
|
|
194
|
+
| 'pkr'
|
|
195
|
+
| 'pln'
|
|
196
|
+
| 'qar'
|
|
197
|
+
| 'ron'
|
|
198
|
+
| 'rsd'
|
|
199
|
+
| 'rub'
|
|
200
|
+
| 'rwf'
|
|
201
|
+
| 'sar'
|
|
202
|
+
| 'sbd'
|
|
203
|
+
| 'scr'
|
|
204
|
+
| 'sek'
|
|
205
|
+
| 'sgd'
|
|
206
|
+
| 'sle'
|
|
207
|
+
| 'sll'
|
|
208
|
+
| 'sos'
|
|
209
|
+
| 'szl'
|
|
210
|
+
| 'thb'
|
|
211
|
+
| 'tjs'
|
|
212
|
+
| 'top'
|
|
213
|
+
| 'try'
|
|
214
|
+
| 'ttd'
|
|
215
|
+
| 'tzs'
|
|
216
|
+
| 'uah'
|
|
217
|
+
| 'uzs'
|
|
218
|
+
| 'vnd'
|
|
219
|
+
| 'vuv'
|
|
220
|
+
| 'wst'
|
|
221
|
+
| 'xaf'
|
|
222
|
+
| 'xcd'
|
|
223
|
+
| 'yer'
|
|
224
|
+
| 'zar'
|
|
225
|
+
| 'zmw'
|
|
226
|
+
| 'clp'
|
|
227
|
+
| 'djf'
|
|
228
|
+
| 'gnf'
|
|
229
|
+
| 'ugx'
|
|
230
|
+
| 'pyg'
|
|
231
|
+
| 'xof'
|
|
232
|
+
| 'xpf'
|
|
233
|
+
| null;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface CouponRetrieveResponse {
|
|
239
|
+
data: CouponRetrieveResponse.Data;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export namespace CouponRetrieveResponse {
|
|
243
|
+
export interface Data {
|
|
244
|
+
/**
|
|
245
|
+
* The unique identifier for the entity
|
|
246
|
+
*/
|
|
247
|
+
id: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Fixed amount discounts in different currencies
|
|
251
|
+
*/
|
|
252
|
+
amountsOff: Array<Data.AmountsOff> | null;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The unique identifier for the entity in the billing provider
|
|
256
|
+
*/
|
|
257
|
+
billingId: string | null;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The URL to the entity in the billing provider
|
|
261
|
+
*/
|
|
262
|
+
billingLinkUrl: string | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Timestamp of when the record was created
|
|
266
|
+
*/
|
|
267
|
+
createdAt: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Description of the coupon
|
|
271
|
+
*/
|
|
272
|
+
description: string | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Duration of the coupon validity in months
|
|
276
|
+
*/
|
|
277
|
+
durationInMonths: number | null;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Name of the coupon
|
|
281
|
+
*/
|
|
282
|
+
name: string;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Percentage discount off the original price
|
|
286
|
+
*/
|
|
287
|
+
percentOff: number | null;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* The source of the coupon
|
|
291
|
+
*/
|
|
292
|
+
source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE' | null;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Current status of the coupon
|
|
296
|
+
*/
|
|
297
|
+
status: 'ACTIVE' | 'ARCHIVED';
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Type of the coupon (percentage or fixed amount)
|
|
301
|
+
*/
|
|
302
|
+
type: 'FIXED' | 'PERCENTAGE';
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Timestamp of when the record was last updated
|
|
306
|
+
*/
|
|
307
|
+
updatedAt: string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export namespace Data {
|
|
311
|
+
export interface AmountsOff {
|
|
312
|
+
/**
|
|
313
|
+
* The price amount
|
|
314
|
+
*/
|
|
315
|
+
amount: number;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* The price currency
|
|
319
|
+
*/
|
|
320
|
+
currency:
|
|
321
|
+
| 'usd'
|
|
322
|
+
| 'aed'
|
|
323
|
+
| 'all'
|
|
324
|
+
| 'amd'
|
|
325
|
+
| 'ang'
|
|
326
|
+
| 'aud'
|
|
327
|
+
| 'awg'
|
|
328
|
+
| 'azn'
|
|
329
|
+
| 'bam'
|
|
330
|
+
| 'bbd'
|
|
331
|
+
| 'bdt'
|
|
332
|
+
| 'bgn'
|
|
333
|
+
| 'bif'
|
|
334
|
+
| 'bmd'
|
|
335
|
+
| 'bnd'
|
|
336
|
+
| 'bsd'
|
|
337
|
+
| 'bwp'
|
|
338
|
+
| 'byn'
|
|
339
|
+
| 'bzd'
|
|
340
|
+
| 'brl'
|
|
341
|
+
| 'cad'
|
|
342
|
+
| 'cdf'
|
|
343
|
+
| 'chf'
|
|
344
|
+
| 'cny'
|
|
345
|
+
| 'czk'
|
|
346
|
+
| 'dkk'
|
|
347
|
+
| 'dop'
|
|
348
|
+
| 'dzd'
|
|
349
|
+
| 'egp'
|
|
350
|
+
| 'etb'
|
|
351
|
+
| 'eur'
|
|
352
|
+
| 'fjd'
|
|
353
|
+
| 'gbp'
|
|
354
|
+
| 'gel'
|
|
355
|
+
| 'gip'
|
|
356
|
+
| 'gmd'
|
|
357
|
+
| 'gyd'
|
|
358
|
+
| 'hkd'
|
|
359
|
+
| 'hrk'
|
|
360
|
+
| 'htg'
|
|
361
|
+
| 'idr'
|
|
362
|
+
| 'ils'
|
|
363
|
+
| 'inr'
|
|
364
|
+
| 'isk'
|
|
365
|
+
| 'jmd'
|
|
366
|
+
| 'jpy'
|
|
367
|
+
| 'kes'
|
|
368
|
+
| 'kgs'
|
|
369
|
+
| 'khr'
|
|
370
|
+
| 'kmf'
|
|
371
|
+
| 'krw'
|
|
372
|
+
| 'kyd'
|
|
373
|
+
| 'kzt'
|
|
374
|
+
| 'lbp'
|
|
375
|
+
| 'lkr'
|
|
376
|
+
| 'lrd'
|
|
377
|
+
| 'lsl'
|
|
378
|
+
| 'mad'
|
|
379
|
+
| 'mdl'
|
|
380
|
+
| 'mga'
|
|
381
|
+
| 'mkd'
|
|
382
|
+
| 'mmk'
|
|
383
|
+
| 'mnt'
|
|
384
|
+
| 'mop'
|
|
385
|
+
| 'mro'
|
|
386
|
+
| 'mvr'
|
|
387
|
+
| 'mwk'
|
|
388
|
+
| 'mxn'
|
|
389
|
+
| 'myr'
|
|
390
|
+
| 'mzn'
|
|
391
|
+
| 'nad'
|
|
392
|
+
| 'ngn'
|
|
393
|
+
| 'nok'
|
|
394
|
+
| 'npr'
|
|
395
|
+
| 'nzd'
|
|
396
|
+
| 'pgk'
|
|
397
|
+
| 'php'
|
|
398
|
+
| 'pkr'
|
|
399
|
+
| 'pln'
|
|
400
|
+
| 'qar'
|
|
401
|
+
| 'ron'
|
|
402
|
+
| 'rsd'
|
|
403
|
+
| 'rub'
|
|
404
|
+
| 'rwf'
|
|
405
|
+
| 'sar'
|
|
406
|
+
| 'sbd'
|
|
407
|
+
| 'scr'
|
|
408
|
+
| 'sek'
|
|
409
|
+
| 'sgd'
|
|
410
|
+
| 'sle'
|
|
411
|
+
| 'sll'
|
|
412
|
+
| 'sos'
|
|
413
|
+
| 'szl'
|
|
414
|
+
| 'thb'
|
|
415
|
+
| 'tjs'
|
|
416
|
+
| 'top'
|
|
417
|
+
| 'try'
|
|
418
|
+
| 'ttd'
|
|
419
|
+
| 'tzs'
|
|
420
|
+
| 'uah'
|
|
421
|
+
| 'uzs'
|
|
422
|
+
| 'vnd'
|
|
423
|
+
| 'vuv'
|
|
424
|
+
| 'wst'
|
|
425
|
+
| 'xaf'
|
|
426
|
+
| 'xcd'
|
|
427
|
+
| 'yer'
|
|
428
|
+
| 'zar'
|
|
429
|
+
| 'zmw'
|
|
430
|
+
| 'clp'
|
|
431
|
+
| 'djf'
|
|
432
|
+
| 'gnf'
|
|
433
|
+
| 'ugx'
|
|
434
|
+
| 'pyg'
|
|
435
|
+
| 'xof'
|
|
436
|
+
| 'xpf'
|
|
437
|
+
| null;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface CouponListResponse {
|
|
443
|
+
data: Array<CouponListResponse.Data>;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export namespace CouponListResponse {
|
|
447
|
+
export interface Data {
|
|
448
|
+
/**
|
|
449
|
+
* The unique identifier for the entity
|
|
450
|
+
*/
|
|
451
|
+
id: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Fixed amount discounts in different currencies
|
|
455
|
+
*/
|
|
456
|
+
amountsOff: Array<Data.AmountsOff> | null;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* The unique identifier for the entity in the billing provider
|
|
460
|
+
*/
|
|
461
|
+
billingId: string | null;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* The URL to the entity in the billing provider
|
|
465
|
+
*/
|
|
466
|
+
billingLinkUrl: string | null;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Timestamp of when the record was created
|
|
470
|
+
*/
|
|
471
|
+
createdAt: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Cursor ID for query pagination
|
|
475
|
+
*/
|
|
476
|
+
cursorId: string;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Description of the coupon
|
|
480
|
+
*/
|
|
481
|
+
description: string | null;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Duration of the coupon validity in months
|
|
485
|
+
*/
|
|
486
|
+
durationInMonths: number | null;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Name of the coupon
|
|
490
|
+
*/
|
|
491
|
+
name: string;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Percentage discount off the original price
|
|
495
|
+
*/
|
|
496
|
+
percentOff: number | null;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The source of the coupon
|
|
500
|
+
*/
|
|
501
|
+
source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE' | null;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Current status of the coupon
|
|
505
|
+
*/
|
|
506
|
+
status: 'ACTIVE' | 'ARCHIVED';
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Type of the coupon (percentage or fixed amount)
|
|
510
|
+
*/
|
|
511
|
+
type: 'FIXED' | 'PERCENTAGE';
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Timestamp of when the record was last updated
|
|
515
|
+
*/
|
|
516
|
+
updatedAt: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export namespace Data {
|
|
520
|
+
export interface AmountsOff {
|
|
521
|
+
/**
|
|
522
|
+
* The price amount
|
|
523
|
+
*/
|
|
524
|
+
amount: number;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* The price currency
|
|
528
|
+
*/
|
|
529
|
+
currency:
|
|
530
|
+
| 'usd'
|
|
531
|
+
| 'aed'
|
|
532
|
+
| 'all'
|
|
533
|
+
| 'amd'
|
|
534
|
+
| 'ang'
|
|
535
|
+
| 'aud'
|
|
536
|
+
| 'awg'
|
|
537
|
+
| 'azn'
|
|
538
|
+
| 'bam'
|
|
539
|
+
| 'bbd'
|
|
540
|
+
| 'bdt'
|
|
541
|
+
| 'bgn'
|
|
542
|
+
| 'bif'
|
|
543
|
+
| 'bmd'
|
|
544
|
+
| 'bnd'
|
|
545
|
+
| 'bsd'
|
|
546
|
+
| 'bwp'
|
|
547
|
+
| 'byn'
|
|
548
|
+
| 'bzd'
|
|
549
|
+
| 'brl'
|
|
550
|
+
| 'cad'
|
|
551
|
+
| 'cdf'
|
|
552
|
+
| 'chf'
|
|
553
|
+
| 'cny'
|
|
554
|
+
| 'czk'
|
|
555
|
+
| 'dkk'
|
|
556
|
+
| 'dop'
|
|
557
|
+
| 'dzd'
|
|
558
|
+
| 'egp'
|
|
559
|
+
| 'etb'
|
|
560
|
+
| 'eur'
|
|
561
|
+
| 'fjd'
|
|
562
|
+
| 'gbp'
|
|
563
|
+
| 'gel'
|
|
564
|
+
| 'gip'
|
|
565
|
+
| 'gmd'
|
|
566
|
+
| 'gyd'
|
|
567
|
+
| 'hkd'
|
|
568
|
+
| 'hrk'
|
|
569
|
+
| 'htg'
|
|
570
|
+
| 'idr'
|
|
571
|
+
| 'ils'
|
|
572
|
+
| 'inr'
|
|
573
|
+
| 'isk'
|
|
574
|
+
| 'jmd'
|
|
575
|
+
| 'jpy'
|
|
576
|
+
| 'kes'
|
|
577
|
+
| 'kgs'
|
|
578
|
+
| 'khr'
|
|
579
|
+
| 'kmf'
|
|
580
|
+
| 'krw'
|
|
581
|
+
| 'kyd'
|
|
582
|
+
| 'kzt'
|
|
583
|
+
| 'lbp'
|
|
584
|
+
| 'lkr'
|
|
585
|
+
| 'lrd'
|
|
586
|
+
| 'lsl'
|
|
587
|
+
| 'mad'
|
|
588
|
+
| 'mdl'
|
|
589
|
+
| 'mga'
|
|
590
|
+
| 'mkd'
|
|
591
|
+
| 'mmk'
|
|
592
|
+
| 'mnt'
|
|
593
|
+
| 'mop'
|
|
594
|
+
| 'mro'
|
|
595
|
+
| 'mvr'
|
|
596
|
+
| 'mwk'
|
|
597
|
+
| 'mxn'
|
|
598
|
+
| 'myr'
|
|
599
|
+
| 'mzn'
|
|
600
|
+
| 'nad'
|
|
601
|
+
| 'ngn'
|
|
602
|
+
| 'nok'
|
|
603
|
+
| 'npr'
|
|
604
|
+
| 'nzd'
|
|
605
|
+
| 'pgk'
|
|
606
|
+
| 'php'
|
|
607
|
+
| 'pkr'
|
|
608
|
+
| 'pln'
|
|
609
|
+
| 'qar'
|
|
610
|
+
| 'ron'
|
|
611
|
+
| 'rsd'
|
|
612
|
+
| 'rub'
|
|
613
|
+
| 'rwf'
|
|
614
|
+
| 'sar'
|
|
615
|
+
| 'sbd'
|
|
616
|
+
| 'scr'
|
|
617
|
+
| 'sek'
|
|
618
|
+
| 'sgd'
|
|
619
|
+
| 'sle'
|
|
620
|
+
| 'sll'
|
|
621
|
+
| 'sos'
|
|
622
|
+
| 'szl'
|
|
623
|
+
| 'thb'
|
|
624
|
+
| 'tjs'
|
|
625
|
+
| 'top'
|
|
626
|
+
| 'try'
|
|
627
|
+
| 'ttd'
|
|
628
|
+
| 'tzs'
|
|
629
|
+
| 'uah'
|
|
630
|
+
| 'uzs'
|
|
631
|
+
| 'vnd'
|
|
632
|
+
| 'vuv'
|
|
633
|
+
| 'wst'
|
|
634
|
+
| 'xaf'
|
|
635
|
+
| 'xcd'
|
|
636
|
+
| 'yer'
|
|
637
|
+
| 'zar'
|
|
638
|
+
| 'zmw'
|
|
639
|
+
| 'clp'
|
|
640
|
+
| 'djf'
|
|
641
|
+
| 'gnf'
|
|
642
|
+
| 'ugx'
|
|
643
|
+
| 'pyg'
|
|
644
|
+
| 'xof'
|
|
645
|
+
| 'xpf'
|
|
646
|
+
| null;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export interface CouponCreateParams {
|
|
652
|
+
/**
|
|
653
|
+
* The unique identifier for the entity
|
|
654
|
+
*/
|
|
655
|
+
id: string;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Fixed amount discounts in different currencies
|
|
659
|
+
*/
|
|
660
|
+
amountsOff: Array<CouponCreateParams.AmountsOff> | null;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Description of the coupon
|
|
664
|
+
*/
|
|
665
|
+
description: string | null;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Duration of the coupon validity in months
|
|
669
|
+
*/
|
|
670
|
+
durationInMonths: number | null;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Name of the coupon
|
|
674
|
+
*/
|
|
675
|
+
name: string;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Percentage discount off the original price
|
|
679
|
+
*/
|
|
680
|
+
percentOff: number | null;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Metadata associated with the entity
|
|
684
|
+
*/
|
|
685
|
+
additionalMetaData?: unknown;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export namespace CouponCreateParams {
|
|
689
|
+
export interface AmountsOff {
|
|
690
|
+
/**
|
|
691
|
+
* The price amount
|
|
692
|
+
*/
|
|
693
|
+
amount: number;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* The price currency
|
|
697
|
+
*/
|
|
698
|
+
currency:
|
|
699
|
+
| 'usd'
|
|
700
|
+
| 'aed'
|
|
701
|
+
| 'all'
|
|
702
|
+
| 'amd'
|
|
703
|
+
| 'ang'
|
|
704
|
+
| 'aud'
|
|
705
|
+
| 'awg'
|
|
706
|
+
| 'azn'
|
|
707
|
+
| 'bam'
|
|
708
|
+
| 'bbd'
|
|
709
|
+
| 'bdt'
|
|
710
|
+
| 'bgn'
|
|
711
|
+
| 'bif'
|
|
712
|
+
| 'bmd'
|
|
713
|
+
| 'bnd'
|
|
714
|
+
| 'bsd'
|
|
715
|
+
| 'bwp'
|
|
716
|
+
| 'byn'
|
|
717
|
+
| 'bzd'
|
|
718
|
+
| 'brl'
|
|
719
|
+
| 'cad'
|
|
720
|
+
| 'cdf'
|
|
721
|
+
| 'chf'
|
|
722
|
+
| 'cny'
|
|
723
|
+
| 'czk'
|
|
724
|
+
| 'dkk'
|
|
725
|
+
| 'dop'
|
|
726
|
+
| 'dzd'
|
|
727
|
+
| 'egp'
|
|
728
|
+
| 'etb'
|
|
729
|
+
| 'eur'
|
|
730
|
+
| 'fjd'
|
|
731
|
+
| 'gbp'
|
|
732
|
+
| 'gel'
|
|
733
|
+
| 'gip'
|
|
734
|
+
| 'gmd'
|
|
735
|
+
| 'gyd'
|
|
736
|
+
| 'hkd'
|
|
737
|
+
| 'hrk'
|
|
738
|
+
| 'htg'
|
|
739
|
+
| 'idr'
|
|
740
|
+
| 'ils'
|
|
741
|
+
| 'inr'
|
|
742
|
+
| 'isk'
|
|
743
|
+
| 'jmd'
|
|
744
|
+
| 'jpy'
|
|
745
|
+
| 'kes'
|
|
746
|
+
| 'kgs'
|
|
747
|
+
| 'khr'
|
|
748
|
+
| 'kmf'
|
|
749
|
+
| 'krw'
|
|
750
|
+
| 'kyd'
|
|
751
|
+
| 'kzt'
|
|
752
|
+
| 'lbp'
|
|
753
|
+
| 'lkr'
|
|
754
|
+
| 'lrd'
|
|
755
|
+
| 'lsl'
|
|
756
|
+
| 'mad'
|
|
757
|
+
| 'mdl'
|
|
758
|
+
| 'mga'
|
|
759
|
+
| 'mkd'
|
|
760
|
+
| 'mmk'
|
|
761
|
+
| 'mnt'
|
|
762
|
+
| 'mop'
|
|
763
|
+
| 'mro'
|
|
764
|
+
| 'mvr'
|
|
765
|
+
| 'mwk'
|
|
766
|
+
| 'mxn'
|
|
767
|
+
| 'myr'
|
|
768
|
+
| 'mzn'
|
|
769
|
+
| 'nad'
|
|
770
|
+
| 'ngn'
|
|
771
|
+
| 'nok'
|
|
772
|
+
| 'npr'
|
|
773
|
+
| 'nzd'
|
|
774
|
+
| 'pgk'
|
|
775
|
+
| 'php'
|
|
776
|
+
| 'pkr'
|
|
777
|
+
| 'pln'
|
|
778
|
+
| 'qar'
|
|
779
|
+
| 'ron'
|
|
780
|
+
| 'rsd'
|
|
781
|
+
| 'rub'
|
|
782
|
+
| 'rwf'
|
|
783
|
+
| 'sar'
|
|
784
|
+
| 'sbd'
|
|
785
|
+
| 'scr'
|
|
786
|
+
| 'sek'
|
|
787
|
+
| 'sgd'
|
|
788
|
+
| 'sle'
|
|
789
|
+
| 'sll'
|
|
790
|
+
| 'sos'
|
|
791
|
+
| 'szl'
|
|
792
|
+
| 'thb'
|
|
793
|
+
| 'tjs'
|
|
794
|
+
| 'top'
|
|
795
|
+
| 'try'
|
|
796
|
+
| 'ttd'
|
|
797
|
+
| 'tzs'
|
|
798
|
+
| 'uah'
|
|
799
|
+
| 'uzs'
|
|
800
|
+
| 'vnd'
|
|
801
|
+
| 'vuv'
|
|
802
|
+
| 'wst'
|
|
803
|
+
| 'xaf'
|
|
804
|
+
| 'xcd'
|
|
805
|
+
| 'yer'
|
|
806
|
+
| 'zar'
|
|
807
|
+
| 'zmw'
|
|
808
|
+
| 'clp'
|
|
809
|
+
| 'djf'
|
|
810
|
+
| 'gnf'
|
|
811
|
+
| 'ugx'
|
|
812
|
+
| 'pyg'
|
|
813
|
+
| 'xof'
|
|
814
|
+
| 'xpf';
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export interface CouponListParams {
|
|
819
|
+
/**
|
|
820
|
+
* Ending before this UUID for pagination
|
|
821
|
+
*/
|
|
822
|
+
endingBefore?: string;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Items per page
|
|
826
|
+
*/
|
|
827
|
+
limit?: number;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Starting after this UUID for pagination
|
|
831
|
+
*/
|
|
832
|
+
startingAfter?: string;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export declare namespace Coupons {
|
|
836
|
+
export {
|
|
837
|
+
type CouponCreateResponse as CouponCreateResponse,
|
|
838
|
+
type CouponRetrieveResponse as CouponRetrieveResponse,
|
|
839
|
+
type CouponListResponse as CouponListResponse,
|
|
840
|
+
type CouponCreateParams as CouponCreateParams,
|
|
841
|
+
type CouponListParams as CouponListParams,
|
|
842
|
+
};
|
|
843
|
+
}
|