@gofynd/fdk-client-javascript 1.0.2 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +557 -1279
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +14453 -17192
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3438 -4172
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3400 -5361
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +38 -38
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +100 -100
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +84 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +581 -581
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -1,905 +1,579 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class BillingModel {
|
|
4
|
-
static
|
|
4
|
+
static BadRequest() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
next_id: Joi.string().allow(""),
|
|
9
|
-
|
|
10
|
-
has_previous: Joi.boolean(),
|
|
11
|
-
|
|
12
|
-
has_next: Joi.boolean(),
|
|
13
|
-
|
|
14
|
-
current: Joi.number(),
|
|
15
|
-
|
|
16
|
-
type: Joi.string().allow("").required(),
|
|
17
|
-
|
|
18
|
-
size: Joi.number(),
|
|
6
|
+
message: Joi.string().allow(""),
|
|
19
7
|
});
|
|
20
8
|
}
|
|
21
|
-
|
|
22
|
-
static UnauthenticatedUser() {
|
|
9
|
+
static CancelSubscriptionReq() {
|
|
23
10
|
return Joi.object({
|
|
24
|
-
|
|
11
|
+
product_suite: Joi.string().allow(""),
|
|
12
|
+
subscription_id: Joi.string().allow(""),
|
|
13
|
+
type: Joi.string().allow(""),
|
|
14
|
+
unique_id: Joi.string().allow(""),
|
|
25
15
|
});
|
|
26
16
|
}
|
|
27
|
-
|
|
28
|
-
static UnauthenticatedApplication() {
|
|
17
|
+
static CancelSubscriptionRes() {
|
|
29
18
|
return Joi.object({
|
|
30
|
-
|
|
19
|
+
data: BillingModel.Subscription(),
|
|
20
|
+
success: Joi.boolean(),
|
|
31
21
|
});
|
|
32
22
|
}
|
|
33
|
-
|
|
34
|
-
static BadRequest() {
|
|
23
|
+
static ChargeLineItem() {
|
|
35
24
|
return Joi.object({
|
|
36
|
-
|
|
25
|
+
capped_amount: Joi.number(),
|
|
26
|
+
is_test: Joi.boolean(),
|
|
27
|
+
metadata: Joi.any(),
|
|
28
|
+
name: Joi.string().allow("").required(),
|
|
29
|
+
price: BillingModel.EntityChargePrice().required(),
|
|
30
|
+
pricing_type: Joi.string().allow("").required(),
|
|
31
|
+
recurring: BillingModel.EntityChargeRecurring(),
|
|
32
|
+
term: Joi.string().allow("").required(),
|
|
33
|
+
trial_days: Joi.number(),
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
|
-
|
|
40
|
-
static ResourceNotFound() {
|
|
36
|
+
static CheckValidityResponse() {
|
|
41
37
|
return Joi.object({
|
|
42
|
-
|
|
38
|
+
discount_amount: Joi.number(),
|
|
39
|
+
is_valid: Joi.boolean(),
|
|
43
40
|
});
|
|
44
41
|
}
|
|
45
|
-
|
|
46
|
-
static InternalServerError() {
|
|
42
|
+
static CreateSubscriptionCharge() {
|
|
47
43
|
return Joi.object({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
is_test: Joi.boolean(),
|
|
45
|
+
line_items: Joi.array().items(BillingModel.ChargeLineItem()).required(),
|
|
46
|
+
name: Joi.string().allow("").required(),
|
|
47
|
+
return_url: Joi.string().allow("").required(),
|
|
48
|
+
trial_days: Joi.number(),
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
|
-
|
|
54
|
-
static CheckValidityResponse() {
|
|
51
|
+
static CreateSubscriptionResponse() {
|
|
55
52
|
return Joi.object({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
discount_amount: Joi.number(),
|
|
53
|
+
confirm_url: Joi.string().allow(""),
|
|
54
|
+
subscription: BillingModel.EntitySubscription(),
|
|
59
55
|
});
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
static PlanRecurring() {
|
|
57
|
+
static CurrentPeriod() {
|
|
63
58
|
return Joi.object({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
interval_count: Joi.number(),
|
|
59
|
+
end_date: Joi.string().allow(""),
|
|
60
|
+
start_date: Joi.string().allow(""),
|
|
67
61
|
});
|
|
68
62
|
}
|
|
69
|
-
|
|
70
|
-
static Plan() {
|
|
63
|
+
static DetailedPlan() {
|
|
71
64
|
return Joi.object({
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
79
|
-
|
|
65
|
+
_id: Joi.string().allow(""),
|
|
66
|
+
addons: Joi.array().items(Joi.string().allow("")),
|
|
67
|
+
amount: Joi.number(),
|
|
68
|
+
components: Joi.array().items(BillingModel.DetailedPlanComponents()),
|
|
69
|
+
country: Joi.string().allow(""),
|
|
70
|
+
created_at: Joi.string().allow(""),
|
|
80
71
|
currency: Joi.string().allow(""),
|
|
81
|
-
|
|
72
|
+
description: Joi.string().allow(""),
|
|
82
73
|
is_active: Joi.boolean(),
|
|
83
|
-
|
|
74
|
+
is_trial_plan: Joi.boolean(),
|
|
84
75
|
is_visible: Joi.boolean(),
|
|
85
|
-
|
|
86
|
-
trial_period: Joi.number(),
|
|
87
|
-
|
|
88
|
-
addons: Joi.array().items(Joi.string().allow("")),
|
|
89
|
-
|
|
90
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
91
|
-
|
|
92
|
-
type: Joi.string().allow(""),
|
|
93
|
-
|
|
94
|
-
country: Joi.string().allow(""),
|
|
95
|
-
|
|
96
|
-
_id: Joi.string().allow(""),
|
|
97
|
-
|
|
76
|
+
modified_at: Joi.string().allow(""),
|
|
98
77
|
name: Joi.string().allow(""),
|
|
99
|
-
|
|
100
|
-
description: Joi.string().allow(""),
|
|
101
|
-
|
|
102
|
-
amount: Joi.number(),
|
|
103
|
-
|
|
78
|
+
plan_group: Joi.string().allow(""),
|
|
104
79
|
product_suite_id: Joi.string().allow(""),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
80
|
+
recurring: BillingModel.PlanRecurring(),
|
|
81
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
82
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
83
|
+
trial_period: Joi.number(),
|
|
84
|
+
type: Joi.string().allow(""),
|
|
109
85
|
});
|
|
110
86
|
}
|
|
111
|
-
|
|
112
87
|
static DetailedPlanComponents() {
|
|
113
88
|
return Joi.object({
|
|
114
|
-
name: Joi.string().allow(""),
|
|
115
|
-
|
|
116
|
-
slug: Joi.string().allow(""),
|
|
117
|
-
|
|
118
89
|
description: Joi.string().allow(""),
|
|
119
|
-
|
|
90
|
+
display_text: Joi.string().allow(""),
|
|
91
|
+
enabled: Joi.boolean(),
|
|
120
92
|
group: Joi.string().allow(""),
|
|
121
|
-
|
|
122
93
|
icon: Joi.string().allow(""),
|
|
123
|
-
|
|
124
94
|
links: Joi.any(),
|
|
125
|
-
|
|
126
|
-
enabled: Joi.boolean(),
|
|
127
|
-
|
|
128
|
-
display_text: Joi.string().allow(""),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
static DetailedPlan() {
|
|
133
|
-
return Joi.object({
|
|
134
|
-
recurring: BillingModel.PlanRecurring(),
|
|
135
|
-
|
|
136
|
-
is_trial_plan: Joi.boolean(),
|
|
137
|
-
|
|
138
|
-
plan_group: Joi.string().allow(""),
|
|
139
|
-
|
|
140
|
-
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
141
|
-
|
|
142
|
-
currency: Joi.string().allow(""),
|
|
143
|
-
|
|
144
|
-
is_active: Joi.boolean(),
|
|
145
|
-
|
|
146
|
-
is_visible: Joi.boolean(),
|
|
147
|
-
|
|
148
|
-
trial_period: Joi.number(),
|
|
149
|
-
|
|
150
|
-
addons: Joi.array().items(Joi.string().allow("")),
|
|
151
|
-
|
|
152
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
153
|
-
|
|
154
|
-
type: Joi.string().allow(""),
|
|
155
|
-
|
|
156
|
-
country: Joi.string().allow(""),
|
|
157
|
-
|
|
158
|
-
_id: Joi.string().allow(""),
|
|
159
|
-
|
|
160
95
|
name: Joi.string().allow(""),
|
|
161
|
-
|
|
162
|
-
description: Joi.string().allow(""),
|
|
163
|
-
|
|
164
|
-
amount: Joi.number(),
|
|
165
|
-
|
|
166
|
-
product_suite_id: Joi.string().allow(""),
|
|
167
|
-
|
|
168
|
-
created_at: Joi.string().allow(""),
|
|
169
|
-
|
|
170
|
-
modified_at: Joi.string().allow(""),
|
|
171
|
-
|
|
172
|
-
components: Joi.array().items(BillingModel.DetailedPlanComponents()),
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
static SubscriptionTrialPeriod() {
|
|
177
|
-
return Joi.object({
|
|
178
|
-
start_date: Joi.string().allow(""),
|
|
179
|
-
|
|
180
|
-
end_date: Joi.string().allow(""),
|
|
96
|
+
slug: Joi.string().allow(""),
|
|
181
97
|
});
|
|
182
98
|
}
|
|
183
|
-
|
|
184
99
|
static EntityChargePrice() {
|
|
185
100
|
return Joi.object({
|
|
186
101
|
amount: Joi.number().required(),
|
|
187
|
-
|
|
188
102
|
currency_code: Joi.string().allow("").required(),
|
|
189
103
|
});
|
|
190
104
|
}
|
|
191
|
-
|
|
192
105
|
static EntityChargeRecurring() {
|
|
193
106
|
return Joi.object({
|
|
194
107
|
interval: Joi.string().allow("").required(),
|
|
195
108
|
});
|
|
196
109
|
}
|
|
197
|
-
|
|
198
|
-
static ChargeLineItem() {
|
|
110
|
+
static EntitySubscription() {
|
|
199
111
|
return Joi.object({
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
price: BillingModel.EntityChargePrice().required(),
|
|
207
|
-
|
|
208
|
-
recurring: BillingModel.EntityChargeRecurring(),
|
|
209
|
-
|
|
210
|
-
capped_amount: Joi.number(),
|
|
211
|
-
|
|
212
|
-
trial_days: Joi.number(),
|
|
213
|
-
|
|
214
|
-
is_test: Joi.boolean(),
|
|
215
|
-
|
|
112
|
+
_id: Joi.string().allow(""),
|
|
113
|
+
activated_on: Joi.string().allow(""),
|
|
114
|
+
cancelled_on: Joi.string().allow(""),
|
|
115
|
+
company_id: Joi.number(),
|
|
116
|
+
line_items: Joi.array().items(BillingModel.SubscriptionCharge()),
|
|
216
117
|
metadata: Joi.any(),
|
|
118
|
+
name: Joi.string().allow(""),
|
|
119
|
+
status: Joi.string().allow(""),
|
|
120
|
+
trial_days: Joi.number(),
|
|
121
|
+
trial_period: BillingModel.SubscriptionTrialPeriod(),
|
|
217
122
|
});
|
|
218
123
|
}
|
|
219
|
-
|
|
220
|
-
static CreateSubscriptionCharge() {
|
|
124
|
+
static InternalServerError() {
|
|
221
125
|
return Joi.object({
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
trial_days: Joi.number(),
|
|
225
|
-
|
|
226
|
-
line_items: Joi.array().items(BillingModel.ChargeLineItem()).required(),
|
|
227
|
-
|
|
228
|
-
is_test: Joi.boolean(),
|
|
229
|
-
|
|
230
|
-
return_url: Joi.string().allow("").required(),
|
|
126
|
+
code: Joi.string().allow(""),
|
|
127
|
+
message: Joi.string().allow(""),
|
|
231
128
|
});
|
|
232
129
|
}
|
|
233
|
-
|
|
234
|
-
static CurrentPeriod() {
|
|
130
|
+
static Invoice() {
|
|
235
131
|
return Joi.object({
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
end_date: Joi.string().allow(""),
|
|
132
|
+
invoice: BillingModel.InvoiceDetails(),
|
|
133
|
+
invoice_items: Joi.array().items(BillingModel.InvoiceItems()),
|
|
239
134
|
});
|
|
240
135
|
}
|
|
241
|
-
|
|
242
|
-
static SubscriptionCharge() {
|
|
136
|
+
static InvoiceDetails() {
|
|
243
137
|
return Joi.object({
|
|
244
138
|
_id: Joi.string().allow(""),
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
is_test: Joi.boolean(),
|
|
269
|
-
|
|
270
|
-
metadata: Joi.any(),
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
static EntitySubscription() {
|
|
275
|
-
return Joi.object({
|
|
276
|
-
_id: Joi.string().allow(""),
|
|
277
|
-
|
|
278
|
-
name: Joi.string().allow(""),
|
|
279
|
-
|
|
280
|
-
status: Joi.string().allow(""),
|
|
281
|
-
|
|
282
|
-
company_id: Joi.number(),
|
|
283
|
-
|
|
284
|
-
activated_on: Joi.string().allow(""),
|
|
285
|
-
|
|
286
|
-
cancelled_on: Joi.string().allow(""),
|
|
287
|
-
|
|
288
|
-
trial_days: Joi.number(),
|
|
289
|
-
|
|
290
|
-
trial_period: BillingModel.SubscriptionTrialPeriod(),
|
|
291
|
-
|
|
292
|
-
metadata: Joi.any(),
|
|
293
|
-
|
|
294
|
-
line_items: Joi.array().items(BillingModel.SubscriptionCharge()),
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
static CreateSubscriptionResponse() {
|
|
299
|
-
return Joi.object({
|
|
300
|
-
subscription: BillingModel.EntitySubscription(),
|
|
301
|
-
|
|
302
|
-
confirm_url: Joi.string().allow(""),
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
static InvoiceDetailsPeriod() {
|
|
307
|
-
return Joi.object({
|
|
308
|
-
start: Joi.string().allow(""),
|
|
309
|
-
|
|
310
|
-
end: Joi.string().allow(""),
|
|
139
|
+
attemp: Joi.number(),
|
|
140
|
+
auto_advance: Joi.boolean(),
|
|
141
|
+
client: BillingModel.InvoiceDetailsClient(),
|
|
142
|
+
collection_method: Joi.string().allow(""),
|
|
143
|
+
created_at: Joi.string().allow(""),
|
|
144
|
+
currency: Joi.string().allow(""),
|
|
145
|
+
current_status: Joi.string().allow(""),
|
|
146
|
+
hash_identifier: Joi.string().allow(""),
|
|
147
|
+
invoice_url: Joi.string().allow(""),
|
|
148
|
+
modified_at: Joi.string().allow(""),
|
|
149
|
+
next_action_time: Joi.string().allow(""),
|
|
150
|
+
number: Joi.string().allow(""),
|
|
151
|
+
paid: Joi.boolean(),
|
|
152
|
+
payment_method: BillingModel.InvoicePaymentMethod(),
|
|
153
|
+
period: BillingModel.InvoiceDetailsPeriod(),
|
|
154
|
+
pg_data: Joi.any(),
|
|
155
|
+
receipt_number: Joi.string().allow(""),
|
|
156
|
+
statement_descriptor: Joi.string().allow(""),
|
|
157
|
+
status_trail: Joi.array().items(BillingModel.InvoiceDetailsStatusTrail()),
|
|
158
|
+
subscriber_id: Joi.string().allow(""),
|
|
159
|
+
subscription: Joi.string().allow(""),
|
|
160
|
+
subtotal: Joi.number(),
|
|
161
|
+
total: Joi.number(),
|
|
311
162
|
});
|
|
312
163
|
}
|
|
313
|
-
|
|
314
164
|
static InvoiceDetailsClient() {
|
|
315
165
|
return Joi.object({
|
|
316
166
|
address_lines: Joi.array().items(Joi.string().allow("")),
|
|
317
|
-
|
|
318
|
-
name: Joi.string().allow(""),
|
|
319
|
-
|
|
320
167
|
email: Joi.string().allow(""),
|
|
321
|
-
|
|
168
|
+
name: Joi.string().allow(""),
|
|
322
169
|
phone: Joi.string().allow(""),
|
|
323
170
|
});
|
|
324
171
|
}
|
|
325
|
-
|
|
326
|
-
static InvoiceDetailsStatusTrail() {
|
|
172
|
+
static InvoiceDetailsPaymentMethods() {
|
|
327
173
|
return Joi.object({
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
174
|
+
data: BillingModel.InvoiceDetailsPaymentMethodsData(),
|
|
175
|
+
id: Joi.number(),
|
|
176
|
+
is_default: Joi.boolean(),
|
|
177
|
+
pg_payment_method_id: Joi.string().allow(""),
|
|
178
|
+
type: Joi.string().allow(""),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
static InvoiceDetailsPaymentMethodsData() {
|
|
182
|
+
return Joi.object({
|
|
183
|
+
brand: Joi.string().allow(""),
|
|
184
|
+
checks: BillingModel.InvoiceDetailsPaymentMethodsDataChecks(),
|
|
185
|
+
country: Joi.string().allow(""),
|
|
186
|
+
exp_month: Joi.number(),
|
|
187
|
+
exp_year: Joi.number(),
|
|
188
|
+
fingerprint: Joi.string().allow(""),
|
|
189
|
+
funding: Joi.string().allow(""),
|
|
190
|
+
generated_from: Joi.string().allow(""),
|
|
191
|
+
last4: Joi.string().allow(""),
|
|
192
|
+
networks: BillingModel.InvoiceDetailsPaymentMethodsDataNetworks(),
|
|
193
|
+
three_d_secure_usage: BillingModel.InvoiceDetailsPaymentMethodsDataThreeDSecureUsage(),
|
|
194
|
+
wallet: Joi.string().allow(""),
|
|
333
195
|
});
|
|
334
196
|
}
|
|
335
|
-
|
|
336
197
|
static InvoiceDetailsPaymentMethodsDataChecks() {
|
|
337
198
|
return Joi.object({
|
|
338
|
-
cvc_check: Joi.string().allow(""),
|
|
339
|
-
|
|
340
199
|
address_line1_check: Joi.string().allow(""),
|
|
341
|
-
|
|
342
200
|
address_postal_code_check: Joi.string().allow(""),
|
|
201
|
+
cvc_check: Joi.string().allow(""),
|
|
343
202
|
});
|
|
344
203
|
}
|
|
345
|
-
|
|
346
204
|
static InvoiceDetailsPaymentMethodsDataNetworks() {
|
|
347
205
|
return Joi.object({
|
|
348
206
|
available: Joi.array().items(Joi.string().allow("")),
|
|
349
|
-
|
|
350
207
|
preferred: Joi.string().allow(""),
|
|
351
208
|
});
|
|
352
209
|
}
|
|
353
|
-
|
|
354
210
|
static InvoiceDetailsPaymentMethodsDataThreeDSecureUsage() {
|
|
355
211
|
return Joi.object({
|
|
356
212
|
supported: Joi.boolean(),
|
|
357
213
|
});
|
|
358
214
|
}
|
|
359
|
-
|
|
360
|
-
static InvoiceDetailsPaymentMethodsData() {
|
|
215
|
+
static InvoiceDetailsPeriod() {
|
|
361
216
|
return Joi.object({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
last4: Joi.string().allow(""),
|
|
365
|
-
|
|
366
|
-
checks: BillingModel.InvoiceDetailsPaymentMethodsDataChecks(),
|
|
367
|
-
|
|
368
|
-
wallet: Joi.string().allow(""),
|
|
369
|
-
|
|
370
|
-
country: Joi.string().allow(""),
|
|
371
|
-
|
|
372
|
-
funding: Joi.string().allow(""),
|
|
373
|
-
|
|
374
|
-
exp_year: Joi.number(),
|
|
375
|
-
|
|
376
|
-
networks: BillingModel.InvoiceDetailsPaymentMethodsDataNetworks(),
|
|
377
|
-
|
|
378
|
-
exp_month: Joi.number(),
|
|
379
|
-
|
|
380
|
-
fingerprint: Joi.string().allow(""),
|
|
381
|
-
|
|
382
|
-
generated_from: Joi.string().allow(""),
|
|
383
|
-
|
|
384
|
-
three_d_secure_usage: BillingModel.InvoiceDetailsPaymentMethodsDataThreeDSecureUsage(),
|
|
217
|
+
end: Joi.string().allow(""),
|
|
218
|
+
start: Joi.string().allow(""),
|
|
385
219
|
});
|
|
386
220
|
}
|
|
387
|
-
|
|
388
|
-
static InvoiceDetailsPaymentMethods() {
|
|
221
|
+
static InvoiceDetailsStatusTrail() {
|
|
389
222
|
return Joi.object({
|
|
390
|
-
|
|
391
|
-
|
|
223
|
+
_id: Joi.string().allow(""),
|
|
224
|
+
timestamp: Joi.string().allow(""),
|
|
225
|
+
value: Joi.string().allow(""),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
static InvoiceItems() {
|
|
229
|
+
return Joi.object({
|
|
230
|
+
_id: Joi.string().allow(""),
|
|
231
|
+
amount: Joi.number(),
|
|
232
|
+
created_at: Joi.string().allow(""),
|
|
233
|
+
currency: Joi.string().allow(""),
|
|
234
|
+
description: Joi.string().allow(""),
|
|
235
|
+
invoice_id: Joi.string().allow(""),
|
|
236
|
+
modified_at: Joi.string().allow(""),
|
|
237
|
+
name: Joi.string().allow(""),
|
|
238
|
+
period: BillingModel.InvoiceItemsPeriod(),
|
|
239
|
+
plan: BillingModel.InvoiceItemsPlan(),
|
|
240
|
+
quantity: Joi.number(),
|
|
392
241
|
type: Joi.string().allow(""),
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
242
|
+
unit_amount: Joi.number(),
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
static InvoiceItemsPeriod() {
|
|
246
|
+
return Joi.object({
|
|
247
|
+
end: Joi.string().allow(""),
|
|
248
|
+
start: Joi.string().allow(""),
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
static InvoiceItemsPlan() {
|
|
252
|
+
return Joi.object({
|
|
253
|
+
_id: Joi.string().allow(""),
|
|
254
|
+
addons: Joi.array().items(Joi.string().allow("")),
|
|
255
|
+
amount: Joi.number(),
|
|
256
|
+
country: Joi.string().allow(""),
|
|
257
|
+
created_at: Joi.string().allow(""),
|
|
258
|
+
currency: Joi.string().allow(""),
|
|
259
|
+
description: Joi.string().allow(""),
|
|
260
|
+
is_active: Joi.boolean(),
|
|
261
|
+
is_trial_plan: Joi.boolean(),
|
|
262
|
+
is_visible: Joi.boolean(),
|
|
263
|
+
modified_at: Joi.string().allow(""),
|
|
264
|
+
name: Joi.string().allow(""),
|
|
265
|
+
plan_group: Joi.string().allow(""),
|
|
266
|
+
product_suite_id: Joi.string().allow(""),
|
|
267
|
+
recurring: BillingModel.InvoiceItemsPlanRecurring(),
|
|
268
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
269
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
270
|
+
trial_period: Joi.number(),
|
|
271
|
+
type: Joi.string().allow(""),
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
static InvoiceItemsPlanRecurring() {
|
|
275
|
+
return Joi.object({
|
|
276
|
+
interval: Joi.string().allow(""),
|
|
277
|
+
interval_count: Joi.number(),
|
|
399
278
|
});
|
|
400
279
|
}
|
|
401
|
-
|
|
402
280
|
static InvoicePaymentMethod() {
|
|
403
281
|
return Joi.object({
|
|
404
282
|
pg_payment_method_id: Joi.string().allow(""),
|
|
405
283
|
});
|
|
406
284
|
}
|
|
407
|
-
|
|
408
|
-
|
|
285
|
+
static Invoices() {
|
|
286
|
+
return Joi.object({
|
|
287
|
+
data: Joi.array().items(BillingModel.InvoicesData()),
|
|
288
|
+
end: Joi.number(),
|
|
289
|
+
limit: Joi.number(),
|
|
290
|
+
page: Joi.number(),
|
|
291
|
+
start: Joi.number(),
|
|
292
|
+
total: Joi.number(),
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
static InvoicesData() {
|
|
409
296
|
return Joi.object({
|
|
410
|
-
period: BillingModel.InvoiceDetailsPeriod(),
|
|
411
|
-
|
|
412
|
-
client: BillingModel.InvoiceDetailsClient(),
|
|
413
|
-
|
|
414
|
-
auto_advance: Joi.boolean(),
|
|
415
|
-
|
|
416
|
-
currency: Joi.string().allow(""),
|
|
417
|
-
|
|
418
|
-
paid: Joi.boolean(),
|
|
419
|
-
|
|
420
|
-
attemp: Joi.number(),
|
|
421
|
-
|
|
422
297
|
_id: Joi.string().allow(""),
|
|
423
|
-
|
|
298
|
+
attemp: Joi.number(),
|
|
299
|
+
auto_advance: Joi.boolean(),
|
|
300
|
+
client: BillingModel.InvoicesDataClient(),
|
|
424
301
|
collection_method: Joi.string().allow(""),
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
302
|
+
created_at: Joi.string().allow(""),
|
|
303
|
+
currency: Joi.string().allow(""),
|
|
304
|
+
current_status: Joi.string().allow(""),
|
|
305
|
+
hash_identifier: Joi.string().allow(""),
|
|
306
|
+
invoice_items: Joi.array().items(BillingModel.InvoiceItems()),
|
|
428
307
|
invoice_url: Joi.string().allow(""),
|
|
429
|
-
|
|
308
|
+
modified_at: Joi.string().allow(""),
|
|
309
|
+
next_action_time: Joi.string().allow(""),
|
|
430
310
|
number: Joi.string().allow(""),
|
|
431
|
-
|
|
311
|
+
paid: Joi.boolean(),
|
|
312
|
+
payment_method: BillingModel.InvoicesDataPaymentMethod(),
|
|
313
|
+
period: BillingModel.InvoicesDataPeriod(),
|
|
432
314
|
pg_data: Joi.any(),
|
|
433
|
-
|
|
434
315
|
receipt_number: Joi.string().allow(""),
|
|
435
|
-
|
|
436
316
|
statement_descriptor: Joi.string().allow(""),
|
|
437
|
-
|
|
438
|
-
current_status: Joi.string().allow(""),
|
|
439
|
-
|
|
440
317
|
status_trail: Joi.array().items(BillingModel.InvoiceDetailsStatusTrail()),
|
|
441
|
-
|
|
318
|
+
subscriber_id: Joi.string().allow(""),
|
|
319
|
+
subscription: Joi.string().allow(""),
|
|
442
320
|
subtotal: Joi.number(),
|
|
443
|
-
|
|
444
321
|
total: Joi.number(),
|
|
445
|
-
|
|
446
|
-
subscription: Joi.string().allow(""),
|
|
447
|
-
|
|
448
|
-
next_action_time: Joi.string().allow(""),
|
|
449
|
-
|
|
450
|
-
created_at: Joi.string().allow(""),
|
|
451
|
-
|
|
452
|
-
modified_at: Joi.string().allow(""),
|
|
453
|
-
|
|
454
|
-
hash_identifier: Joi.string().allow(""),
|
|
455
|
-
|
|
456
|
-
payment_method: BillingModel.InvoicePaymentMethod(),
|
|
457
322
|
});
|
|
458
323
|
}
|
|
459
|
-
|
|
460
|
-
static InvoiceItemsPlanRecurring() {
|
|
324
|
+
static InvoicesDataClient() {
|
|
461
325
|
return Joi.object({
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
326
|
+
address_lines: Joi.array().items(Joi.string().allow("")),
|
|
327
|
+
email: Joi.string().allow(""),
|
|
328
|
+
name: Joi.string().allow(""),
|
|
329
|
+
phone: Joi.string().allow(""),
|
|
465
330
|
});
|
|
466
331
|
}
|
|
467
|
-
|
|
468
|
-
static InvoiceItemsPlan() {
|
|
332
|
+
static InvoicesDataPaymentMethod() {
|
|
469
333
|
return Joi.object({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
is_trial_plan: Joi.boolean(),
|
|
473
|
-
|
|
474
|
-
plan_group: Joi.string().allow(""),
|
|
475
|
-
|
|
476
|
-
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
477
|
-
|
|
478
|
-
currency: Joi.string().allow(""),
|
|
479
|
-
|
|
480
|
-
is_active: Joi.boolean(),
|
|
481
|
-
|
|
482
|
-
is_visible: Joi.boolean(),
|
|
483
|
-
|
|
484
|
-
trial_period: Joi.number(),
|
|
485
|
-
|
|
486
|
-
addons: Joi.array().items(Joi.string().allow("")),
|
|
487
|
-
|
|
488
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
489
|
-
|
|
490
|
-
type: Joi.string().allow(""),
|
|
491
|
-
|
|
492
|
-
country: Joi.string().allow(""),
|
|
493
|
-
|
|
494
|
-
_id: Joi.string().allow(""),
|
|
495
|
-
|
|
496
|
-
name: Joi.string().allow(""),
|
|
497
|
-
|
|
498
|
-
description: Joi.string().allow(""),
|
|
499
|
-
|
|
500
|
-
amount: Joi.number(),
|
|
501
|
-
|
|
502
|
-
product_suite_id: Joi.string().allow(""),
|
|
503
|
-
|
|
504
|
-
created_at: Joi.string().allow(""),
|
|
505
|
-
|
|
506
|
-
modified_at: Joi.string().allow(""),
|
|
334
|
+
pg_payment_method_id: Joi.string().allow(""),
|
|
507
335
|
});
|
|
508
336
|
}
|
|
509
|
-
|
|
510
|
-
static InvoiceItemsPeriod() {
|
|
337
|
+
static InvoicesDataPeriod() {
|
|
511
338
|
return Joi.object({
|
|
512
|
-
start: Joi.string().allow(""),
|
|
513
|
-
|
|
514
339
|
end: Joi.string().allow(""),
|
|
340
|
+
start: Joi.string().allow(""),
|
|
515
341
|
});
|
|
516
342
|
}
|
|
517
|
-
|
|
518
|
-
static InvoiceItems() {
|
|
343
|
+
static Page() {
|
|
519
344
|
return Joi.object({
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
quantity: Joi.number(),
|
|
529
|
-
|
|
530
|
-
description: Joi.string().allow(""),
|
|
531
|
-
|
|
532
|
-
period: BillingModel.InvoiceItemsPeriod(),
|
|
533
|
-
|
|
534
|
-
unit_amount: Joi.number(),
|
|
535
|
-
|
|
536
|
-
amount: Joi.number(),
|
|
537
|
-
|
|
538
|
-
type: Joi.string().allow(""),
|
|
539
|
-
|
|
540
|
-
invoice_id: Joi.string().allow(""),
|
|
541
|
-
|
|
542
|
-
created_at: Joi.string().allow(""),
|
|
543
|
-
|
|
544
|
-
modified_at: Joi.string().allow(""),
|
|
345
|
+
current: Joi.number(),
|
|
346
|
+
has_next: Joi.boolean(),
|
|
347
|
+
has_previous: Joi.boolean(),
|
|
348
|
+
item_total: Joi.number(),
|
|
349
|
+
next_id: Joi.string().allow(""),
|
|
350
|
+
size: Joi.number(),
|
|
351
|
+
type: Joi.string().allow("").required(),
|
|
545
352
|
});
|
|
546
353
|
}
|
|
547
|
-
|
|
548
|
-
static Invoice() {
|
|
354
|
+
static Phone() {
|
|
549
355
|
return Joi.object({
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
invoice_items: Joi.array().items(BillingModel.InvoiceItems()),
|
|
356
|
+
phone_country_code: Joi.string().allow(""),
|
|
357
|
+
phone_number: Joi.string().allow(""),
|
|
553
358
|
});
|
|
554
359
|
}
|
|
555
|
-
|
|
556
|
-
static InvoicesDataClient() {
|
|
360
|
+
static Plan() {
|
|
557
361
|
return Joi.object({
|
|
362
|
+
_id: Joi.string().allow(""),
|
|
363
|
+
addons: Joi.array().items(Joi.string().allow("")),
|
|
364
|
+
amount: Joi.number(),
|
|
365
|
+
country: Joi.string().allow(""),
|
|
366
|
+
created_at: Joi.string().allow(""),
|
|
367
|
+
currency: Joi.string().allow(""),
|
|
368
|
+
description: Joi.string().allow(""),
|
|
369
|
+
is_active: Joi.boolean(),
|
|
370
|
+
is_trial_plan: Joi.boolean(),
|
|
371
|
+
is_visible: Joi.boolean(),
|
|
372
|
+
modified_at: Joi.string().allow(""),
|
|
558
373
|
name: Joi.string().allow(""),
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
374
|
+
plan_group: Joi.string().allow(""),
|
|
375
|
+
product_suite_id: Joi.string().allow(""),
|
|
376
|
+
recurring: BillingModel.PlanRecurring(),
|
|
377
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
378
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
379
|
+
trial_period: Joi.number(),
|
|
380
|
+
type: Joi.string().allow(""),
|
|
565
381
|
});
|
|
566
382
|
}
|
|
567
|
-
|
|
568
|
-
static InvoicesDataPeriod() {
|
|
383
|
+
static PlanRecurring() {
|
|
569
384
|
return Joi.object({
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
end: Joi.string().allow(""),
|
|
385
|
+
interval: Joi.string().allow(""),
|
|
386
|
+
interval_count: Joi.number(),
|
|
573
387
|
});
|
|
574
388
|
}
|
|
575
|
-
|
|
576
|
-
static InvoicesDataPaymentMethod() {
|
|
389
|
+
static ResourceNotFound() {
|
|
577
390
|
return Joi.object({
|
|
578
|
-
|
|
391
|
+
message: Joi.string().allow(""),
|
|
579
392
|
});
|
|
580
393
|
}
|
|
581
|
-
|
|
582
|
-
static InvoicesData() {
|
|
394
|
+
static Subscription() {
|
|
583
395
|
return Joi.object({
|
|
584
396
|
_id: Joi.string().allow(""),
|
|
585
|
-
|
|
586
|
-
client: BillingModel.InvoicesDataClient(),
|
|
587
|
-
|
|
588
|
-
auto_advance: Joi.boolean(),
|
|
589
|
-
|
|
590
|
-
currency: Joi.string().allow(""),
|
|
591
|
-
|
|
592
|
-
paid: Joi.boolean(),
|
|
593
|
-
|
|
594
|
-
attemp: Joi.number(),
|
|
595
|
-
|
|
397
|
+
cancel_at_period_end: Joi.boolean(),
|
|
596
398
|
collection_method: Joi.string().allow(""),
|
|
597
|
-
|
|
598
|
-
subscriber_id: Joi.string().allow(""),
|
|
599
|
-
|
|
600
|
-
invoice_url: Joi.string().allow(""),
|
|
601
|
-
|
|
602
|
-
number: Joi.string().allow(""),
|
|
603
|
-
|
|
604
|
-
pg_data: Joi.any(),
|
|
605
|
-
|
|
606
|
-
period: BillingModel.InvoicesDataPeriod(),
|
|
607
|
-
|
|
608
|
-
receipt_number: Joi.string().allow(""),
|
|
609
|
-
|
|
610
|
-
statement_descriptor: Joi.string().allow(""),
|
|
611
|
-
|
|
612
|
-
current_status: Joi.string().allow(""),
|
|
613
|
-
|
|
614
|
-
status_trail: Joi.array().items(BillingModel.InvoiceDetailsStatusTrail()),
|
|
615
|
-
|
|
616
|
-
subtotal: Joi.number(),
|
|
617
|
-
|
|
618
|
-
total: Joi.number(),
|
|
619
|
-
|
|
620
|
-
subscription: Joi.string().allow(""),
|
|
621
|
-
|
|
622
|
-
next_action_time: Joi.string().allow(""),
|
|
623
|
-
|
|
624
399
|
created_at: Joi.string().allow(""),
|
|
625
|
-
|
|
400
|
+
current_period: BillingModel.SubscriptionCurrentPeriod(),
|
|
401
|
+
current_status: Joi.string().allow(""),
|
|
402
|
+
invoice_settings: BillingModel.SubscriptionInvoiceSettings(),
|
|
403
|
+
is_active: Joi.boolean(),
|
|
404
|
+
latest_invoice: Joi.string().allow(""),
|
|
626
405
|
modified_at: Joi.string().allow(""),
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
406
|
+
pause_collection: BillingModel.SubscriptionPauseCollection(),
|
|
407
|
+
plan_data: BillingModel.Plan(),
|
|
408
|
+
plan_id: Joi.string().allow(""),
|
|
409
|
+
product_suite_id: Joi.string().allow(""),
|
|
410
|
+
subscriber_id: Joi.string().allow(""),
|
|
411
|
+
trial: BillingModel.SubscriptionTrial(),
|
|
633
412
|
});
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
end: Joi.number(),
|
|
643
|
-
|
|
644
|
-
limit: Joi.number(),
|
|
645
|
-
|
|
646
|
-
page: Joi.number(),
|
|
647
|
-
|
|
648
|
-
total: Joi.number(),
|
|
413
|
+
}
|
|
414
|
+
static SubscriptionActivateReq() {
|
|
415
|
+
return Joi.object({
|
|
416
|
+
payment_method: Joi.string().allow(""),
|
|
417
|
+
plan_id: Joi.string().allow(""),
|
|
418
|
+
product_suite: Joi.string().allow(""),
|
|
419
|
+
type: Joi.string().allow(""),
|
|
420
|
+
unique_id: Joi.string().allow(""),
|
|
649
421
|
});
|
|
650
422
|
}
|
|
651
|
-
|
|
652
|
-
static Phone() {
|
|
423
|
+
static SubscriptionActivateRes() {
|
|
653
424
|
return Joi.object({
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
phone_country_code: Joi.string().allow(""),
|
|
425
|
+
data: BillingModel.Subscription(),
|
|
426
|
+
success: Joi.boolean(),
|
|
657
427
|
});
|
|
658
428
|
}
|
|
659
|
-
|
|
660
429
|
static SubscriptionBillingAddress() {
|
|
661
430
|
return Joi.object({
|
|
662
|
-
country: Joi.string().allow(""),
|
|
663
|
-
|
|
664
|
-
state: Joi.string().allow(""),
|
|
665
|
-
|
|
666
431
|
city: Joi.string().allow(""),
|
|
667
|
-
|
|
432
|
+
country: Joi.string().allow(""),
|
|
668
433
|
line1: Joi.string().allow(""),
|
|
669
|
-
|
|
670
434
|
line2: Joi.string().allow(""),
|
|
671
|
-
|
|
672
435
|
postal_code: Joi.string().allow(""),
|
|
436
|
+
state: Joi.string().allow(""),
|
|
673
437
|
});
|
|
674
438
|
}
|
|
675
|
-
|
|
676
|
-
static SubscriptionCustomer() {
|
|
439
|
+
static SubscriptionCharge() {
|
|
677
440
|
return Joi.object({
|
|
678
|
-
phone: BillingModel.Phone(),
|
|
679
|
-
|
|
680
|
-
billing_address: BillingModel.SubscriptionBillingAddress(),
|
|
681
|
-
|
|
682
441
|
_id: Joi.string().allow(""),
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
email: Joi.string().allow(""),
|
|
691
|
-
|
|
692
|
-
created_at: Joi.string().allow(""),
|
|
693
|
-
|
|
694
|
-
modified_at: Joi.string().allow(""),
|
|
695
|
-
|
|
696
|
-
data: Joi.any(),
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
static SubscriptionCustomerCreate() {
|
|
701
|
-
return Joi.object({
|
|
702
|
-
phone: BillingModel.Phone(),
|
|
703
|
-
|
|
704
|
-
billing_address: BillingModel.SubscriptionBillingAddress(),
|
|
705
|
-
|
|
706
|
-
unique_id: Joi.string().allow(""),
|
|
707
|
-
|
|
708
|
-
type: Joi.string().allow(""),
|
|
709
|
-
|
|
442
|
+
activated_on: Joi.string().allow(""),
|
|
443
|
+
billing_date: Joi.string().allow(""),
|
|
444
|
+
cancelled_on: Joi.string().allow(""),
|
|
445
|
+
capped_amount: Joi.number(),
|
|
446
|
+
current_period: BillingModel.CurrentPeriod(),
|
|
447
|
+
is_test: Joi.boolean(),
|
|
448
|
+
metadata: Joi.any(),
|
|
710
449
|
name: Joi.string().allow(""),
|
|
711
|
-
|
|
712
|
-
|
|
450
|
+
price: BillingModel.EntityChargePrice(),
|
|
451
|
+
pricing_type: Joi.string().allow(""),
|
|
452
|
+
recurring: BillingModel.EntityChargeRecurring(),
|
|
453
|
+
status: Joi.string().allow(""),
|
|
454
|
+
term: Joi.string().allow(""),
|
|
713
455
|
});
|
|
714
456
|
}
|
|
715
|
-
|
|
716
457
|
static SubscriptionCurrentPeriod() {
|
|
717
458
|
return Joi.object({
|
|
718
|
-
start: Joi.string().allow(""),
|
|
719
|
-
|
|
720
459
|
end: Joi.string().allow(""),
|
|
460
|
+
start: Joi.string().allow(""),
|
|
721
461
|
});
|
|
722
462
|
}
|
|
723
|
-
|
|
724
|
-
static SubscriptionPauseCollection() {
|
|
463
|
+
static SubscriptionCustomer() {
|
|
725
464
|
return Joi.object({
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
465
|
+
_id: Joi.string().allow(""),
|
|
466
|
+
billing_address: BillingModel.SubscriptionBillingAddress(),
|
|
467
|
+
created_at: Joi.string().allow(""),
|
|
468
|
+
data: Joi.any(),
|
|
469
|
+
email: Joi.string().allow(""),
|
|
470
|
+
modified_at: Joi.string().allow(""),
|
|
471
|
+
name: Joi.string().allow(""),
|
|
472
|
+
phone: BillingModel.Phone(),
|
|
473
|
+
type: Joi.string().allow(""),
|
|
474
|
+
unique_id: Joi.string().allow(""),
|
|
729
475
|
});
|
|
730
476
|
}
|
|
731
|
-
|
|
732
|
-
static SubscriptionTrial() {
|
|
477
|
+
static SubscriptionCustomerCreate() {
|
|
733
478
|
return Joi.object({
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
479
|
+
billing_address: BillingModel.SubscriptionBillingAddress(),
|
|
480
|
+
email: Joi.string().allow(""),
|
|
481
|
+
name: Joi.string().allow(""),
|
|
482
|
+
phone: BillingModel.Phone(),
|
|
483
|
+
type: Joi.string().allow(""),
|
|
484
|
+
unique_id: Joi.string().allow(""),
|
|
737
485
|
});
|
|
738
486
|
}
|
|
739
|
-
|
|
740
487
|
static SubscriptionInvoiceSettings() {
|
|
741
488
|
return Joi.object({
|
|
742
|
-
generation: Joi.boolean(),
|
|
743
|
-
|
|
744
489
|
charging: Joi.boolean(),
|
|
490
|
+
generation: Joi.boolean(),
|
|
745
491
|
});
|
|
746
492
|
}
|
|
747
|
-
|
|
748
|
-
static Subscription() {
|
|
749
|
-
return Joi.object({
|
|
750
|
-
current_period: BillingModel.SubscriptionCurrentPeriod(),
|
|
751
|
-
|
|
752
|
-
pause_collection: BillingModel.SubscriptionPauseCollection(),
|
|
753
|
-
|
|
754
|
-
trial: BillingModel.SubscriptionTrial(),
|
|
755
|
-
|
|
756
|
-
invoice_settings: BillingModel.SubscriptionInvoiceSettings(),
|
|
757
|
-
|
|
758
|
-
is_active: Joi.boolean(),
|
|
759
|
-
|
|
760
|
-
cancel_at_period_end: Joi.boolean(),
|
|
761
|
-
|
|
762
|
-
_id: Joi.string().allow(""),
|
|
763
|
-
|
|
764
|
-
subscriber_id: Joi.string().allow(""),
|
|
765
|
-
|
|
766
|
-
plan_id: Joi.string().allow(""),
|
|
767
|
-
|
|
768
|
-
product_suite_id: Joi.string().allow(""),
|
|
769
|
-
|
|
770
|
-
plan_data: BillingModel.Plan(),
|
|
771
|
-
|
|
772
|
-
current_status: Joi.string().allow(""),
|
|
773
|
-
|
|
774
|
-
collection_method: Joi.string().allow(""),
|
|
775
|
-
|
|
776
|
-
created_at: Joi.string().allow(""),
|
|
777
|
-
|
|
778
|
-
modified_at: Joi.string().allow(""),
|
|
779
|
-
|
|
780
|
-
latest_invoice: Joi.string().allow(""),
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
static SubscriptionStatus() {
|
|
493
|
+
static SubscriptionLimit() {
|
|
785
494
|
return Joi.object({
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
495
|
+
application: BillingModel.SubscriptionLimitApplication(),
|
|
496
|
+
extensions: BillingModel.SubscriptionLimitExtensions(),
|
|
497
|
+
integrations: BillingModel.SubscriptionLimitIntegrations(),
|
|
498
|
+
is_trial_plan: Joi.boolean(),
|
|
499
|
+
marketplace: BillingModel.SubscriptionLimitMarketplace(),
|
|
500
|
+
other_platform: BillingModel.SubscriptionLimitOtherPlatform(),
|
|
501
|
+
products: BillingModel.SubscriptionLimitProducts(),
|
|
502
|
+
team: BillingModel.SubscriptionLimitTeam(),
|
|
789
503
|
});
|
|
790
504
|
}
|
|
791
|
-
|
|
792
505
|
static SubscriptionLimitApplication() {
|
|
793
506
|
return Joi.object({
|
|
794
507
|
enabled: Joi.boolean(),
|
|
795
|
-
|
|
796
508
|
hard_limit: Joi.number(),
|
|
797
|
-
|
|
798
509
|
soft_limit: Joi.number(),
|
|
799
510
|
});
|
|
800
511
|
}
|
|
801
|
-
|
|
802
|
-
static SubscriptionLimitMarketplace() {
|
|
512
|
+
static SubscriptionLimitExtensions() {
|
|
803
513
|
return Joi.object({
|
|
804
514
|
enabled: Joi.boolean(),
|
|
515
|
+
limit: Joi.number(),
|
|
805
516
|
});
|
|
806
517
|
}
|
|
807
|
-
|
|
808
|
-
static SubscriptionLimitOtherPlatform() {
|
|
518
|
+
static SubscriptionLimitIntegrations() {
|
|
809
519
|
return Joi.object({
|
|
810
520
|
enabled: Joi.boolean(),
|
|
521
|
+
limit: Joi.number(),
|
|
811
522
|
});
|
|
812
523
|
}
|
|
813
|
-
|
|
814
|
-
static SubscriptionLimitTeam() {
|
|
524
|
+
static SubscriptionLimitMarketplace() {
|
|
815
525
|
return Joi.object({
|
|
816
|
-
|
|
526
|
+
enabled: Joi.boolean(),
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
static SubscriptionLimitOtherPlatform() {
|
|
530
|
+
return Joi.object({
|
|
531
|
+
enabled: Joi.boolean(),
|
|
817
532
|
});
|
|
818
533
|
}
|
|
819
|
-
|
|
820
534
|
static SubscriptionLimitProducts() {
|
|
821
535
|
return Joi.object({
|
|
822
536
|
bulk: Joi.boolean(),
|
|
823
|
-
|
|
824
537
|
limit: Joi.number(),
|
|
825
538
|
});
|
|
826
539
|
}
|
|
827
|
-
|
|
828
|
-
static SubscriptionLimitExtensions() {
|
|
540
|
+
static SubscriptionLimitTeam() {
|
|
829
541
|
return Joi.object({
|
|
830
|
-
enabled: Joi.boolean(),
|
|
831
|
-
|
|
832
542
|
limit: Joi.number(),
|
|
833
543
|
});
|
|
834
544
|
}
|
|
835
|
-
|
|
836
|
-
static SubscriptionLimitIntegrations() {
|
|
545
|
+
static SubscriptionPauseCollection() {
|
|
837
546
|
return Joi.object({
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
limit: Joi.number(),
|
|
547
|
+
behavior: Joi.string().allow(""),
|
|
548
|
+
resume_at: Joi.string().allow(""),
|
|
841
549
|
});
|
|
842
550
|
}
|
|
843
|
-
|
|
844
|
-
static SubscriptionLimit() {
|
|
551
|
+
static SubscriptionStatus() {
|
|
845
552
|
return Joi.object({
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
marketplace: BillingModel.SubscriptionLimitMarketplace(),
|
|
849
|
-
|
|
850
|
-
other_platform: BillingModel.SubscriptionLimitOtherPlatform(),
|
|
851
|
-
|
|
852
|
-
team: BillingModel.SubscriptionLimitTeam(),
|
|
853
|
-
|
|
854
|
-
products: BillingModel.SubscriptionLimitProducts(),
|
|
855
|
-
|
|
856
|
-
extensions: BillingModel.SubscriptionLimitExtensions(),
|
|
857
|
-
|
|
858
|
-
integrations: BillingModel.SubscriptionLimitIntegrations(),
|
|
859
|
-
|
|
860
|
-
is_trial_plan: Joi.boolean(),
|
|
553
|
+
is_enabled: Joi.boolean(),
|
|
554
|
+
subscription: BillingModel.Subscription(),
|
|
861
555
|
});
|
|
862
556
|
}
|
|
863
|
-
|
|
864
|
-
static SubscriptionActivateReq() {
|
|
557
|
+
static SubscriptionTrial() {
|
|
865
558
|
return Joi.object({
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
type: Joi.string().allow(""),
|
|
869
|
-
|
|
870
|
-
product_suite: Joi.string().allow(""),
|
|
871
|
-
|
|
872
|
-
plan_id: Joi.string().allow(""),
|
|
873
|
-
|
|
874
|
-
payment_method: Joi.string().allow(""),
|
|
559
|
+
end: Joi.string().allow(""),
|
|
560
|
+
start: Joi.string().allow(""),
|
|
875
561
|
});
|
|
876
562
|
}
|
|
877
|
-
|
|
878
|
-
static SubscriptionActivateRes() {
|
|
563
|
+
static SubscriptionTrialPeriod() {
|
|
879
564
|
return Joi.object({
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
data: BillingModel.Subscription(),
|
|
565
|
+
end_date: Joi.string().allow(""),
|
|
566
|
+
start_date: Joi.string().allow(""),
|
|
883
567
|
});
|
|
884
568
|
}
|
|
885
|
-
|
|
886
|
-
static CancelSubscriptionReq() {
|
|
569
|
+
static UnauthenticatedApplication() {
|
|
887
570
|
return Joi.object({
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
type: Joi.string().allow(""),
|
|
891
|
-
|
|
892
|
-
product_suite: Joi.string().allow(""),
|
|
893
|
-
|
|
894
|
-
subscription_id: Joi.string().allow(""),
|
|
571
|
+
message: Joi.string().allow(""),
|
|
895
572
|
});
|
|
896
573
|
}
|
|
897
|
-
|
|
898
|
-
static CancelSubscriptionRes() {
|
|
574
|
+
static UnauthenticatedUser() {
|
|
899
575
|
return Joi.object({
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
data: BillingModel.Subscription(),
|
|
576
|
+
message: Joi.string().allow(""),
|
|
903
577
|
});
|
|
904
578
|
}
|
|
905
579
|
}
|