@gofynd/fdk-client-javascript 1.6.3 → 3.0.0-beta.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/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -234
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4111 -9093
- package/sdk/platform/Order/OrderPlatformModel.js +3202 -4230
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +22 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +91 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +14 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +223 -59
- package/sdk/platform/User/UserPlatformModel.js +204 -65
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +434 -758
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -19,10 +19,10 @@ class Cart {
|
|
|
19
19
|
* @param {CartPlatformApplicationValidator.AddAddressParam} arg - Arg object
|
|
20
20
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
21
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
|
-
* @returns {Promise<CartPlatformModel.
|
|
22
|
+
* @returns {Promise<CartPlatformModel.SaveAddressResponse>} - Success response
|
|
23
23
|
* @name addAddress
|
|
24
|
-
* @summary:
|
|
25
|
-
* @description:
|
|
24
|
+
* @summary: Add address to an account
|
|
25
|
+
* @description: Use this API to add an address to an account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/).
|
|
26
26
|
*/
|
|
27
27
|
async addAddress(
|
|
28
28
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -73,7 +73,7 @@ class Cart {
|
|
|
73
73
|
|
|
74
74
|
const {
|
|
75
75
|
error: res_error,
|
|
76
|
-
} = CartPlatformModel.
|
|
76
|
+
} = CartPlatformModel.SaveAddressResponse().validate(responseData, {
|
|
77
77
|
abortEarly: false,
|
|
78
78
|
allowUnknown: true,
|
|
79
79
|
});
|
|
@@ -96,10 +96,10 @@ class Cart {
|
|
|
96
96
|
* @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
|
|
97
97
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
98
98
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
99
|
-
* @returns {Promise<CartPlatformModel.
|
|
99
|
+
* @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
|
|
100
100
|
* @name addItems
|
|
101
|
-
* @summary: Add items to cart
|
|
102
|
-
* @description:
|
|
101
|
+
* @summary: Add items to abandoned cart
|
|
102
|
+
* @description: Use this API to add items to the abandoned cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addItems/).
|
|
103
103
|
*/
|
|
104
104
|
async addItems(
|
|
105
105
|
{ cartId, body, b, requestHeaders } = { requestHeaders: {} },
|
|
@@ -155,7 +155,7 @@ class Cart {
|
|
|
155
155
|
|
|
156
156
|
const {
|
|
157
157
|
error: res_error,
|
|
158
|
-
} = CartPlatformModel.
|
|
158
|
+
} = CartPlatformModel.AddCartDetailResponse().validate(responseData, {
|
|
159
159
|
abortEarly: false,
|
|
160
160
|
allowUnknown: true,
|
|
161
161
|
});
|
|
@@ -178,10 +178,10 @@ class Cart {
|
|
|
178
178
|
* @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object
|
|
179
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
180
180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
181
|
-
* @returns {Promise<CartPlatformModel.
|
|
181
|
+
* @returns {Promise<CartPlatformModel.AddPriceAdjustmentResponse>} - Success response
|
|
182
182
|
* @name addPriceAdjustment
|
|
183
|
-
* @summary: Create price
|
|
184
|
-
* @description: Create
|
|
183
|
+
* @summary: Create new price adjustment
|
|
184
|
+
* @description: Create new price adjustment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addPriceAdjustment/).
|
|
185
185
|
*/
|
|
186
186
|
async addPriceAdjustment(
|
|
187
187
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -234,7 +234,7 @@ class Cart {
|
|
|
234
234
|
|
|
235
235
|
const {
|
|
236
236
|
error: res_error,
|
|
237
|
-
} = CartPlatformModel.
|
|
237
|
+
} = CartPlatformModel.AddPriceAdjustmentResponse().validate(responseData, {
|
|
238
238
|
abortEarly: false,
|
|
239
239
|
allowUnknown: true,
|
|
240
240
|
});
|
|
@@ -257,10 +257,10 @@ class Cart {
|
|
|
257
257
|
* @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object
|
|
258
258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
259
259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
260
|
-
* @returns {Promise<CartPlatformModel.
|
|
260
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
261
261
|
* @name applyCoupon
|
|
262
|
-
* @summary: Apply coupon
|
|
263
|
-
* @description: Apply a coupon
|
|
262
|
+
* @summary: Apply a coupon to the cart.
|
|
263
|
+
* @description: Apply a selected coupon to the items in the shopping cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/).
|
|
264
264
|
*/
|
|
265
265
|
async applyCoupon(
|
|
266
266
|
{ body, i, b, p, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
@@ -326,7 +326,7 @@ class Cart {
|
|
|
326
326
|
|
|
327
327
|
const {
|
|
328
328
|
error: res_error,
|
|
329
|
-
} = CartPlatformModel.
|
|
329
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
330
330
|
abortEarly: false,
|
|
331
331
|
allowUnknown: true,
|
|
332
332
|
});
|
|
@@ -351,8 +351,9 @@ class Cart {
|
|
|
351
351
|
*
|
|
352
352
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
353
353
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
354
|
-
* @returns {Promise<CartPlatformModel.
|
|
355
|
-
* Success response
|
|
354
|
+
* @returns {Promise<CartPlatformModel.OpenApiCartServiceabilityResponse>}
|
|
355
|
+
* - Success response
|
|
356
|
+
*
|
|
356
357
|
* @name checkCartServiceability
|
|
357
358
|
* @summary: Check cart serviceability
|
|
358
359
|
* @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/).
|
|
@@ -408,7 +409,7 @@ class Cart {
|
|
|
408
409
|
|
|
409
410
|
const {
|
|
410
411
|
error: res_error,
|
|
411
|
-
} = CartPlatformModel.
|
|
412
|
+
} = CartPlatformModel.OpenApiCartServiceabilityResponse().validate(
|
|
412
413
|
responseData,
|
|
413
414
|
{ abortEarly: false, allowUnknown: true }
|
|
414
415
|
);
|
|
@@ -431,7 +432,7 @@ class Cart {
|
|
|
431
432
|
* @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object
|
|
432
433
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
433
434
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
434
|
-
* @returns {Promise<CartPlatformModel.
|
|
435
|
+
* @returns {Promise<CartPlatformModel.OpenApiCheckoutResponse>} - Success response
|
|
435
436
|
* @name checkoutCart
|
|
436
437
|
* @summary: Checkout cart
|
|
437
438
|
* @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkoutCart/).
|
|
@@ -485,7 +486,7 @@ class Cart {
|
|
|
485
486
|
|
|
486
487
|
const {
|
|
487
488
|
error: res_error,
|
|
488
|
-
} = CartPlatformModel.
|
|
489
|
+
} = CartPlatformModel.OpenApiCheckoutResponse().validate(responseData, {
|
|
489
490
|
abortEarly: false,
|
|
490
491
|
allowUnknown: true,
|
|
491
492
|
});
|
|
@@ -510,9 +511,9 @@ class Cart {
|
|
|
510
511
|
*
|
|
511
512
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
512
513
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
513
|
-
* @returns {Promise<CartPlatformModel.
|
|
514
|
+
* @returns {Promise<CartPlatformModel.CartMetaConfigAddResponse>} - Success response
|
|
514
515
|
* @name createCartMetaConfig
|
|
515
|
-
* @summary: Create
|
|
516
|
+
* @summary: Create new cart meta configuration
|
|
516
517
|
* @description: Create custom meta configurations for carts associated with a specific sales channel. By specifying the company ID and application ID, seller can define unique cart settings, including preferences, rules, and constraints, tailored to their business needs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCartMetaConfig/).
|
|
517
518
|
*/
|
|
518
519
|
async createCartMetaConfig(
|
|
@@ -566,7 +567,7 @@ class Cart {
|
|
|
566
567
|
|
|
567
568
|
const {
|
|
568
569
|
error: res_error,
|
|
569
|
-
} = CartPlatformModel.
|
|
570
|
+
} = CartPlatformModel.CartMetaConfigAddResponse().validate(responseData, {
|
|
570
571
|
abortEarly: false,
|
|
571
572
|
allowUnknown: true,
|
|
572
573
|
});
|
|
@@ -589,10 +590,10 @@ class Cart {
|
|
|
589
590
|
* @param {CartPlatformApplicationValidator.CreateCouponParam} arg - Arg object
|
|
590
591
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
591
592
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
592
|
-
* @returns {Promise<CartPlatformModel.
|
|
593
|
+
* @returns {Promise<CartPlatformModel.CouponDetailResponse>} - Success response
|
|
593
594
|
* @name createCoupon
|
|
594
|
-
* @summary: Create a coupon
|
|
595
|
-
* @description:
|
|
595
|
+
* @summary: Create a new coupon.
|
|
596
|
+
* @description: Generate and add a new coupon to the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCoupon/).
|
|
596
597
|
*/
|
|
597
598
|
async createCoupon(
|
|
598
599
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -643,7 +644,7 @@ class Cart {
|
|
|
643
644
|
|
|
644
645
|
const {
|
|
645
646
|
error: res_error,
|
|
646
|
-
} = CartPlatformModel.
|
|
647
|
+
} = CartPlatformModel.CouponDetailResponse().validate(responseData, {
|
|
647
648
|
abortEarly: false,
|
|
648
649
|
allowUnknown: true,
|
|
649
650
|
});
|
|
@@ -666,7 +667,7 @@ class Cart {
|
|
|
666
667
|
* @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object
|
|
667
668
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
668
669
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
669
|
-
* @returns {Promise<CartPlatformModel.
|
|
670
|
+
* @returns {Promise<CartPlatformModel.PromotionAdd>} - Success response
|
|
670
671
|
* @name createPromotion
|
|
671
672
|
* @summary: Create a promotion
|
|
672
673
|
* @description: Creates a new promotion based on the selected promotion type. Sellers can choose from multiple supported promotion types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable promotion criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createPromotion/).
|
|
@@ -722,7 +723,7 @@ class Cart {
|
|
|
722
723
|
|
|
723
724
|
const {
|
|
724
725
|
error: res_error,
|
|
725
|
-
} = CartPlatformModel.
|
|
726
|
+
} = CartPlatformModel.PromotionAdd().validate(responseData, {
|
|
726
727
|
abortEarly: false,
|
|
727
728
|
allowUnknown: true,
|
|
728
729
|
});
|
|
@@ -745,19 +746,20 @@ class Cart {
|
|
|
745
746
|
* @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object
|
|
746
747
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
747
748
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
748
|
-
* @returns {Promise<CartPlatformModel.
|
|
749
|
+
* @returns {Promise<CartPlatformModel.DeleteCartDetailResponse>} - Success response
|
|
749
750
|
* @name deleteCart
|
|
750
|
-
* @summary: Delete
|
|
751
|
-
* @description:
|
|
751
|
+
* @summary: Delete cart once user made successful checkout
|
|
752
|
+
* @description: Use this API to delete the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCart/).
|
|
752
753
|
*/
|
|
753
754
|
async deleteCart(
|
|
754
|
-
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
755
|
+
{ body, id, cartType, requestHeaders } = { requestHeaders: {} },
|
|
755
756
|
{ responseHeaders } = { responseHeaders: false }
|
|
756
757
|
) {
|
|
757
758
|
const { error } = CartPlatformApplicationValidator.deleteCart().validate(
|
|
758
759
|
{
|
|
759
760
|
body,
|
|
760
761
|
id,
|
|
762
|
+
cartType,
|
|
761
763
|
},
|
|
762
764
|
{ abortEarly: false, allowUnknown: true }
|
|
763
765
|
);
|
|
@@ -772,6 +774,7 @@ class Cart {
|
|
|
772
774
|
{
|
|
773
775
|
body,
|
|
774
776
|
id,
|
|
777
|
+
cartType,
|
|
775
778
|
},
|
|
776
779
|
{ abortEarly: false, allowUnknown: false }
|
|
777
780
|
);
|
|
@@ -784,6 +787,7 @@ class Cart {
|
|
|
784
787
|
|
|
785
788
|
const query_params = {};
|
|
786
789
|
query_params["id"] = id;
|
|
790
|
+
query_params["cart_type"] = cartType;
|
|
787
791
|
|
|
788
792
|
const response = await PlatformAPIClient.execute(
|
|
789
793
|
this.config,
|
|
@@ -802,7 +806,7 @@ class Cart {
|
|
|
802
806
|
|
|
803
807
|
const {
|
|
804
808
|
error: res_error,
|
|
805
|
-
} = CartPlatformModel.
|
|
809
|
+
} = CartPlatformModel.DeleteCartDetailResponse().validate(responseData, {
|
|
806
810
|
abortEarly: false,
|
|
807
811
|
allowUnknown: true,
|
|
808
812
|
});
|
|
@@ -822,100 +826,25 @@ class Cart {
|
|
|
822
826
|
}
|
|
823
827
|
|
|
824
828
|
/**
|
|
825
|
-
* @param {CartPlatformApplicationValidator.
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
829
|
-
* @name deleteCoupon
|
|
830
|
-
* @summary: Delete a coupon which is in draft state
|
|
831
|
-
* @description: Delete details of a draft coupon by providing its unique identifier to delete information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCoupon/).
|
|
832
|
-
*/
|
|
833
|
-
async deleteCoupon(
|
|
834
|
-
{ id, requestHeaders } = { requestHeaders: {} },
|
|
835
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
836
|
-
) {
|
|
837
|
-
const { error } = CartPlatformApplicationValidator.deleteCoupon().validate(
|
|
838
|
-
{
|
|
839
|
-
id,
|
|
840
|
-
},
|
|
841
|
-
{ abortEarly: false, allowUnknown: true }
|
|
842
|
-
);
|
|
843
|
-
if (error) {
|
|
844
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
// Showing warrnings if extra unknown parameters are found
|
|
848
|
-
const {
|
|
849
|
-
error: warrning,
|
|
850
|
-
} = CartPlatformApplicationValidator.deleteCoupon().validate(
|
|
851
|
-
{
|
|
852
|
-
id,
|
|
853
|
-
},
|
|
854
|
-
{ abortEarly: false, allowUnknown: false }
|
|
855
|
-
);
|
|
856
|
-
if (warrning) {
|
|
857
|
-
Logger({
|
|
858
|
-
level: "WARN",
|
|
859
|
-
message: `Parameter Validation warrnings for platform > Cart > deleteCoupon \n ${warrning}`,
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
const query_params = {};
|
|
864
|
-
|
|
865
|
-
const response = await PlatformAPIClient.execute(
|
|
866
|
-
this.config,
|
|
867
|
-
"delete",
|
|
868
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`,
|
|
869
|
-
query_params,
|
|
870
|
-
undefined,
|
|
871
|
-
requestHeaders,
|
|
872
|
-
{ responseHeaders }
|
|
873
|
-
);
|
|
874
|
-
|
|
875
|
-
let responseData = response;
|
|
876
|
-
if (responseHeaders) {
|
|
877
|
-
responseData = response[0];
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
const {
|
|
881
|
-
error: res_error,
|
|
882
|
-
} = CartPlatformModel.SuccessMessage().validate(responseData, {
|
|
883
|
-
abortEarly: false,
|
|
884
|
-
allowUnknown: true,
|
|
885
|
-
});
|
|
886
|
-
|
|
887
|
-
if (res_error) {
|
|
888
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
889
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
890
|
-
} else {
|
|
891
|
-
Logger({
|
|
892
|
-
level: "WARN",
|
|
893
|
-
message: `Response Validation Warnings for platform > Cart > deleteCoupon \n ${res_error}`,
|
|
894
|
-
});
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
return response;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* @param {CartPlatformApplicationValidator.DeletePromotionParam} arg - Arg object
|
|
829
|
+
* @param {CartPlatformApplicationValidator.DeleteCartMetaConfigParam} arg
|
|
830
|
+
* - Arg object
|
|
831
|
+
*
|
|
903
832
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
904
833
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
905
834
|
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
906
|
-
* @name
|
|
907
|
-
* @summary: Delete
|
|
908
|
-
* @description: Delete
|
|
835
|
+
* @name deleteCartMetaConfig
|
|
836
|
+
* @summary: Delete cart meta configuration
|
|
837
|
+
* @description: Delete cart meta configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCartMetaConfig/).
|
|
909
838
|
*/
|
|
910
|
-
async
|
|
911
|
-
{
|
|
839
|
+
async deleteCartMetaConfig(
|
|
840
|
+
{ cartMetaId, requestHeaders } = { requestHeaders: {} },
|
|
912
841
|
{ responseHeaders } = { responseHeaders: false }
|
|
913
842
|
) {
|
|
914
843
|
const {
|
|
915
844
|
error,
|
|
916
|
-
} = CartPlatformApplicationValidator.
|
|
845
|
+
} = CartPlatformApplicationValidator.deleteCartMetaConfig().validate(
|
|
917
846
|
{
|
|
918
|
-
|
|
847
|
+
cartMetaId,
|
|
919
848
|
},
|
|
920
849
|
{ abortEarly: false, allowUnknown: true }
|
|
921
850
|
);
|
|
@@ -926,16 +855,16 @@ class Cart {
|
|
|
926
855
|
// Showing warrnings if extra unknown parameters are found
|
|
927
856
|
const {
|
|
928
857
|
error: warrning,
|
|
929
|
-
} = CartPlatformApplicationValidator.
|
|
858
|
+
} = CartPlatformApplicationValidator.deleteCartMetaConfig().validate(
|
|
930
859
|
{
|
|
931
|
-
|
|
860
|
+
cartMetaId,
|
|
932
861
|
},
|
|
933
862
|
{ abortEarly: false, allowUnknown: false }
|
|
934
863
|
);
|
|
935
864
|
if (warrning) {
|
|
936
865
|
Logger({
|
|
937
866
|
level: "WARN",
|
|
938
|
-
message: `Parameter Validation warrnings for platform > Cart >
|
|
867
|
+
message: `Parameter Validation warrnings for platform > Cart > deleteCartMetaConfig \n ${warrning}`,
|
|
939
868
|
});
|
|
940
869
|
}
|
|
941
870
|
|
|
@@ -944,7 +873,7 @@ class Cart {
|
|
|
944
873
|
const response = await PlatformAPIClient.execute(
|
|
945
874
|
this.config,
|
|
946
875
|
"delete",
|
|
947
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
876
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration/${cartMetaId}`,
|
|
948
877
|
query_params,
|
|
949
878
|
undefined,
|
|
950
879
|
requestHeaders,
|
|
@@ -969,7 +898,7 @@ class Cart {
|
|
|
969
898
|
} else {
|
|
970
899
|
Logger({
|
|
971
900
|
level: "WARN",
|
|
972
|
-
message: `Response Validation Warnings for platform > Cart >
|
|
901
|
+
message: `Response Validation Warnings for platform > Cart > deleteCartMetaConfig \n ${res_error}`,
|
|
973
902
|
});
|
|
974
903
|
}
|
|
975
904
|
}
|
|
@@ -983,7 +912,7 @@ class Cart {
|
|
|
983
912
|
*
|
|
984
913
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
985
914
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
986
|
-
* @returns {Promise<CartPlatformModel.
|
|
915
|
+
* @returns {Promise<CartPlatformModel.OpenapiCartDetailsResponse>} - Success response
|
|
987
916
|
* @name fetchAndvalidateCartItems
|
|
988
917
|
* @summary: Get and validate cart items
|
|
989
918
|
* @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/).
|
|
@@ -1039,7 +968,7 @@ class Cart {
|
|
|
1039
968
|
|
|
1040
969
|
const {
|
|
1041
970
|
error: res_error,
|
|
1042
|
-
} = CartPlatformModel.
|
|
971
|
+
} = CartPlatformModel.OpenapiCartDetailsResponse().validate(responseData, {
|
|
1043
972
|
abortEarly: false,
|
|
1044
973
|
allowUnknown: true,
|
|
1045
974
|
});
|
|
@@ -1058,86 +987,11 @@ class Cart {
|
|
|
1058
987
|
return response;
|
|
1059
988
|
}
|
|
1060
989
|
|
|
1061
|
-
/**
|
|
1062
|
-
* @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object
|
|
1063
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1064
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1065
|
-
* @returns {Promise<CartPlatformModel.CartMetaConfigAdd>} - Success response
|
|
1066
|
-
* @name fetchCartMetaConfig
|
|
1067
|
-
* @summary: Get cart meta
|
|
1068
|
-
* @description: Retrieve meta configuration settings tailored for customizing the cart experience within a specific sales channel. Cart meta includes configuration settings such as allowed maximum cart value, allowed minimum cart value, maximum allowed cart items, delivery charges, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchCartMetaConfig/).
|
|
1069
|
-
*/
|
|
1070
|
-
async fetchCartMetaConfig(
|
|
1071
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
1072
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1073
|
-
) {
|
|
1074
|
-
const {
|
|
1075
|
-
error,
|
|
1076
|
-
} = CartPlatformApplicationValidator.fetchCartMetaConfig().validate(
|
|
1077
|
-
{},
|
|
1078
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1079
|
-
);
|
|
1080
|
-
if (error) {
|
|
1081
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1085
|
-
const {
|
|
1086
|
-
error: warrning,
|
|
1087
|
-
} = CartPlatformApplicationValidator.fetchCartMetaConfig().validate(
|
|
1088
|
-
{},
|
|
1089
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1090
|
-
);
|
|
1091
|
-
if (warrning) {
|
|
1092
|
-
Logger({
|
|
1093
|
-
level: "WARN",
|
|
1094
|
-
message: `Parameter Validation warrnings for platform > Cart > fetchCartMetaConfig \n ${warrning}`,
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
const query_params = {};
|
|
1099
|
-
|
|
1100
|
-
const response = await PlatformAPIClient.execute(
|
|
1101
|
-
this.config,
|
|
1102
|
-
"get",
|
|
1103
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration`,
|
|
1104
|
-
query_params,
|
|
1105
|
-
undefined,
|
|
1106
|
-
requestHeaders,
|
|
1107
|
-
{ responseHeaders }
|
|
1108
|
-
);
|
|
1109
|
-
|
|
1110
|
-
let responseData = response;
|
|
1111
|
-
if (responseHeaders) {
|
|
1112
|
-
responseData = response[0];
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
const {
|
|
1116
|
-
error: res_error,
|
|
1117
|
-
} = CartPlatformModel.CartMetaConfigAdd().validate(responseData, {
|
|
1118
|
-
abortEarly: false,
|
|
1119
|
-
allowUnknown: true,
|
|
1120
|
-
});
|
|
1121
|
-
|
|
1122
|
-
if (res_error) {
|
|
1123
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1124
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1125
|
-
} else {
|
|
1126
|
-
Logger({
|
|
1127
|
-
level: "WARN",
|
|
1128
|
-
message: `Response Validation Warnings for platform > Cart > fetchCartMetaConfig \n ${res_error}`,
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
return response;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
990
|
/**
|
|
1137
991
|
* @param {CartPlatformApplicationValidator.GetAbandonedCartParam} arg - Arg object
|
|
1138
992
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1139
993
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1140
|
-
* @returns {Promise<CartPlatformModel.
|
|
994
|
+
* @returns {Promise<CartPlatformModel.AbandonedCartResponse>} - Success response
|
|
1141
995
|
* @name getAbandonedCart
|
|
1142
996
|
* @summary: Get abandoned carts
|
|
1143
997
|
* @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCart/).
|
|
@@ -1221,7 +1075,7 @@ class Cart {
|
|
|
1221
1075
|
|
|
1222
1076
|
const {
|
|
1223
1077
|
error: res_error,
|
|
1224
|
-
} = CartPlatformModel.
|
|
1078
|
+
} = CartPlatformModel.AbandonedCartResponse().validate(responseData, {
|
|
1225
1079
|
abortEarly: false,
|
|
1226
1080
|
allowUnknown: true,
|
|
1227
1081
|
});
|
|
@@ -1240,13 +1094,63 @@ class Cart {
|
|
|
1240
1094
|
return response;
|
|
1241
1095
|
}
|
|
1242
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* @param {Object} arg - Arg object.
|
|
1099
|
+
* @param {string} arg.companyId - Current company id
|
|
1100
|
+
* @param {string} arg.applicationId - Current Application _id
|
|
1101
|
+
* @param {number} [arg.pageSize] -
|
|
1102
|
+
* @param {string} [arg.fromDate] -
|
|
1103
|
+
* @param {string} [arg.toDate] -
|
|
1104
|
+
* @param {boolean} [arg.anonymousCart] -
|
|
1105
|
+
* @param {string} [arg.lastId] -
|
|
1106
|
+
* @param {string} [arg.sortOn] -
|
|
1107
|
+
* @returns {Paginator<CartPlatformModel.AbandonedCartResponse>}
|
|
1108
|
+
* @summary: Get abandoned carts
|
|
1109
|
+
* @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel.
|
|
1110
|
+
*/
|
|
1111
|
+
getAbandonedCartPaginator({
|
|
1112
|
+
companyId,
|
|
1113
|
+
applicationId,
|
|
1114
|
+
pageSize,
|
|
1115
|
+
fromDate,
|
|
1116
|
+
toDate,
|
|
1117
|
+
anonymousCart,
|
|
1118
|
+
lastId,
|
|
1119
|
+
sortOn,
|
|
1120
|
+
} = {}) {
|
|
1121
|
+
const paginator = new Paginator();
|
|
1122
|
+
const callback = async () => {
|
|
1123
|
+
const pageId = paginator.nextId;
|
|
1124
|
+
const pageNo = paginator.pageNo;
|
|
1125
|
+
const pageType = "number";
|
|
1126
|
+
const data = await this.getAbandonedCart({
|
|
1127
|
+
companyId: companyId,
|
|
1128
|
+
applicationId: applicationId,
|
|
1129
|
+
pageNo: pageNo,
|
|
1130
|
+
pageSize: pageSize,
|
|
1131
|
+
fromDate: fromDate,
|
|
1132
|
+
toDate: toDate,
|
|
1133
|
+
anonymousCart: anonymousCart,
|
|
1134
|
+
lastId: lastId,
|
|
1135
|
+
sortOn: sortOn,
|
|
1136
|
+
});
|
|
1137
|
+
paginator.setPaginator({
|
|
1138
|
+
hasNext: data.page.has_next ? true : false,
|
|
1139
|
+
nextId: data.page.next_id,
|
|
1140
|
+
});
|
|
1141
|
+
return data;
|
|
1142
|
+
};
|
|
1143
|
+
paginator.setCallback(callback.bind(this));
|
|
1144
|
+
return paginator;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1243
1147
|
/**
|
|
1244
1148
|
* @param {CartPlatformApplicationValidator.GetAbandonedCartDetailsParam} arg
|
|
1245
1149
|
* - Arg object
|
|
1246
1150
|
*
|
|
1247
1151
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1248
1152
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1249
|
-
* @returns {Promise<CartPlatformModel.
|
|
1153
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
1250
1154
|
* @name getAbandonedCartDetails
|
|
1251
1155
|
* @summary: Get abandoned cart details
|
|
1252
1156
|
* @description: Retrieves abandoned cart details linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCartDetails/).
|
|
@@ -1312,7 +1216,7 @@ class Cart {
|
|
|
1312
1216
|
|
|
1313
1217
|
const {
|
|
1314
1218
|
error: res_error,
|
|
1315
|
-
} = CartPlatformModel.
|
|
1219
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
1316
1220
|
abortEarly: false,
|
|
1317
1221
|
allowUnknown: true,
|
|
1318
1222
|
});
|
|
@@ -1337,8 +1241,8 @@ class Cart {
|
|
|
1337
1241
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1338
1242
|
* @returns {Promise<CartPlatformModel.PlatformAddress>} - Success response
|
|
1339
1243
|
* @name getAddressById
|
|
1340
|
-
* @summary:
|
|
1341
|
-
* @description:
|
|
1244
|
+
* @summary: Fetch a single address by its ID
|
|
1245
|
+
* @description: Use this API to get an addresses using its ID. If successful, returns a Address resource in the response body specified in `PlatformAddress`. Attibutes listed below are optional mobile_no checkout_mode tags default - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddressById/).
|
|
1342
1246
|
*/
|
|
1343
1247
|
async getAddressById(
|
|
1344
1248
|
{
|
|
@@ -1445,11 +1349,11 @@ class Cart {
|
|
|
1445
1349
|
* @param {CartPlatformApplicationValidator.GetAddressesParam} arg - Arg object
|
|
1446
1350
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1447
1351
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1448
|
-
* @returns {Promise<CartPlatformModel.
|
|
1352
|
+
* @returns {Promise<CartPlatformModel.PlatformGetAddressesResponse>} -
|
|
1449
1353
|
* Success response
|
|
1450
1354
|
* @name getAddresses
|
|
1451
|
-
* @summary:
|
|
1452
|
-
* @description:
|
|
1355
|
+
* @summary: Fetch address
|
|
1356
|
+
* @description: Use this API to get all the addresses associated with an account. If successful, returns a Address resource in the response body specified in GetAddressesResponse.attibutes listed below are optional uid address_id mobile_no checkout_mode tags default - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddresses/).
|
|
1453
1357
|
*/
|
|
1454
1358
|
async getAddresses(
|
|
1455
1359
|
{
|
|
@@ -1528,10 +1432,10 @@ class Cart {
|
|
|
1528
1432
|
|
|
1529
1433
|
const {
|
|
1530
1434
|
error: res_error,
|
|
1531
|
-
} = CartPlatformModel.
|
|
1532
|
-
|
|
1533
|
-
allowUnknown: true
|
|
1534
|
-
|
|
1435
|
+
} = CartPlatformModel.PlatformGetAddressesResponse().validate(
|
|
1436
|
+
responseData,
|
|
1437
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1438
|
+
);
|
|
1535
1439
|
|
|
1536
1440
|
if (res_error) {
|
|
1537
1441
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1551,9 +1455,9 @@ class Cart {
|
|
|
1551
1455
|
* @param {CartPlatformApplicationValidator.GetAppCouponsParam} arg - Arg object
|
|
1552
1456
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1553
1457
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1554
|
-
* @returns {Promise<CartPlatformModel.
|
|
1458
|
+
* @returns {Promise<CartPlatformModel.GetCouponResponse>} - Success response
|
|
1555
1459
|
* @name getAppCoupons
|
|
1556
|
-
* @summary: List
|
|
1460
|
+
* @summary: List coupons
|
|
1557
1461
|
* @description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/).
|
|
1558
1462
|
*/
|
|
1559
1463
|
async getAppCoupons(
|
|
@@ -1615,7 +1519,7 @@ class Cart {
|
|
|
1615
1519
|
|
|
1616
1520
|
const {
|
|
1617
1521
|
error: res_error,
|
|
1618
|
-
} = CartPlatformModel.
|
|
1522
|
+
} = CartPlatformModel.GetCouponResponse().validate(responseData, {
|
|
1619
1523
|
abortEarly: false,
|
|
1620
1524
|
allowUnknown: true,
|
|
1621
1525
|
});
|
|
@@ -1640,7 +1544,7 @@ class Cart {
|
|
|
1640
1544
|
*
|
|
1641
1545
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1642
1546
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1643
|
-
* @returns {Promise<CartPlatformModel.
|
|
1547
|
+
* @returns {Promise<CartPlatformModel.CartDeliveryModesResponse>} - Success response
|
|
1644
1548
|
* @name getAvailableDeliveryModes
|
|
1645
1549
|
* @summary: Get delivery modes
|
|
1646
1550
|
* @description: Retrieve a list of delivery modes (home delivery/store pickup) along with a list of available pickup stores for a given cart at a specified PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAvailableDeliveryModes/).
|
|
@@ -1700,7 +1604,7 @@ class Cart {
|
|
|
1700
1604
|
|
|
1701
1605
|
const {
|
|
1702
1606
|
error: res_error,
|
|
1703
|
-
} = CartPlatformModel.
|
|
1607
|
+
} = CartPlatformModel.CartDeliveryModesResponse().validate(responseData, {
|
|
1704
1608
|
abortEarly: false,
|
|
1705
1609
|
allowUnknown: true,
|
|
1706
1610
|
});
|
|
@@ -1723,13 +1627,13 @@ class Cart {
|
|
|
1723
1627
|
* @param {CartPlatformApplicationValidator.GetCartParam} arg - Arg object
|
|
1724
1628
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1725
1629
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1726
|
-
* @returns {Promise<CartPlatformModel.
|
|
1630
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
1727
1631
|
* @name getCart
|
|
1728
|
-
* @summary:
|
|
1729
|
-
* @description:
|
|
1632
|
+
* @summary: Fetch all items added to the customer cart using cart id
|
|
1633
|
+
* @description: Use this API to get details of all the items added to a cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/).
|
|
1730
1634
|
*/
|
|
1731
1635
|
async getCart(
|
|
1732
|
-
{ id, userId,
|
|
1636
|
+
{ id, userId, i, b, assignCardId, buyNow, cartType, requestHeaders } = {
|
|
1733
1637
|
requestHeaders: {},
|
|
1734
1638
|
},
|
|
1735
1639
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -1738,11 +1642,11 @@ class Cart {
|
|
|
1738
1642
|
{
|
|
1739
1643
|
id,
|
|
1740
1644
|
userId,
|
|
1741
|
-
orderType,
|
|
1742
1645
|
i,
|
|
1743
1646
|
b,
|
|
1744
1647
|
assignCardId,
|
|
1745
1648
|
buyNow,
|
|
1649
|
+
cartType,
|
|
1746
1650
|
},
|
|
1747
1651
|
{ abortEarly: false, allowUnknown: true }
|
|
1748
1652
|
);
|
|
@@ -1757,11 +1661,11 @@ class Cart {
|
|
|
1757
1661
|
{
|
|
1758
1662
|
id,
|
|
1759
1663
|
userId,
|
|
1760
|
-
orderType,
|
|
1761
1664
|
i,
|
|
1762
1665
|
b,
|
|
1763
1666
|
assignCardId,
|
|
1764
1667
|
buyNow,
|
|
1668
|
+
cartType,
|
|
1765
1669
|
},
|
|
1766
1670
|
{ abortEarly: false, allowUnknown: false }
|
|
1767
1671
|
);
|
|
@@ -1775,11 +1679,11 @@ class Cart {
|
|
|
1775
1679
|
const query_params = {};
|
|
1776
1680
|
query_params["id"] = id;
|
|
1777
1681
|
query_params["user_id"] = userId;
|
|
1778
|
-
query_params["order_type"] = orderType;
|
|
1779
1682
|
query_params["i"] = i;
|
|
1780
1683
|
query_params["b"] = b;
|
|
1781
1684
|
query_params["assign_card_id"] = assignCardId;
|
|
1782
1685
|
query_params["buy_now"] = buyNow;
|
|
1686
|
+
query_params["cart_type"] = cartType;
|
|
1783
1687
|
|
|
1784
1688
|
const response = await PlatformAPIClient.execute(
|
|
1785
1689
|
this.config,
|
|
@@ -1798,10 +1702,174 @@ class Cart {
|
|
|
1798
1702
|
|
|
1799
1703
|
const {
|
|
1800
1704
|
error: res_error,
|
|
1801
|
-
} = CartPlatformModel.
|
|
1802
|
-
abortEarly: false,
|
|
1803
|
-
allowUnknown: true,
|
|
1804
|
-
});
|
|
1705
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
1706
|
+
abortEarly: false,
|
|
1707
|
+
allowUnknown: true,
|
|
1708
|
+
});
|
|
1709
|
+
|
|
1710
|
+
if (res_error) {
|
|
1711
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1712
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1713
|
+
} else {
|
|
1714
|
+
Logger({
|
|
1715
|
+
level: "WARN",
|
|
1716
|
+
message: `Response Validation Warnings for platform > Cart > getCart \n ${res_error}`,
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
return response;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
/**
|
|
1725
|
+
* @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object
|
|
1726
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1727
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1728
|
+
* @returns {Promise<CartPlatformModel.MultiCartResponse>} - Success response
|
|
1729
|
+
* @name getCartList
|
|
1730
|
+
* @summary: Get cart list for store os user
|
|
1731
|
+
* @description: Get all carts for the store os user which is created for customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/).
|
|
1732
|
+
*/
|
|
1733
|
+
async getCartList(
|
|
1734
|
+
{ fromDate, toDate, filterOn, requestHeaders } = { requestHeaders: {} },
|
|
1735
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1736
|
+
) {
|
|
1737
|
+
const { error } = CartPlatformApplicationValidator.getCartList().validate(
|
|
1738
|
+
{
|
|
1739
|
+
fromDate,
|
|
1740
|
+
toDate,
|
|
1741
|
+
filterOn,
|
|
1742
|
+
},
|
|
1743
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1744
|
+
);
|
|
1745
|
+
if (error) {
|
|
1746
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1750
|
+
const {
|
|
1751
|
+
error: warrning,
|
|
1752
|
+
} = CartPlatformApplicationValidator.getCartList().validate(
|
|
1753
|
+
{
|
|
1754
|
+
fromDate,
|
|
1755
|
+
toDate,
|
|
1756
|
+
filterOn,
|
|
1757
|
+
},
|
|
1758
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1759
|
+
);
|
|
1760
|
+
if (warrning) {
|
|
1761
|
+
Logger({
|
|
1762
|
+
level: "WARN",
|
|
1763
|
+
message: `Parameter Validation warrnings for platform > Cart > getCartList \n ${warrning}`,
|
|
1764
|
+
});
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
const query_params = {};
|
|
1768
|
+
query_params["from_date"] = fromDate;
|
|
1769
|
+
query_params["to_date"] = toDate;
|
|
1770
|
+
query_params["filter_on"] = filterOn;
|
|
1771
|
+
|
|
1772
|
+
const response = await PlatformAPIClient.execute(
|
|
1773
|
+
this.config,
|
|
1774
|
+
"get",
|
|
1775
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart-list`,
|
|
1776
|
+
query_params,
|
|
1777
|
+
undefined,
|
|
1778
|
+
requestHeaders,
|
|
1779
|
+
{ responseHeaders }
|
|
1780
|
+
);
|
|
1781
|
+
|
|
1782
|
+
let responseData = response;
|
|
1783
|
+
if (responseHeaders) {
|
|
1784
|
+
responseData = response[0];
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
const {
|
|
1788
|
+
error: res_error,
|
|
1789
|
+
} = CartPlatformModel.MultiCartResponse().validate(responseData, {
|
|
1790
|
+
abortEarly: false,
|
|
1791
|
+
allowUnknown: true,
|
|
1792
|
+
});
|
|
1793
|
+
|
|
1794
|
+
if (res_error) {
|
|
1795
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1796
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1797
|
+
} else {
|
|
1798
|
+
Logger({
|
|
1799
|
+
level: "WARN",
|
|
1800
|
+
message: `Response Validation Warnings for platform > Cart > getCartList \n ${res_error}`,
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
return response;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* @param {CartPlatformApplicationValidator.GetCartMetaConfigParam} arg - Arg object
|
|
1810
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1811
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1812
|
+
* @returns {Promise<CartPlatformModel.CartMetaConfigDetailResponse>} -
|
|
1813
|
+
* Success response
|
|
1814
|
+
* @name getCartMetaConfig
|
|
1815
|
+
* @summary: Get cart meta configuration by id
|
|
1816
|
+
* @description: Get cart meta configuration by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartMetaConfig/).
|
|
1817
|
+
*/
|
|
1818
|
+
async getCartMetaConfig(
|
|
1819
|
+
{ cartMetaId, requestHeaders } = { requestHeaders: {} },
|
|
1820
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1821
|
+
) {
|
|
1822
|
+
const {
|
|
1823
|
+
error,
|
|
1824
|
+
} = CartPlatformApplicationValidator.getCartMetaConfig().validate(
|
|
1825
|
+
{
|
|
1826
|
+
cartMetaId,
|
|
1827
|
+
},
|
|
1828
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1829
|
+
);
|
|
1830
|
+
if (error) {
|
|
1831
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1835
|
+
const {
|
|
1836
|
+
error: warrning,
|
|
1837
|
+
} = CartPlatformApplicationValidator.getCartMetaConfig().validate(
|
|
1838
|
+
{
|
|
1839
|
+
cartMetaId,
|
|
1840
|
+
},
|
|
1841
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1842
|
+
);
|
|
1843
|
+
if (warrning) {
|
|
1844
|
+
Logger({
|
|
1845
|
+
level: "WARN",
|
|
1846
|
+
message: `Parameter Validation warrnings for platform > Cart > getCartMetaConfig \n ${warrning}`,
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
const query_params = {};
|
|
1851
|
+
|
|
1852
|
+
const response = await PlatformAPIClient.execute(
|
|
1853
|
+
this.config,
|
|
1854
|
+
"get",
|
|
1855
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration/${cartMetaId}`,
|
|
1856
|
+
query_params,
|
|
1857
|
+
undefined,
|
|
1858
|
+
requestHeaders,
|
|
1859
|
+
{ responseHeaders }
|
|
1860
|
+
);
|
|
1861
|
+
|
|
1862
|
+
let responseData = response;
|
|
1863
|
+
if (responseHeaders) {
|
|
1864
|
+
responseData = response[0];
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
const {
|
|
1868
|
+
error: res_error,
|
|
1869
|
+
} = CartPlatformModel.CartMetaConfigDetailResponse().validate(
|
|
1870
|
+
responseData,
|
|
1871
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1872
|
+
);
|
|
1805
1873
|
|
|
1806
1874
|
if (res_error) {
|
|
1807
1875
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -1809,7 +1877,7 @@ class Cart {
|
|
|
1809
1877
|
} else {
|
|
1810
1878
|
Logger({
|
|
1811
1879
|
level: "WARN",
|
|
1812
|
-
message: `Response Validation Warnings for platform > Cart >
|
|
1880
|
+
message: `Response Validation Warnings for platform > Cart > getCartMetaConfig \n ${res_error}`,
|
|
1813
1881
|
});
|
|
1814
1882
|
}
|
|
1815
1883
|
}
|
|
@@ -1818,24 +1886,22 @@ class Cart {
|
|
|
1818
1886
|
}
|
|
1819
1887
|
|
|
1820
1888
|
/**
|
|
1821
|
-
* @param {CartPlatformApplicationValidator.
|
|
1889
|
+
* @param {CartPlatformApplicationValidator.GetCartMetaConfigsParam} arg - Arg object
|
|
1822
1890
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1823
1891
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1824
|
-
* @returns {Promise<CartPlatformModel.
|
|
1825
|
-
* @name
|
|
1826
|
-
* @summary:
|
|
1827
|
-
* @description:
|
|
1892
|
+
* @returns {Promise<CartPlatformModel.CartMetaConfigListResponse>} - Success response
|
|
1893
|
+
* @name getCartMetaConfigs
|
|
1894
|
+
* @summary: Fetch cart meta configuration
|
|
1895
|
+
* @description: Fetch cart meta configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartMetaConfigs/).
|
|
1828
1896
|
*/
|
|
1829
|
-
async
|
|
1830
|
-
{
|
|
1897
|
+
async getCartMetaConfigs(
|
|
1898
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1831
1899
|
{ responseHeaders } = { responseHeaders: false }
|
|
1832
1900
|
) {
|
|
1833
|
-
const {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
filterOn,
|
|
1838
|
-
},
|
|
1901
|
+
const {
|
|
1902
|
+
error,
|
|
1903
|
+
} = CartPlatformApplicationValidator.getCartMetaConfigs().validate(
|
|
1904
|
+
{},
|
|
1839
1905
|
{ abortEarly: false, allowUnknown: true }
|
|
1840
1906
|
);
|
|
1841
1907
|
if (error) {
|
|
@@ -1845,30 +1911,23 @@ class Cart {
|
|
|
1845
1911
|
// Showing warrnings if extra unknown parameters are found
|
|
1846
1912
|
const {
|
|
1847
1913
|
error: warrning,
|
|
1848
|
-
} = CartPlatformApplicationValidator.
|
|
1849
|
-
{
|
|
1850
|
-
fromDate,
|
|
1851
|
-
toDate,
|
|
1852
|
-
filterOn,
|
|
1853
|
-
},
|
|
1914
|
+
} = CartPlatformApplicationValidator.getCartMetaConfigs().validate(
|
|
1915
|
+
{},
|
|
1854
1916
|
{ abortEarly: false, allowUnknown: false }
|
|
1855
1917
|
);
|
|
1856
1918
|
if (warrning) {
|
|
1857
1919
|
Logger({
|
|
1858
1920
|
level: "WARN",
|
|
1859
|
-
message: `Parameter Validation warrnings for platform > Cart >
|
|
1921
|
+
message: `Parameter Validation warrnings for platform > Cart > getCartMetaConfigs \n ${warrning}`,
|
|
1860
1922
|
});
|
|
1861
1923
|
}
|
|
1862
1924
|
|
|
1863
1925
|
const query_params = {};
|
|
1864
|
-
query_params["from_date"] = fromDate;
|
|
1865
|
-
query_params["to_date"] = toDate;
|
|
1866
|
-
query_params["filter_on"] = filterOn;
|
|
1867
1926
|
|
|
1868
1927
|
const response = await PlatformAPIClient.execute(
|
|
1869
1928
|
this.config,
|
|
1870
1929
|
"get",
|
|
1871
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1930
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration`,
|
|
1872
1931
|
query_params,
|
|
1873
1932
|
undefined,
|
|
1874
1933
|
requestHeaders,
|
|
@@ -1882,7 +1941,7 @@ class Cart {
|
|
|
1882
1941
|
|
|
1883
1942
|
const {
|
|
1884
1943
|
error: res_error,
|
|
1885
|
-
} = CartPlatformModel.
|
|
1944
|
+
} = CartPlatformModel.CartMetaConfigListResponse().validate(responseData, {
|
|
1886
1945
|
abortEarly: false,
|
|
1887
1946
|
allowUnknown: true,
|
|
1888
1947
|
});
|
|
@@ -1893,7 +1952,7 @@ class Cart {
|
|
|
1893
1952
|
} else {
|
|
1894
1953
|
Logger({
|
|
1895
1954
|
level: "WARN",
|
|
1896
|
-
message: `Response Validation Warnings for platform > Cart >
|
|
1955
|
+
message: `Response Validation Warnings for platform > Cart > getCartMetaConfigs \n ${res_error}`,
|
|
1897
1956
|
});
|
|
1898
1957
|
}
|
|
1899
1958
|
}
|
|
@@ -1905,7 +1964,7 @@ class Cart {
|
|
|
1905
1964
|
* @param {CartPlatformApplicationValidator.GetCartShareLinkParam} arg - Arg object
|
|
1906
1965
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1907
1966
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1908
|
-
* @returns {Promise<CartPlatformModel.
|
|
1967
|
+
* @returns {Promise<CartPlatformModel.GetShareCartLinkResponse>} - Success response
|
|
1909
1968
|
* @name getCartShareLink
|
|
1910
1969
|
* @summary: Share cart link
|
|
1911
1970
|
* @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartShareLink/).
|
|
@@ -1961,7 +2020,7 @@ class Cart {
|
|
|
1961
2020
|
|
|
1962
2021
|
const {
|
|
1963
2022
|
error: res_error,
|
|
1964
|
-
} = CartPlatformModel.
|
|
2023
|
+
} = CartPlatformModel.GetShareCartLinkResponse().validate(responseData, {
|
|
1965
2024
|
abortEarly: false,
|
|
1966
2025
|
allowUnknown: true,
|
|
1967
2026
|
});
|
|
@@ -1984,10 +2043,10 @@ class Cart {
|
|
|
1984
2043
|
* @param {CartPlatformApplicationValidator.GetCartSharedItemsParam} arg - Arg object
|
|
1985
2044
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1986
2045
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1987
|
-
* @returns {Promise<CartPlatformModel.
|
|
2046
|
+
* @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
|
|
1988
2047
|
* @name getCartSharedItems
|
|
1989
|
-
* @summary:
|
|
1990
|
-
* @description:
|
|
2048
|
+
* @summary: Get details of a shared cart
|
|
2049
|
+
* @description: Use this API to get the shared cart details as per the token generated using the share-cart API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartSharedItems/).
|
|
1991
2050
|
*/
|
|
1992
2051
|
async getCartSharedItems(
|
|
1993
2052
|
{ token, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2040,7 +2099,7 @@ class Cart {
|
|
|
2040
2099
|
|
|
2041
2100
|
const {
|
|
2042
2101
|
error: res_error,
|
|
2043
|
-
} = CartPlatformModel.
|
|
2102
|
+
} = CartPlatformModel.SharedCartResponse().validate(responseData, {
|
|
2044
2103
|
abortEarly: false,
|
|
2045
2104
|
allowUnknown: true,
|
|
2046
2105
|
});
|
|
@@ -2065,7 +2124,7 @@ class Cart {
|
|
|
2065
2124
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2066
2125
|
* @returns {Promise<CartPlatformModel.CouponUpdate>} - Success response
|
|
2067
2126
|
* @name getCouponById
|
|
2068
|
-
* @summary: Get
|
|
2127
|
+
* @summary: Get coupon details by ID
|
|
2069
2128
|
* @description: Retrieve details of a specific coupon by providing its unique identifier to obtain information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponById/).
|
|
2070
2129
|
*/
|
|
2071
2130
|
async getCouponById(
|
|
@@ -2142,8 +2201,8 @@ class Cart {
|
|
|
2142
2201
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2143
2202
|
* @returns {Promise<Object>} - Success response
|
|
2144
2203
|
* @name getCouponCodeExists
|
|
2145
|
-
* @summary: Check coupon code
|
|
2146
|
-
* @description:
|
|
2204
|
+
* @summary: Check if coupon is already created with coupon code
|
|
2205
|
+
* @description: Check if sent coupon code is already existing coupon code. As coupon code is to be unique. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponCodeExists/).
|
|
2147
2206
|
*/
|
|
2148
2207
|
async getCouponCodeExists(
|
|
2149
2208
|
{ code, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2220,10 +2279,10 @@ class Cart {
|
|
|
2220
2279
|
*
|
|
2221
2280
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2222
2281
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2223
|
-
* @returns {Promise<
|
|
2282
|
+
* @returns {Promise<CartPlatformModel.CouponOptions>} - Success response
|
|
2224
2283
|
* @name getCouponOptionValues
|
|
2225
|
-
* @summary: Get coupon
|
|
2226
|
-
* @description:
|
|
2284
|
+
* @summary: Get coupon options enums with display values
|
|
2285
|
+
* @description: Get coupon enum values for fields in valid coupon object. Used for front end to create, update and filter coupon lists via fields - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponOptionValues/).
|
|
2227
2286
|
*/
|
|
2228
2287
|
async getCouponOptionValues(
|
|
2229
2288
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -2270,7 +2329,9 @@ class Cart {
|
|
|
2270
2329
|
responseData = response[0];
|
|
2271
2330
|
}
|
|
2272
2331
|
|
|
2273
|
-
const {
|
|
2332
|
+
const {
|
|
2333
|
+
error: res_error,
|
|
2334
|
+
} = CartPlatformModel.CouponOptions().validate(responseData, {
|
|
2274
2335
|
abortEarly: false,
|
|
2275
2336
|
allowUnknown: true,
|
|
2276
2337
|
});
|
|
@@ -2289,14 +2350,87 @@ class Cart {
|
|
|
2289
2350
|
return response;
|
|
2290
2351
|
}
|
|
2291
2352
|
|
|
2353
|
+
/**
|
|
2354
|
+
* @param {CartPlatformApplicationValidator.GetCouponTagsParam} arg - Arg object
|
|
2355
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2356
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2357
|
+
* @returns {Promise<CartPlatformModel.TagsViewResponse>} - Success response
|
|
2358
|
+
* @name getCouponTags
|
|
2359
|
+
* @summary: Get a list of all coupon tags associated with a application.
|
|
2360
|
+
* @description: This API helps to get coupon tags data associated to a particular application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponTags/).
|
|
2361
|
+
*/
|
|
2362
|
+
async getCouponTags(
|
|
2363
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2364
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2365
|
+
) {
|
|
2366
|
+
const { error } = CartPlatformApplicationValidator.getCouponTags().validate(
|
|
2367
|
+
{},
|
|
2368
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2369
|
+
);
|
|
2370
|
+
if (error) {
|
|
2371
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2375
|
+
const {
|
|
2376
|
+
error: warrning,
|
|
2377
|
+
} = CartPlatformApplicationValidator.getCouponTags().validate(
|
|
2378
|
+
{},
|
|
2379
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2380
|
+
);
|
|
2381
|
+
if (warrning) {
|
|
2382
|
+
Logger({
|
|
2383
|
+
level: "WARN",
|
|
2384
|
+
message: `Parameter Validation warrnings for platform > Cart > getCouponTags \n ${warrning}`,
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
const query_params = {};
|
|
2389
|
+
|
|
2390
|
+
const response = await PlatformAPIClient.execute(
|
|
2391
|
+
this.config,
|
|
2392
|
+
"get",
|
|
2393
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon-tags`,
|
|
2394
|
+
query_params,
|
|
2395
|
+
undefined,
|
|
2396
|
+
requestHeaders,
|
|
2397
|
+
{ responseHeaders }
|
|
2398
|
+
);
|
|
2399
|
+
|
|
2400
|
+
let responseData = response;
|
|
2401
|
+
if (responseHeaders) {
|
|
2402
|
+
responseData = response[0];
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
const {
|
|
2406
|
+
error: res_error,
|
|
2407
|
+
} = CartPlatformModel.TagsViewResponse().validate(responseData, {
|
|
2408
|
+
abortEarly: false,
|
|
2409
|
+
allowUnknown: true,
|
|
2410
|
+
});
|
|
2411
|
+
|
|
2412
|
+
if (res_error) {
|
|
2413
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
2414
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2415
|
+
} else {
|
|
2416
|
+
Logger({
|
|
2417
|
+
level: "WARN",
|
|
2418
|
+
message: `Response Validation Warnings for platform > Cart > getCouponTags \n ${res_error}`,
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
return response;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2292
2426
|
/**
|
|
2293
2427
|
* @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object
|
|
2294
2428
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2295
2429
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2296
|
-
* @returns {Promise<CartPlatformModel.
|
|
2430
|
+
* @returns {Promise<CartPlatformModel.CouponsResponse>} - Success response
|
|
2297
2431
|
* @name getCoupons
|
|
2298
|
-
* @summary:
|
|
2299
|
-
* @description: Retrieve a list of
|
|
2432
|
+
* @summary: Retrieve available coupons.
|
|
2433
|
+
* @description: Retrieve a list of available coupons for use in the shopping cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCoupons/).
|
|
2300
2434
|
*/
|
|
2301
2435
|
async getCoupons(
|
|
2302
2436
|
{
|
|
@@ -2308,13 +2442,6 @@ class Cart {
|
|
|
2308
2442
|
isDisplay,
|
|
2309
2443
|
typeSlug,
|
|
2310
2444
|
code,
|
|
2311
|
-
createdBy,
|
|
2312
|
-
reviewedBy,
|
|
2313
|
-
approvedStartTime,
|
|
2314
|
-
approvedEndTime,
|
|
2315
|
-
reviewStartTime,
|
|
2316
|
-
reviewEndTime,
|
|
2317
|
-
status,
|
|
2318
2445
|
requestHeaders,
|
|
2319
2446
|
} = { requestHeaders: {} },
|
|
2320
2447
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -2329,13 +2456,6 @@ class Cart {
|
|
|
2329
2456
|
isDisplay,
|
|
2330
2457
|
typeSlug,
|
|
2331
2458
|
code,
|
|
2332
|
-
createdBy,
|
|
2333
|
-
reviewedBy,
|
|
2334
|
-
approvedStartTime,
|
|
2335
|
-
approvedEndTime,
|
|
2336
|
-
reviewStartTime,
|
|
2337
|
-
reviewEndTime,
|
|
2338
|
-
status,
|
|
2339
2459
|
},
|
|
2340
2460
|
{ abortEarly: false, allowUnknown: true }
|
|
2341
2461
|
);
|
|
@@ -2356,13 +2476,6 @@ class Cart {
|
|
|
2356
2476
|
isDisplay,
|
|
2357
2477
|
typeSlug,
|
|
2358
2478
|
code,
|
|
2359
|
-
createdBy,
|
|
2360
|
-
reviewedBy,
|
|
2361
|
-
approvedStartTime,
|
|
2362
|
-
approvedEndTime,
|
|
2363
|
-
reviewStartTime,
|
|
2364
|
-
reviewEndTime,
|
|
2365
|
-
status,
|
|
2366
2479
|
},
|
|
2367
2480
|
{ abortEarly: false, allowUnknown: false }
|
|
2368
2481
|
);
|
|
@@ -2382,13 +2495,6 @@ class Cart {
|
|
|
2382
2495
|
query_params["is_display"] = isDisplay;
|
|
2383
2496
|
query_params["type_slug"] = typeSlug;
|
|
2384
2497
|
query_params["code"] = code;
|
|
2385
|
-
query_params["created_by"] = createdBy;
|
|
2386
|
-
query_params["reviewed_by"] = reviewedBy;
|
|
2387
|
-
query_params["approved_start_time"] = approvedStartTime;
|
|
2388
|
-
query_params["approved_end_time"] = approvedEndTime;
|
|
2389
|
-
query_params["review_start_time"] = reviewStartTime;
|
|
2390
|
-
query_params["review_end_time"] = reviewEndTime;
|
|
2391
|
-
query_params["status"] = status;
|
|
2392
2498
|
|
|
2393
2499
|
const response = await PlatformAPIClient.execute(
|
|
2394
2500
|
this.config,
|
|
@@ -2407,7 +2513,7 @@ class Cart {
|
|
|
2407
2513
|
|
|
2408
2514
|
const {
|
|
2409
2515
|
error: res_error,
|
|
2410
|
-
} = CartPlatformModel.
|
|
2516
|
+
} = CartPlatformModel.CouponsResponse().validate(responseData, {
|
|
2411
2517
|
abortEarly: false,
|
|
2412
2518
|
allowUnknown: true,
|
|
2413
2519
|
});
|
|
@@ -2426,23 +2532,77 @@ class Cart {
|
|
|
2426
2532
|
return response;
|
|
2427
2533
|
}
|
|
2428
2534
|
|
|
2535
|
+
/**
|
|
2536
|
+
* @param {Object} arg - Arg object.
|
|
2537
|
+
* @param {string} arg.companyId - Current company id
|
|
2538
|
+
* @param {string} arg.applicationId - Current Application _id
|
|
2539
|
+
* @param {number} [arg.pageSize] -
|
|
2540
|
+
* @param {boolean} [arg.isArchived] -
|
|
2541
|
+
* @param {string} [arg.title] -
|
|
2542
|
+
* @param {boolean} [arg.isPublic] -
|
|
2543
|
+
* @param {boolean} [arg.isDisplay] -
|
|
2544
|
+
* @param {string} [arg.typeSlug] -
|
|
2545
|
+
* @param {string} [arg.code] -
|
|
2546
|
+
* @returns {Paginator<CartPlatformModel.CouponsResponse>}
|
|
2547
|
+
* @summary: Retrieve available coupons.
|
|
2548
|
+
* @description: Retrieve a list of available coupons for use in the shopping cart.
|
|
2549
|
+
*/
|
|
2550
|
+
getCouponsPaginator({
|
|
2551
|
+
companyId,
|
|
2552
|
+
applicationId,
|
|
2553
|
+
pageSize,
|
|
2554
|
+
isArchived,
|
|
2555
|
+
title,
|
|
2556
|
+
isPublic,
|
|
2557
|
+
isDisplay,
|
|
2558
|
+
typeSlug,
|
|
2559
|
+
code,
|
|
2560
|
+
} = {}) {
|
|
2561
|
+
const paginator = new Paginator();
|
|
2562
|
+
const callback = async () => {
|
|
2563
|
+
const pageId = paginator.nextId;
|
|
2564
|
+
const pageNo = paginator.pageNo;
|
|
2565
|
+
const pageType = "number";
|
|
2566
|
+
const data = await this.getCoupons({
|
|
2567
|
+
companyId: companyId,
|
|
2568
|
+
applicationId: applicationId,
|
|
2569
|
+
pageNo: pageNo,
|
|
2570
|
+
pageSize: pageSize,
|
|
2571
|
+
isArchived: isArchived,
|
|
2572
|
+
title: title,
|
|
2573
|
+
isPublic: isPublic,
|
|
2574
|
+
isDisplay: isDisplay,
|
|
2575
|
+
typeSlug: typeSlug,
|
|
2576
|
+
code: code,
|
|
2577
|
+
});
|
|
2578
|
+
paginator.setPaginator({
|
|
2579
|
+
hasNext: data.page.has_next ? true : false,
|
|
2580
|
+
nextId: data.page.next_id,
|
|
2581
|
+
});
|
|
2582
|
+
return data;
|
|
2583
|
+
};
|
|
2584
|
+
paginator.setCallback(callback.bind(this));
|
|
2585
|
+
return paginator;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2429
2588
|
/**
|
|
2430
2589
|
* @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object
|
|
2431
2590
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2432
2591
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2433
|
-
* @returns {Promise<CartPlatformModel.
|
|
2592
|
+
* @returns {Promise<CartPlatformModel.CartItemCountResponse>} - Success response
|
|
2434
2593
|
* @name getItemCount
|
|
2435
|
-
* @summary:
|
|
2436
|
-
* @description:
|
|
2594
|
+
* @summary: Count items in the customer's cart
|
|
2595
|
+
* @description: Use this API to get the total number of items present in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/).
|
|
2437
2596
|
*/
|
|
2438
2597
|
async getItemCount(
|
|
2439
|
-
{ id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
2598
|
+
{ id, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
2440
2599
|
{ responseHeaders } = { responseHeaders: false }
|
|
2441
2600
|
) {
|
|
2442
2601
|
const { error } = CartPlatformApplicationValidator.getItemCount().validate(
|
|
2443
2602
|
{
|
|
2444
2603
|
id,
|
|
2445
2604
|
buyNow,
|
|
2605
|
+
cartType,
|
|
2446
2606
|
},
|
|
2447
2607
|
{ abortEarly: false, allowUnknown: true }
|
|
2448
2608
|
);
|
|
@@ -2457,6 +2617,7 @@ class Cart {
|
|
|
2457
2617
|
{
|
|
2458
2618
|
id,
|
|
2459
2619
|
buyNow,
|
|
2620
|
+
cartType,
|
|
2460
2621
|
},
|
|
2461
2622
|
{ abortEarly: false, allowUnknown: false }
|
|
2462
2623
|
);
|
|
@@ -2470,6 +2631,7 @@ class Cart {
|
|
|
2470
2631
|
const query_params = {};
|
|
2471
2632
|
query_params["id"] = id;
|
|
2472
2633
|
query_params["buy_now"] = buyNow;
|
|
2634
|
+
query_params["cart_type"] = cartType;
|
|
2473
2635
|
|
|
2474
2636
|
const response = await PlatformAPIClient.execute(
|
|
2475
2637
|
this.config,
|
|
@@ -2488,7 +2650,7 @@ class Cart {
|
|
|
2488
2650
|
|
|
2489
2651
|
const {
|
|
2490
2652
|
error: res_error,
|
|
2491
|
-
} = CartPlatformModel.
|
|
2653
|
+
} = CartPlatformModel.CartItemCountResponse().validate(responseData, {
|
|
2492
2654
|
abortEarly: false,
|
|
2493
2655
|
allowUnknown: true,
|
|
2494
2656
|
});
|
|
@@ -2511,7 +2673,7 @@ class Cart {
|
|
|
2511
2673
|
* @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object
|
|
2512
2674
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2513
2675
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2514
|
-
* @returns {Promise<CartPlatformModel.
|
|
2676
|
+
* @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
|
|
2515
2677
|
* @name getPriceAdjustments
|
|
2516
2678
|
* @summary: Get a list of all price adjustments associated with a cart
|
|
2517
2679
|
* @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/).
|
|
@@ -2568,7 +2730,7 @@ class Cart {
|
|
|
2568
2730
|
|
|
2569
2731
|
const {
|
|
2570
2732
|
error: res_error,
|
|
2571
|
-
} = CartPlatformModel.
|
|
2733
|
+
} = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, {
|
|
2572
2734
|
abortEarly: false,
|
|
2573
2735
|
allowUnknown: true,
|
|
2574
2736
|
});
|
|
@@ -2593,7 +2755,7 @@ class Cart {
|
|
|
2593
2755
|
*
|
|
2594
2756
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2595
2757
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2596
|
-
* @returns {Promise<CartPlatformModel.
|
|
2758
|
+
* @returns {Promise<CartPlatformModel.ActivePromosResponse>} - Success response
|
|
2597
2759
|
* @name getPromosCouponConfig
|
|
2598
2760
|
* @summary: Get promotion and coupon type
|
|
2599
2761
|
* @description: Retrieve the configuration settings related to promotions and coupons for a specific seller. It provides details of the supported types of coupons and promotions along with their descriptions, examples, and related attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromosCouponConfig/).
|
|
@@ -2653,7 +2815,7 @@ class Cart {
|
|
|
2653
2815
|
|
|
2654
2816
|
const {
|
|
2655
2817
|
error: res_error,
|
|
2656
|
-
} = CartPlatformModel.
|
|
2818
|
+
} = CartPlatformModel.ActivePromosResponse().validate(responseData, {
|
|
2657
2819
|
abortEarly: false,
|
|
2658
2820
|
allowUnknown: true,
|
|
2659
2821
|
});
|
|
@@ -2676,9 +2838,9 @@ class Cart {
|
|
|
2676
2838
|
* @param {CartPlatformApplicationValidator.GetPromotionByIdParam} arg - Arg object
|
|
2677
2839
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2678
2840
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2679
|
-
* @returns {Promise<CartPlatformModel.
|
|
2841
|
+
* @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
|
|
2680
2842
|
* @name getPromotionById
|
|
2681
|
-
* @summary: Get a
|
|
2843
|
+
* @summary: Get a promotion
|
|
2682
2844
|
* @description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionById/).
|
|
2683
2845
|
*/
|
|
2684
2846
|
async getPromotionById(
|
|
@@ -2732,7 +2894,7 @@ class Cart {
|
|
|
2732
2894
|
|
|
2733
2895
|
const {
|
|
2734
2896
|
error: res_error,
|
|
2735
|
-
} = CartPlatformModel.
|
|
2897
|
+
} = CartPlatformModel.PromotionUpdate().validate(responseData, {
|
|
2736
2898
|
abortEarly: false,
|
|
2737
2899
|
allowUnknown: true,
|
|
2738
2900
|
});
|
|
@@ -2759,8 +2921,8 @@ class Cart {
|
|
|
2759
2921
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2760
2922
|
* @returns {Promise<Object>} - Success response
|
|
2761
2923
|
* @name getPromotionCodeExists
|
|
2762
|
-
* @summary: Check promotion code
|
|
2763
|
-
* @description:
|
|
2924
|
+
* @summary: Check if promotion is already created with promotion code
|
|
2925
|
+
* @description: Check if sent promotion code is already existing promotion code. As promotion code is to be unique. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionCodeExists/).
|
|
2764
2926
|
*/
|
|
2765
2927
|
async getPromotionCodeExists(
|
|
2766
2928
|
{ code, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2832,30 +2994,22 @@ class Cart {
|
|
|
2832
2994
|
}
|
|
2833
2995
|
|
|
2834
2996
|
/**
|
|
2835
|
-
* @param {CartPlatformApplicationValidator.
|
|
2997
|
+
* @param {CartPlatformApplicationValidator.GetPromotionTagsParam} arg - Arg object
|
|
2836
2998
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2837
2999
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2838
|
-
* @returns {Promise<CartPlatformModel.
|
|
2839
|
-
* @name
|
|
2840
|
-
* @summary:
|
|
2841
|
-
* @description:
|
|
3000
|
+
* @returns {Promise<CartPlatformModel.TagsViewResponse>} - Success response
|
|
3001
|
+
* @name getPromotionTags
|
|
3002
|
+
* @summary: Get a list of all Promotion tags associated with a application.
|
|
3003
|
+
* @description: This API helps to get Promotion tags data associated to a particular application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionTags/).
|
|
2842
3004
|
*/
|
|
2843
|
-
async
|
|
2844
|
-
{
|
|
2845
|
-
requestHeaders: {},
|
|
2846
|
-
},
|
|
3005
|
+
async getPromotionTags(
|
|
3006
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2847
3007
|
{ responseHeaders } = { responseHeaders: false }
|
|
2848
3008
|
) {
|
|
2849
3009
|
const {
|
|
2850
3010
|
error,
|
|
2851
|
-
} = CartPlatformApplicationValidator.
|
|
2852
|
-
{
|
|
2853
|
-
slug,
|
|
2854
|
-
pageSize,
|
|
2855
|
-
promotionGroup,
|
|
2856
|
-
storeId,
|
|
2857
|
-
cartType,
|
|
2858
|
-
},
|
|
3011
|
+
} = CartPlatformApplicationValidator.getPromotionTags().validate(
|
|
3012
|
+
{},
|
|
2859
3013
|
{ abortEarly: false, allowUnknown: true }
|
|
2860
3014
|
);
|
|
2861
3015
|
if (error) {
|
|
@@ -2865,34 +3019,23 @@ class Cart {
|
|
|
2865
3019
|
// Showing warrnings if extra unknown parameters are found
|
|
2866
3020
|
const {
|
|
2867
3021
|
error: warrning,
|
|
2868
|
-
} = CartPlatformApplicationValidator.
|
|
2869
|
-
{
|
|
2870
|
-
slug,
|
|
2871
|
-
pageSize,
|
|
2872
|
-
promotionGroup,
|
|
2873
|
-
storeId,
|
|
2874
|
-
cartType,
|
|
2875
|
-
},
|
|
3022
|
+
} = CartPlatformApplicationValidator.getPromotionTags().validate(
|
|
3023
|
+
{},
|
|
2876
3024
|
{ abortEarly: false, allowUnknown: false }
|
|
2877
3025
|
);
|
|
2878
3026
|
if (warrning) {
|
|
2879
3027
|
Logger({
|
|
2880
3028
|
level: "WARN",
|
|
2881
|
-
message: `Parameter Validation warrnings for platform > Cart >
|
|
3029
|
+
message: `Parameter Validation warrnings for platform > Cart > getPromotionTags \n ${warrning}`,
|
|
2882
3030
|
});
|
|
2883
3031
|
}
|
|
2884
3032
|
|
|
2885
3033
|
const query_params = {};
|
|
2886
|
-
query_params["slug"] = slug;
|
|
2887
|
-
query_params["page_size"] = pageSize;
|
|
2888
|
-
query_params["promotion_group"] = promotionGroup;
|
|
2889
|
-
query_params["store_id"] = storeId;
|
|
2890
|
-
query_params["cart_type"] = cartType;
|
|
2891
3034
|
|
|
2892
3035
|
const response = await PlatformAPIClient.execute(
|
|
2893
3036
|
this.config,
|
|
2894
3037
|
"get",
|
|
2895
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
3038
|
+
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promo-tags`,
|
|
2896
3039
|
query_params,
|
|
2897
3040
|
undefined,
|
|
2898
3041
|
requestHeaders,
|
|
@@ -2906,7 +3049,7 @@ class Cart {
|
|
|
2906
3049
|
|
|
2907
3050
|
const {
|
|
2908
3051
|
error: res_error,
|
|
2909
|
-
} = CartPlatformModel.
|
|
3052
|
+
} = CartPlatformModel.TagsViewResponse().validate(responseData, {
|
|
2910
3053
|
abortEarly: false,
|
|
2911
3054
|
allowUnknown: true,
|
|
2912
3055
|
});
|
|
@@ -2917,93 +3060,7 @@ class Cart {
|
|
|
2917
3060
|
} else {
|
|
2918
3061
|
Logger({
|
|
2919
3062
|
level: "WARN",
|
|
2920
|
-
message: `Response Validation Warnings for platform > Cart >
|
|
2921
|
-
});
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
return response;
|
|
2926
|
-
}
|
|
2927
|
-
|
|
2928
|
-
/**
|
|
2929
|
-
* @param {CartPlatformApplicationValidator.GetPromotionPaymentOffersParam} arg
|
|
2930
|
-
* - Arg object
|
|
2931
|
-
*
|
|
2932
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2933
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2934
|
-
* @returns {Promise<CartPlatformModel.PromotionPaymentOffersDetails>} -
|
|
2935
|
-
* Success response
|
|
2936
|
-
* @name getPromotionPaymentOffers
|
|
2937
|
-
* @summary: Fetch available promotions payment offers
|
|
2938
|
-
* @description: Use this API to get top 5 payment offers available for current product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionPaymentOffers/).
|
|
2939
|
-
*/
|
|
2940
|
-
async getPromotionPaymentOffers(
|
|
2941
|
-
{ id, uid, requestHeaders } = { requestHeaders: {} },
|
|
2942
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2943
|
-
) {
|
|
2944
|
-
const {
|
|
2945
|
-
error,
|
|
2946
|
-
} = CartPlatformApplicationValidator.getPromotionPaymentOffers().validate(
|
|
2947
|
-
{
|
|
2948
|
-
id,
|
|
2949
|
-
uid,
|
|
2950
|
-
},
|
|
2951
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2952
|
-
);
|
|
2953
|
-
if (error) {
|
|
2954
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2955
|
-
}
|
|
2956
|
-
|
|
2957
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2958
|
-
const {
|
|
2959
|
-
error: warrning,
|
|
2960
|
-
} = CartPlatformApplicationValidator.getPromotionPaymentOffers().validate(
|
|
2961
|
-
{
|
|
2962
|
-
id,
|
|
2963
|
-
uid,
|
|
2964
|
-
},
|
|
2965
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2966
|
-
);
|
|
2967
|
-
if (warrning) {
|
|
2968
|
-
Logger({
|
|
2969
|
-
level: "WARN",
|
|
2970
|
-
message: `Parameter Validation warrnings for platform > Cart > getPromotionPaymentOffers \n ${warrning}`,
|
|
2971
|
-
});
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
const query_params = {};
|
|
2975
|
-
query_params["id"] = id;
|
|
2976
|
-
query_params["uid"] = uid;
|
|
2977
|
-
|
|
2978
|
-
const response = await PlatformAPIClient.execute(
|
|
2979
|
-
this.config,
|
|
2980
|
-
"get",
|
|
2981
|
-
`/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/available-payment-offers`,
|
|
2982
|
-
query_params,
|
|
2983
|
-
undefined,
|
|
2984
|
-
requestHeaders,
|
|
2985
|
-
{ responseHeaders }
|
|
2986
|
-
);
|
|
2987
|
-
|
|
2988
|
-
let responseData = response;
|
|
2989
|
-
if (responseHeaders) {
|
|
2990
|
-
responseData = response[0];
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
const {
|
|
2994
|
-
error: res_error,
|
|
2995
|
-
} = CartPlatformModel.PromotionPaymentOffersDetails().validate(
|
|
2996
|
-
responseData,
|
|
2997
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2998
|
-
);
|
|
2999
|
-
|
|
3000
|
-
if (res_error) {
|
|
3001
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
3002
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3003
|
-
} else {
|
|
3004
|
-
Logger({
|
|
3005
|
-
level: "WARN",
|
|
3006
|
-
message: `Response Validation Warnings for platform > Cart > getPromotionPaymentOffers \n ${res_error}`,
|
|
3063
|
+
message: `Response Validation Warnings for platform > Cart > getPromotionTags \n ${res_error}`,
|
|
3007
3064
|
});
|
|
3008
3065
|
}
|
|
3009
3066
|
}
|
|
@@ -3015,9 +3072,9 @@ class Cart {
|
|
|
3015
3072
|
* @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object
|
|
3016
3073
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3017
3074
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3018
|
-
* @returns {Promise<CartPlatformModel.
|
|
3075
|
+
* @returns {Promise<CartPlatformModel.PromotionsResponse>} - Success response
|
|
3019
3076
|
* @name getPromotions
|
|
3020
|
-
* @summary: List
|
|
3077
|
+
* @summary: List promotions
|
|
3021
3078
|
* @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotions/).
|
|
3022
3079
|
*/
|
|
3023
3080
|
async getPromotions(
|
|
@@ -3030,13 +3087,6 @@ class Cart {
|
|
|
3030
3087
|
promotionType,
|
|
3031
3088
|
fpPanel,
|
|
3032
3089
|
promotionId,
|
|
3033
|
-
createdBy,
|
|
3034
|
-
reviewedBy,
|
|
3035
|
-
approvedStartTime,
|
|
3036
|
-
approvedEndTime,
|
|
3037
|
-
reviewStartTime,
|
|
3038
|
-
reviewEndTime,
|
|
3039
|
-
status,
|
|
3040
3090
|
requestHeaders,
|
|
3041
3091
|
} = { requestHeaders: {} },
|
|
3042
3092
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3051,13 +3101,6 @@ class Cart {
|
|
|
3051
3101
|
promotionType,
|
|
3052
3102
|
fpPanel,
|
|
3053
3103
|
promotionId,
|
|
3054
|
-
createdBy,
|
|
3055
|
-
reviewedBy,
|
|
3056
|
-
approvedStartTime,
|
|
3057
|
-
approvedEndTime,
|
|
3058
|
-
reviewStartTime,
|
|
3059
|
-
reviewEndTime,
|
|
3060
|
-
status,
|
|
3061
3104
|
},
|
|
3062
3105
|
{ abortEarly: false, allowUnknown: true }
|
|
3063
3106
|
);
|
|
@@ -3078,13 +3121,6 @@ class Cart {
|
|
|
3078
3121
|
promotionType,
|
|
3079
3122
|
fpPanel,
|
|
3080
3123
|
promotionId,
|
|
3081
|
-
createdBy,
|
|
3082
|
-
reviewedBy,
|
|
3083
|
-
approvedStartTime,
|
|
3084
|
-
approvedEndTime,
|
|
3085
|
-
reviewStartTime,
|
|
3086
|
-
reviewEndTime,
|
|
3087
|
-
status,
|
|
3088
3124
|
},
|
|
3089
3125
|
{ abortEarly: false, allowUnknown: false }
|
|
3090
3126
|
);
|
|
@@ -3104,13 +3140,6 @@ class Cart {
|
|
|
3104
3140
|
query_params["promotion_type"] = promotionType;
|
|
3105
3141
|
query_params["fp_panel"] = fpPanel;
|
|
3106
3142
|
query_params["promotion_id"] = promotionId;
|
|
3107
|
-
query_params["created_by"] = createdBy;
|
|
3108
|
-
query_params["reviewed_by"] = reviewedBy;
|
|
3109
|
-
query_params["approved_start_time"] = approvedStartTime;
|
|
3110
|
-
query_params["approved_end_time"] = approvedEndTime;
|
|
3111
|
-
query_params["review_start_time"] = reviewStartTime;
|
|
3112
|
-
query_params["review_end_time"] = reviewEndTime;
|
|
3113
|
-
query_params["status"] = status;
|
|
3114
3143
|
|
|
3115
3144
|
const response = await PlatformAPIClient.execute(
|
|
3116
3145
|
this.config,
|
|
@@ -3129,7 +3158,7 @@ class Cart {
|
|
|
3129
3158
|
|
|
3130
3159
|
const {
|
|
3131
3160
|
error: res_error,
|
|
3132
|
-
} = CartPlatformModel.
|
|
3161
|
+
} = CartPlatformModel.PromotionsResponse().validate(responseData, {
|
|
3133
3162
|
abortEarly: false,
|
|
3134
3163
|
allowUnknown: true,
|
|
3135
3164
|
});
|
|
@@ -3148,11 +3177,64 @@ class Cart {
|
|
|
3148
3177
|
return response;
|
|
3149
3178
|
}
|
|
3150
3179
|
|
|
3180
|
+
/**
|
|
3181
|
+
* @param {Object} arg - Arg object.
|
|
3182
|
+
* @param {string} arg.companyId - Current company id
|
|
3183
|
+
* @param {string} arg.applicationId - Current Application _id
|
|
3184
|
+
* @param {number} [arg.pageSize] -
|
|
3185
|
+
* @param {string} [arg.q] -
|
|
3186
|
+
* @param {boolean} [arg.isActive] -
|
|
3187
|
+
* @param {string} [arg.promoGroup] -
|
|
3188
|
+
* @param {string} [arg.promotionType] -
|
|
3189
|
+
* @param {string} [arg.fpPanel] -
|
|
3190
|
+
* @param {string} [arg.promotionId] -
|
|
3191
|
+
* @returns {Paginator<CartPlatformModel.PromotionsResponse>}
|
|
3192
|
+
* @summary: List promotions
|
|
3193
|
+
* @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management.
|
|
3194
|
+
*/
|
|
3195
|
+
getPromotionsPaginator({
|
|
3196
|
+
companyId,
|
|
3197
|
+
applicationId,
|
|
3198
|
+
pageSize,
|
|
3199
|
+
q,
|
|
3200
|
+
isActive,
|
|
3201
|
+
promoGroup,
|
|
3202
|
+
promotionType,
|
|
3203
|
+
fpPanel,
|
|
3204
|
+
promotionId,
|
|
3205
|
+
} = {}) {
|
|
3206
|
+
const paginator = new Paginator();
|
|
3207
|
+
const callback = async () => {
|
|
3208
|
+
const pageId = paginator.nextId;
|
|
3209
|
+
const pageNo = paginator.pageNo;
|
|
3210
|
+
const pageType = "number";
|
|
3211
|
+
const data = await this.getPromotions({
|
|
3212
|
+
companyId: companyId,
|
|
3213
|
+
applicationId: applicationId,
|
|
3214
|
+
pageNo: pageNo,
|
|
3215
|
+
pageSize: pageSize,
|
|
3216
|
+
q: q,
|
|
3217
|
+
isActive: isActive,
|
|
3218
|
+
promoGroup: promoGroup,
|
|
3219
|
+
promotionType: promotionType,
|
|
3220
|
+
fpPanel: fpPanel,
|
|
3221
|
+
promotionId: promotionId,
|
|
3222
|
+
});
|
|
3223
|
+
paginator.setPaginator({
|
|
3224
|
+
hasNext: data.page.has_next ? true : false,
|
|
3225
|
+
nextId: data.page.next_id,
|
|
3226
|
+
});
|
|
3227
|
+
return data;
|
|
3228
|
+
};
|
|
3229
|
+
paginator.setCallback(callback.bind(this));
|
|
3230
|
+
return paginator;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3151
3233
|
/**
|
|
3152
3234
|
* @param {CartPlatformApplicationValidator.GetShipmentsParam} arg - Arg object
|
|
3153
3235
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3154
3236
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3155
|
-
* @returns {Promise<CartPlatformModel.
|
|
3237
|
+
* @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
|
|
3156
3238
|
* Success response
|
|
3157
3239
|
* @name getShipments
|
|
3158
3240
|
* @summary: Get shipments details
|
|
@@ -3239,10 +3321,10 @@ class Cart {
|
|
|
3239
3321
|
|
|
3240
3322
|
const {
|
|
3241
3323
|
error: res_error,
|
|
3242
|
-
} = CartPlatformModel.
|
|
3243
|
-
|
|
3244
|
-
allowUnknown: true
|
|
3245
|
-
|
|
3324
|
+
} = CartPlatformModel.PlatformCartShipmentsResponse().validate(
|
|
3325
|
+
responseData,
|
|
3326
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3327
|
+
);
|
|
3246
3328
|
|
|
3247
3329
|
if (res_error) {
|
|
3248
3330
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3264,7 +3346,7 @@ class Cart {
|
|
|
3264
3346
|
*
|
|
3265
3347
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3266
3348
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3267
|
-
* @returns {Promise<CartPlatformModel.
|
|
3349
|
+
* @returns {Promise<CartPlatformModel.StoreDetailsResponse>} - Success response
|
|
3268
3350
|
* @name getStoreAddressByUid
|
|
3269
3351
|
* @summary: Get Store Address
|
|
3270
3352
|
* @description: Retrieve store details by entering the unique identifier of the pickup stores. Store details include the seller's name, contact information such as email address or phone number and business address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getStoreAddressByUid/).
|
|
@@ -3321,7 +3403,7 @@ class Cart {
|
|
|
3321
3403
|
|
|
3322
3404
|
const {
|
|
3323
3405
|
error: res_error,
|
|
3324
|
-
} = CartPlatformModel.
|
|
3406
|
+
} = CartPlatformModel.StoreDetailsResponse().validate(responseData, {
|
|
3325
3407
|
abortEarly: false,
|
|
3326
3408
|
allowUnknown: true,
|
|
3327
3409
|
});
|
|
@@ -3344,10 +3426,10 @@ class Cart {
|
|
|
3344
3426
|
* @param {CartPlatformApplicationValidator.OverrideCartParam} arg - Arg object
|
|
3345
3427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3346
3428
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3347
|
-
* @returns {Promise<CartPlatformModel.
|
|
3429
|
+
* @returns {Promise<CartPlatformModel.OverrideCheckoutResponse>} - Success response
|
|
3348
3430
|
* @name overrideCart
|
|
3349
|
-
* @summary:
|
|
3350
|
-
* @description:
|
|
3431
|
+
* @summary: Create Fynd order with overriding cart details
|
|
3432
|
+
* @description: Generate Fynd order while overriding cart details sent with provided `cart_items` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/).
|
|
3351
3433
|
*/
|
|
3352
3434
|
async overrideCart(
|
|
3353
3435
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3398,7 +3480,7 @@ class Cart {
|
|
|
3398
3480
|
|
|
3399
3481
|
const {
|
|
3400
3482
|
error: res_error,
|
|
3401
|
-
} = CartPlatformModel.
|
|
3483
|
+
} = CartPlatformModel.OverrideCheckoutResponse().validate(responseData, {
|
|
3402
3484
|
abortEarly: false,
|
|
3403
3485
|
allowUnknown: true,
|
|
3404
3486
|
});
|
|
@@ -3421,13 +3503,13 @@ class Cart {
|
|
|
3421
3503
|
* @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
|
|
3422
3504
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3423
3505
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3424
|
-
* @returns {Promise<CartPlatformModel.
|
|
3506
|
+
* @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
|
|
3425
3507
|
* @name platformAddItems
|
|
3426
3508
|
* @summary: Add items to cart
|
|
3427
3509
|
* @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformAddItems/).
|
|
3428
3510
|
*/
|
|
3429
3511
|
async platformAddItems(
|
|
3430
|
-
{ body, i, b, buyNow,
|
|
3512
|
+
{ body, i, b, buyNow, id, cartType, requestHeaders } = {
|
|
3431
3513
|
requestHeaders: {},
|
|
3432
3514
|
},
|
|
3433
3515
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3440,8 +3522,8 @@ class Cart {
|
|
|
3440
3522
|
i,
|
|
3441
3523
|
b,
|
|
3442
3524
|
buyNow,
|
|
3443
|
-
orderType,
|
|
3444
3525
|
id,
|
|
3526
|
+
cartType,
|
|
3445
3527
|
},
|
|
3446
3528
|
{ abortEarly: false, allowUnknown: true }
|
|
3447
3529
|
);
|
|
@@ -3458,8 +3540,8 @@ class Cart {
|
|
|
3458
3540
|
i,
|
|
3459
3541
|
b,
|
|
3460
3542
|
buyNow,
|
|
3461
|
-
orderType,
|
|
3462
3543
|
id,
|
|
3544
|
+
cartType,
|
|
3463
3545
|
},
|
|
3464
3546
|
{ abortEarly: false, allowUnknown: false }
|
|
3465
3547
|
);
|
|
@@ -3474,8 +3556,8 @@ class Cart {
|
|
|
3474
3556
|
query_params["i"] = i;
|
|
3475
3557
|
query_params["b"] = b;
|
|
3476
3558
|
query_params["buy_now"] = buyNow;
|
|
3477
|
-
query_params["order_type"] = orderType;
|
|
3478
3559
|
query_params["id"] = id;
|
|
3560
|
+
query_params["cart_type"] = cartType;
|
|
3479
3561
|
|
|
3480
3562
|
const response = await PlatformAPIClient.execute(
|
|
3481
3563
|
this.config,
|
|
@@ -3494,7 +3576,7 @@ class Cart {
|
|
|
3494
3576
|
|
|
3495
3577
|
const {
|
|
3496
3578
|
error: res_error,
|
|
3497
|
-
} = CartPlatformModel.
|
|
3579
|
+
} = CartPlatformModel.AddCartDetailResponse().validate(responseData, {
|
|
3498
3580
|
abortEarly: false,
|
|
3499
3581
|
allowUnknown: true,
|
|
3500
3582
|
});
|
|
@@ -3519,13 +3601,13 @@ class Cart {
|
|
|
3519
3601
|
*
|
|
3520
3602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3521
3603
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3522
|
-
* @returns {Promise<CartPlatformModel.
|
|
3604
|
+
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
3523
3605
|
* @name platformCheckoutCart
|
|
3524
3606
|
* @summary: Checkout cart
|
|
3525
3607
|
* @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
|
|
3526
3608
|
*/
|
|
3527
3609
|
async platformCheckoutCart(
|
|
3528
|
-
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
3610
|
+
{ body, id, cartType, requestHeaders } = { requestHeaders: {} },
|
|
3529
3611
|
{ responseHeaders } = { responseHeaders: false }
|
|
3530
3612
|
) {
|
|
3531
3613
|
const {
|
|
@@ -3534,6 +3616,7 @@ class Cart {
|
|
|
3534
3616
|
{
|
|
3535
3617
|
body,
|
|
3536
3618
|
id,
|
|
3619
|
+
cartType,
|
|
3537
3620
|
},
|
|
3538
3621
|
{ abortEarly: false, allowUnknown: true }
|
|
3539
3622
|
);
|
|
@@ -3548,6 +3631,7 @@ class Cart {
|
|
|
3548
3631
|
{
|
|
3549
3632
|
body,
|
|
3550
3633
|
id,
|
|
3634
|
+
cartType,
|
|
3551
3635
|
},
|
|
3552
3636
|
{ abortEarly: false, allowUnknown: false }
|
|
3553
3637
|
);
|
|
@@ -3560,6 +3644,7 @@ class Cart {
|
|
|
3560
3644
|
|
|
3561
3645
|
const query_params = {};
|
|
3562
3646
|
query_params["id"] = id;
|
|
3647
|
+
query_params["cart_type"] = cartType;
|
|
3563
3648
|
|
|
3564
3649
|
const response = await PlatformAPIClient.execute(
|
|
3565
3650
|
this.config,
|
|
@@ -3578,7 +3663,7 @@ class Cart {
|
|
|
3578
3663
|
|
|
3579
3664
|
const {
|
|
3580
3665
|
error: res_error,
|
|
3581
|
-
} = CartPlatformModel.
|
|
3666
|
+
} = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
|
|
3582
3667
|
abortEarly: false,
|
|
3583
3668
|
allowUnknown: true,
|
|
3584
3669
|
});
|
|
@@ -3603,13 +3688,13 @@ class Cart {
|
|
|
3603
3688
|
*
|
|
3604
3689
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3605
3690
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3606
|
-
* @returns {Promise<CartPlatformModel.
|
|
3691
|
+
* @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
|
|
3607
3692
|
* @name platformCheckoutCartV2
|
|
3608
|
-
* @summary:
|
|
3609
|
-
* @description:
|
|
3693
|
+
* @summary: Cart checkout (latest)
|
|
3694
|
+
* @description: Checkout process that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
|
|
3610
3695
|
*/
|
|
3611
3696
|
async platformCheckoutCartV2(
|
|
3612
|
-
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
3697
|
+
{ body, id, cartType, requestHeaders } = { requestHeaders: {} },
|
|
3613
3698
|
{ responseHeaders } = { responseHeaders: false }
|
|
3614
3699
|
) {
|
|
3615
3700
|
const {
|
|
@@ -3618,6 +3703,7 @@ class Cart {
|
|
|
3618
3703
|
{
|
|
3619
3704
|
body,
|
|
3620
3705
|
id,
|
|
3706
|
+
cartType,
|
|
3621
3707
|
},
|
|
3622
3708
|
{ abortEarly: false, allowUnknown: true }
|
|
3623
3709
|
);
|
|
@@ -3632,6 +3718,7 @@ class Cart {
|
|
|
3632
3718
|
{
|
|
3633
3719
|
body,
|
|
3634
3720
|
id,
|
|
3721
|
+
cartType,
|
|
3635
3722
|
},
|
|
3636
3723
|
{ abortEarly: false, allowUnknown: false }
|
|
3637
3724
|
);
|
|
@@ -3644,6 +3731,7 @@ class Cart {
|
|
|
3644
3731
|
|
|
3645
3732
|
const query_params = {};
|
|
3646
3733
|
query_params["id"] = id;
|
|
3734
|
+
query_params["cart_type"] = cartType;
|
|
3647
3735
|
|
|
3648
3736
|
const response = await PlatformAPIClient.execute(
|
|
3649
3737
|
this.config,
|
|
@@ -3662,7 +3750,7 @@ class Cart {
|
|
|
3662
3750
|
|
|
3663
3751
|
const {
|
|
3664
3752
|
error: res_error,
|
|
3665
|
-
} = CartPlatformModel.
|
|
3753
|
+
} = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
|
|
3666
3754
|
abortEarly: false,
|
|
3667
3755
|
allowUnknown: true,
|
|
3668
3756
|
});
|
|
@@ -3685,13 +3773,13 @@ class Cart {
|
|
|
3685
3773
|
* @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
|
|
3686
3774
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3687
3775
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3688
|
-
* @returns {Promise<CartPlatformModel.
|
|
3776
|
+
* @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
|
|
3689
3777
|
* @name platformUpdateCart
|
|
3690
3778
|
* @summary: Update cart items
|
|
3691
3779
|
* @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/).
|
|
3692
3780
|
*/
|
|
3693
3781
|
async platformUpdateCart(
|
|
3694
|
-
{ body, id, i, orderType, b, buyNow, requestHeaders } = {
|
|
3782
|
+
{ body, id, i, orderType, b, buyNow, cartType, requestHeaders } = {
|
|
3695
3783
|
requestHeaders: {},
|
|
3696
3784
|
},
|
|
3697
3785
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3706,6 +3794,7 @@ class Cart {
|
|
|
3706
3794
|
orderType,
|
|
3707
3795
|
b,
|
|
3708
3796
|
buyNow,
|
|
3797
|
+
cartType,
|
|
3709
3798
|
},
|
|
3710
3799
|
{ abortEarly: false, allowUnknown: true }
|
|
3711
3800
|
);
|
|
@@ -3724,6 +3813,7 @@ class Cart {
|
|
|
3724
3813
|
orderType,
|
|
3725
3814
|
b,
|
|
3726
3815
|
buyNow,
|
|
3816
|
+
cartType,
|
|
3727
3817
|
},
|
|
3728
3818
|
{ abortEarly: false, allowUnknown: false }
|
|
3729
3819
|
);
|
|
@@ -3740,6 +3830,7 @@ class Cart {
|
|
|
3740
3830
|
query_params["order_type"] = orderType;
|
|
3741
3831
|
query_params["b"] = b;
|
|
3742
3832
|
query_params["buy_now"] = buyNow;
|
|
3833
|
+
query_params["cart_type"] = cartType;
|
|
3743
3834
|
|
|
3744
3835
|
const response = await PlatformAPIClient.execute(
|
|
3745
3836
|
this.config,
|
|
@@ -3758,7 +3849,7 @@ class Cart {
|
|
|
3758
3849
|
|
|
3759
3850
|
const {
|
|
3760
3851
|
error: res_error,
|
|
3761
|
-
} = CartPlatformModel.
|
|
3852
|
+
} = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, {
|
|
3762
3853
|
abortEarly: false,
|
|
3763
3854
|
allowUnknown: true,
|
|
3764
3855
|
});
|
|
@@ -3781,10 +3872,10 @@ class Cart {
|
|
|
3781
3872
|
* @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object
|
|
3782
3873
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3783
3874
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3784
|
-
* @returns {Promise<CartPlatformModel.
|
|
3875
|
+
* @returns {Promise<CartPlatformModel.DeleteAddressResponse>} - Success response
|
|
3785
3876
|
* @name removeAddress
|
|
3786
|
-
* @summary:
|
|
3787
|
-
* @description:
|
|
3877
|
+
* @summary: Remove address associated with an account
|
|
3878
|
+
* @description: Use this API to delete an address by its ID. This will returns an object that will indicate whether the address was deleted successfully or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
|
|
3788
3879
|
*/
|
|
3789
3880
|
async removeAddress(
|
|
3790
3881
|
{ id, userId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -3838,7 +3929,7 @@ class Cart {
|
|
|
3838
3929
|
|
|
3839
3930
|
const {
|
|
3840
3931
|
error: res_error,
|
|
3841
|
-
} = CartPlatformModel.
|
|
3932
|
+
} = CartPlatformModel.DeleteAddressResponse().validate(responseData, {
|
|
3842
3933
|
abortEarly: false,
|
|
3843
3934
|
allowUnknown: true,
|
|
3844
3935
|
});
|
|
@@ -3861,19 +3952,20 @@ class Cart {
|
|
|
3861
3952
|
* @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
|
|
3862
3953
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3863
3954
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3864
|
-
* @returns {Promise<CartPlatformModel.
|
|
3955
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
3865
3956
|
* @name removeCoupon
|
|
3866
|
-
* @summary: Remove
|
|
3867
|
-
* @description: Remove
|
|
3957
|
+
* @summary: Remove Applied Coupon for platform pos user
|
|
3958
|
+
* @description: Remove Coupon applied on the cart by passing uid in request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/).
|
|
3868
3959
|
*/
|
|
3869
3960
|
async removeCoupon(
|
|
3870
|
-
{ uid, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
3961
|
+
{ uid, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
|
|
3871
3962
|
{ responseHeaders } = { responseHeaders: false }
|
|
3872
3963
|
) {
|
|
3873
3964
|
const { error } = CartPlatformApplicationValidator.removeCoupon().validate(
|
|
3874
3965
|
{
|
|
3875
3966
|
uid,
|
|
3876
3967
|
buyNow,
|
|
3968
|
+
cartType,
|
|
3877
3969
|
},
|
|
3878
3970
|
{ abortEarly: false, allowUnknown: true }
|
|
3879
3971
|
);
|
|
@@ -3888,6 +3980,7 @@ class Cart {
|
|
|
3888
3980
|
{
|
|
3889
3981
|
uid,
|
|
3890
3982
|
buyNow,
|
|
3983
|
+
cartType,
|
|
3891
3984
|
},
|
|
3892
3985
|
{ abortEarly: false, allowUnknown: false }
|
|
3893
3986
|
);
|
|
@@ -3901,6 +3994,7 @@ class Cart {
|
|
|
3901
3994
|
const query_params = {};
|
|
3902
3995
|
query_params["uid"] = uid;
|
|
3903
3996
|
query_params["buy_now"] = buyNow;
|
|
3997
|
+
query_params["cart_type"] = cartType;
|
|
3904
3998
|
|
|
3905
3999
|
const response = await PlatformAPIClient.execute(
|
|
3906
4000
|
this.config,
|
|
@@ -3919,7 +4013,7 @@ class Cart {
|
|
|
3919
4013
|
|
|
3920
4014
|
const {
|
|
3921
4015
|
error: res_error,
|
|
3922
|
-
} = CartPlatformModel.
|
|
4016
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
3923
4017
|
abortEarly: false,
|
|
3924
4018
|
allowUnknown: true,
|
|
3925
4019
|
});
|
|
@@ -3946,8 +4040,8 @@ class Cart {
|
|
|
3946
4040
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3947
4041
|
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
3948
4042
|
* @name removePriceAdjustment
|
|
3949
|
-
* @summary: Remove price adjustments
|
|
3950
|
-
* @description: Remove
|
|
4043
|
+
* @summary: Remove price adjustments.
|
|
4044
|
+
* @description: Remove price adjustments applied to items in the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removePriceAdjustment/).
|
|
3951
4045
|
*/
|
|
3952
4046
|
async removePriceAdjustment(
|
|
3953
4047
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4023,10 +4117,10 @@ class Cart {
|
|
|
4023
4117
|
* @param {CartPlatformApplicationValidator.SelectAddressParam} arg - Arg object
|
|
4024
4118
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4025
4119
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4026
|
-
* @returns {Promise<CartPlatformModel.
|
|
4120
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
4027
4121
|
* @name selectAddress
|
|
4028
|
-
* @summary: Select
|
|
4029
|
-
* @description: Select
|
|
4122
|
+
* @summary: Select an address from available addresses
|
|
4123
|
+
* @description: Select Address from all addresses associated with the account in order to ship the cart items to that address, otherwise default address will be selected implicitly. See `PlatformSelectCartAddressRequest` in schema of request body for the list of attributes needed to select Address from account. On successful request, this API returns a Cart object. Below address attributes are required. address_id billing_address_id uid - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/).
|
|
4030
4124
|
*/
|
|
4031
4125
|
async selectAddress(
|
|
4032
4126
|
{ body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4089,7 +4183,7 @@ class Cart {
|
|
|
4089
4183
|
|
|
4090
4184
|
const {
|
|
4091
4185
|
error: res_error,
|
|
4092
|
-
} = CartPlatformModel.
|
|
4186
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
4093
4187
|
abortEarly: false,
|
|
4094
4188
|
allowUnknown: true,
|
|
4095
4189
|
});
|
|
@@ -4112,7 +4206,7 @@ class Cart {
|
|
|
4112
4206
|
* @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object
|
|
4113
4207
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4114
4208
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4115
|
-
* @returns {Promise<CartPlatformModel.
|
|
4209
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
4116
4210
|
* @name selectPaymentMode
|
|
4117
4211
|
* @summary: Select payment mode
|
|
4118
4212
|
* @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/).
|
|
@@ -4177,7 +4271,7 @@ class Cart {
|
|
|
4177
4271
|
|
|
4178
4272
|
const {
|
|
4179
4273
|
error: res_error,
|
|
4180
|
-
} = CartPlatformModel.
|
|
4274
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
4181
4275
|
abortEarly: false,
|
|
4182
4276
|
allowUnknown: true,
|
|
4183
4277
|
});
|
|
@@ -4200,7 +4294,7 @@ class Cart {
|
|
|
4200
4294
|
* @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object
|
|
4201
4295
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4202
4296
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4203
|
-
* @returns {Promise<CartPlatformModel.
|
|
4297
|
+
* @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
|
|
4204
4298
|
* @name selectPaymentModeV2
|
|
4205
4299
|
* @summary: Select payment mode (latest)
|
|
4206
4300
|
* @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/).
|
|
@@ -4265,7 +4359,7 @@ class Cart {
|
|
|
4265
4359
|
|
|
4266
4360
|
const {
|
|
4267
4361
|
error: res_error,
|
|
4268
|
-
} = CartPlatformModel.
|
|
4362
|
+
} = CartPlatformModel.CartDetailResponse().validate(responseData, {
|
|
4269
4363
|
abortEarly: false,
|
|
4270
4364
|
allowUnknown: true,
|
|
4271
4365
|
});
|
|
@@ -4288,10 +4382,10 @@ class Cart {
|
|
|
4288
4382
|
* @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object
|
|
4289
4383
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4290
4384
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4291
|
-
* @returns {Promise<CartPlatformModel.
|
|
4385
|
+
* @returns {Promise<CartPlatformModel.UpdateAddressResponse>} - Success response
|
|
4292
4386
|
* @name updateAddress
|
|
4293
|
-
* @summary:
|
|
4294
|
-
* @description:
|
|
4387
|
+
* @summary: Update address added to an account
|
|
4388
|
+
* @description: Use this API to update an existing address in the account. Request object should contain attributes mentioned in Address can be updated. These attributes are:is_default_address landmark area pincode email address_type name address_id address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
|
|
4295
4389
|
*/
|
|
4296
4390
|
async updateAddress(
|
|
4297
4391
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4344,7 +4438,7 @@ class Cart {
|
|
|
4344
4438
|
|
|
4345
4439
|
const {
|
|
4346
4440
|
error: res_error,
|
|
4347
|
-
} = CartPlatformModel.
|
|
4441
|
+
} = CartPlatformModel.UpdateAddressResponse().validate(responseData, {
|
|
4348
4442
|
abortEarly: false,
|
|
4349
4443
|
allowUnknown: true,
|
|
4350
4444
|
});
|
|
@@ -4367,7 +4461,7 @@ class Cart {
|
|
|
4367
4461
|
* @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
|
|
4368
4462
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4369
4463
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4370
|
-
* @returns {Promise<CartPlatformModel.
|
|
4464
|
+
* @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
|
|
4371
4465
|
* @name updateCart
|
|
4372
4466
|
* @summary: Update cart items
|
|
4373
4467
|
* @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/).
|
|
@@ -4426,7 +4520,7 @@ class Cart {
|
|
|
4426
4520
|
|
|
4427
4521
|
const {
|
|
4428
4522
|
error: res_error,
|
|
4429
|
-
} = CartPlatformModel.
|
|
4523
|
+
} = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, {
|
|
4430
4524
|
abortEarly: false,
|
|
4431
4525
|
allowUnknown: true,
|
|
4432
4526
|
});
|
|
@@ -4449,13 +4543,13 @@ class Cart {
|
|
|
4449
4543
|
* @param {CartPlatformApplicationValidator.UpdateCartMetaParam} arg - Arg object
|
|
4450
4544
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4451
4545
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4452
|
-
* @returns {Promise<CartPlatformModel.
|
|
4546
|
+
* @returns {Promise<CartPlatformModel.CartMetaResponse>} - Success response
|
|
4453
4547
|
* @name updateCartMeta
|
|
4454
4548
|
* @summary: Update cart metadata
|
|
4455
4549
|
* @description: Add or modify metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMeta/).
|
|
4456
4550
|
*/
|
|
4457
4551
|
async updateCartMeta(
|
|
4458
|
-
{ body, id, buyNow, requestHeaders } = { requestHeaders: {} },
|
|
4552
|
+
{ body, id, buyNow, userId, requestHeaders } = { requestHeaders: {} },
|
|
4459
4553
|
{ responseHeaders } = { responseHeaders: false }
|
|
4460
4554
|
) {
|
|
4461
4555
|
const {
|
|
@@ -4465,6 +4559,7 @@ class Cart {
|
|
|
4465
4559
|
body,
|
|
4466
4560
|
id,
|
|
4467
4561
|
buyNow,
|
|
4562
|
+
userId,
|
|
4468
4563
|
},
|
|
4469
4564
|
{ abortEarly: false, allowUnknown: true }
|
|
4470
4565
|
);
|
|
@@ -4480,6 +4575,7 @@ class Cart {
|
|
|
4480
4575
|
body,
|
|
4481
4576
|
id,
|
|
4482
4577
|
buyNow,
|
|
4578
|
+
userId,
|
|
4483
4579
|
},
|
|
4484
4580
|
{ abortEarly: false, allowUnknown: false }
|
|
4485
4581
|
);
|
|
@@ -4493,6 +4589,7 @@ class Cart {
|
|
|
4493
4589
|
const query_params = {};
|
|
4494
4590
|
query_params["id"] = id;
|
|
4495
4591
|
query_params["buy_now"] = buyNow;
|
|
4592
|
+
query_params["user_id"] = userId;
|
|
4496
4593
|
|
|
4497
4594
|
const response = await PlatformAPIClient.execute(
|
|
4498
4595
|
this.config,
|
|
@@ -4511,7 +4608,7 @@ class Cart {
|
|
|
4511
4608
|
|
|
4512
4609
|
const {
|
|
4513
4610
|
error: res_error,
|
|
4514
|
-
} = CartPlatformModel.
|
|
4611
|
+
} = CartPlatformModel.CartMetaResponse().validate(responseData, {
|
|
4515
4612
|
abortEarly: false,
|
|
4516
4613
|
allowUnknown: true,
|
|
4517
4614
|
});
|
|
@@ -4538,8 +4635,8 @@ class Cart {
|
|
|
4538
4635
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4539
4636
|
* @returns {Promise<CartPlatformModel.CartMetaConfigUpdate>} - Success response
|
|
4540
4637
|
* @name updateCartMetaConfig
|
|
4541
|
-
* @summary: Update cart
|
|
4542
|
-
* @description: Modify the configuration settings for cart metadata
|
|
4638
|
+
* @summary: Update cart metadata configuration.
|
|
4639
|
+
* @description: Modify the configuration settings for cart metadata. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMetaConfig/).
|
|
4543
4640
|
*/
|
|
4544
4641
|
async updateCartMetaConfig(
|
|
4545
4642
|
{ cartMetaId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4617,10 +4714,10 @@ class Cart {
|
|
|
4617
4714
|
* @param {CartPlatformApplicationValidator.UpdateCartUserParam} arg - Arg object
|
|
4618
4715
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4619
4716
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4620
|
-
* @returns {Promise<CartPlatformModel.
|
|
4717
|
+
* @returns {Promise<CartPlatformModel.UserCartMappingResponse>} - Success response
|
|
4621
4718
|
* @name updateCartUser
|
|
4622
|
-
* @summary: Update user
|
|
4623
|
-
* @description: Modify
|
|
4719
|
+
* @summary: Update cart user details.
|
|
4720
|
+
* @description: Modify user-related details for a shopping cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartUser/).
|
|
4624
4721
|
*/
|
|
4625
4722
|
async updateCartUser(
|
|
4626
4723
|
{ body, id, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4676,7 +4773,7 @@ class Cart {
|
|
|
4676
4773
|
|
|
4677
4774
|
const {
|
|
4678
4775
|
error: res_error,
|
|
4679
|
-
} = CartPlatformModel.
|
|
4776
|
+
} = CartPlatformModel.UserCartMappingResponse().validate(responseData, {
|
|
4680
4777
|
abortEarly: false,
|
|
4681
4778
|
allowUnknown: true,
|
|
4682
4779
|
});
|
|
@@ -4701,10 +4798,10 @@ class Cart {
|
|
|
4701
4798
|
*
|
|
4702
4799
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4703
4800
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4704
|
-
* @returns {Promise<CartPlatformModel.
|
|
4801
|
+
* @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
|
|
4705
4802
|
* @name updateCartWithSharedItems
|
|
4706
|
-
* @summary:
|
|
4707
|
-
* @description:
|
|
4803
|
+
* @summary: Merge or replace existing cart
|
|
4804
|
+
* @description: Use this API to merge the shared cart with existing cart, or replace the existing cart with the shared cart. The `action` parameter is used to indicate the operation Merge or Replace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartWithSharedItems/).
|
|
4708
4805
|
*/
|
|
4709
4806
|
async updateCartWithSharedItems(
|
|
4710
4807
|
{ token, action, cartId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -4762,7 +4859,7 @@ class Cart {
|
|
|
4762
4859
|
|
|
4763
4860
|
const {
|
|
4764
4861
|
error: res_error,
|
|
4765
|
-
} = CartPlatformModel.
|
|
4862
|
+
} = CartPlatformModel.SharedCartResponse().validate(responseData, {
|
|
4766
4863
|
abortEarly: false,
|
|
4767
4864
|
allowUnknown: true,
|
|
4768
4865
|
});
|
|
@@ -4785,7 +4882,7 @@ class Cart {
|
|
|
4785
4882
|
* @param {CartPlatformApplicationValidator.UpdateCouponParam} arg - Arg object
|
|
4786
4883
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4787
4884
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4788
|
-
* @returns {Promise<CartPlatformModel.
|
|
4885
|
+
* @returns {Promise<CartPlatformModel.CouponDetailResponse>} - Success response
|
|
4789
4886
|
* @name updateCoupon
|
|
4790
4887
|
* @summary: Update a coupon
|
|
4791
4888
|
* @description: Update the details of an existing coupon by specifying its unique identifier. This includes modifying coupon attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCoupon/).
|
|
@@ -4841,7 +4938,7 @@ class Cart {
|
|
|
4841
4938
|
|
|
4842
4939
|
const {
|
|
4843
4940
|
error: res_error,
|
|
4844
|
-
} = CartPlatformModel.
|
|
4941
|
+
} = CartPlatformModel.CouponDetailResponse().validate(responseData, {
|
|
4845
4942
|
abortEarly: false,
|
|
4846
4943
|
allowUnknown: true,
|
|
4847
4944
|
});
|
|
@@ -4868,7 +4965,7 @@ class Cart {
|
|
|
4868
4965
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4869
4966
|
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
4870
4967
|
* @name updateCouponPartially
|
|
4871
|
-
* @summary: Update
|
|
4968
|
+
* @summary: Update coupon archive state and schedule
|
|
4872
4969
|
* @description: Seller can make partial adjustments of an existing coupon by specifying its unique identifier. It enables businesses to modify specific attributes of the coupon while preserving other details intact. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCouponPartially/).
|
|
4873
4970
|
*/
|
|
4874
4971
|
async updateCouponPartially(
|
|
@@ -4949,10 +5046,11 @@ class Cart {
|
|
|
4949
5046
|
*
|
|
4950
5047
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4951
5048
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4952
|
-
* @returns {Promise<CartPlatformModel.
|
|
5049
|
+
* @returns {Promise<CartPlatformModel.UpdatePriceAdjustmentResponse>} -
|
|
5050
|
+
* Success response
|
|
4953
5051
|
* @name updatePriceAdjustment
|
|
4954
|
-
* @summary: Update price adjustments
|
|
4955
|
-
* @description: Modify price adjustments for
|
|
5052
|
+
* @summary: Update price adjustments.
|
|
5053
|
+
* @description: Modify price adjustments for items in the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePriceAdjustment/).
|
|
4956
5054
|
*/
|
|
4957
5055
|
async updatePriceAdjustment(
|
|
4958
5056
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5007,10 +5105,10 @@ class Cart {
|
|
|
5007
5105
|
|
|
5008
5106
|
const {
|
|
5009
5107
|
error: res_error,
|
|
5010
|
-
} = CartPlatformModel.
|
|
5011
|
-
|
|
5012
|
-
allowUnknown: true
|
|
5013
|
-
|
|
5108
|
+
} = CartPlatformModel.UpdatePriceAdjustmentResponse().validate(
|
|
5109
|
+
responseData,
|
|
5110
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5111
|
+
);
|
|
5014
5112
|
|
|
5015
5113
|
if (res_error) {
|
|
5016
5114
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5030,7 +5128,7 @@ class Cart {
|
|
|
5030
5128
|
* @param {CartPlatformApplicationValidator.UpdatePromotionParam} arg - Arg object
|
|
5031
5129
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5032
5130
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5033
|
-
* @returns {Promise<CartPlatformModel.
|
|
5131
|
+
* @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
|
|
5034
5132
|
* @name updatePromotion
|
|
5035
5133
|
* @summary: Update a promotion
|
|
5036
5134
|
* @description: Update the details of an existing promotion by specifying its unique identifier. This includes modifying promotion attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotion/).
|
|
@@ -5088,7 +5186,7 @@ class Cart {
|
|
|
5088
5186
|
|
|
5089
5187
|
const {
|
|
5090
5188
|
error: res_error,
|
|
5091
|
-
} = CartPlatformModel.
|
|
5189
|
+
} = CartPlatformModel.PromotionUpdate().validate(responseData, {
|
|
5092
5190
|
abortEarly: false,
|
|
5093
5191
|
allowUnknown: true,
|
|
5094
5192
|
});
|
|
@@ -5115,8 +5213,8 @@ class Cart {
|
|
|
5115
5213
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5116
5214
|
* @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
|
|
5117
5215
|
* @name updatePromotionPartially
|
|
5118
|
-
* @summary:
|
|
5119
|
-
* @description:
|
|
5216
|
+
* @summary: Partially update a promotion.
|
|
5217
|
+
* @description: Make partial modifications to the settings of an existing promotion in the cart system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotionPartially/).
|
|
5120
5218
|
*/
|
|
5121
5219
|
async updatePromotionPartially(
|
|
5122
5220
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5194,7 +5292,7 @@ class Cart {
|
|
|
5194
5292
|
* @param {CartPlatformApplicationValidator.UpdateShipmentsParam} arg - Arg object
|
|
5195
5293
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5196
5294
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5197
|
-
* @returns {Promise<CartPlatformModel.
|
|
5295
|
+
* @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
|
|
5198
5296
|
* Success response
|
|
5199
5297
|
* @name updateShipments
|
|
5200
5298
|
* @summary: Update shipments
|
|
@@ -5271,10 +5369,10 @@ class Cart {
|
|
|
5271
5369
|
|
|
5272
5370
|
const {
|
|
5273
5371
|
error: res_error,
|
|
5274
|
-
} = CartPlatformModel.
|
|
5275
|
-
|
|
5276
|
-
allowUnknown: true
|
|
5277
|
-
|
|
5372
|
+
} = CartPlatformModel.PlatformCartShipmentsResponse().validate(
|
|
5373
|
+
responseData,
|
|
5374
|
+
{ abortEarly: false, allowUnknown: true }
|
|
5375
|
+
);
|
|
5278
5376
|
|
|
5279
5377
|
if (res_error) {
|
|
5280
5378
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -5310,6 +5408,11 @@ class Cart {
|
|
|
5310
5408
|
paymentIdentifier,
|
|
5311
5409
|
aggregatorName,
|
|
5312
5410
|
merchantCode,
|
|
5411
|
+
iin,
|
|
5412
|
+
network,
|
|
5413
|
+
type,
|
|
5414
|
+
cardId,
|
|
5415
|
+
cartType,
|
|
5313
5416
|
requestHeaders,
|
|
5314
5417
|
} = { requestHeaders: {} },
|
|
5315
5418
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -5325,6 +5428,11 @@ class Cart {
|
|
|
5325
5428
|
paymentIdentifier,
|
|
5326
5429
|
aggregatorName,
|
|
5327
5430
|
merchantCode,
|
|
5431
|
+
iin,
|
|
5432
|
+
network,
|
|
5433
|
+
type,
|
|
5434
|
+
cardId,
|
|
5435
|
+
cartType,
|
|
5328
5436
|
},
|
|
5329
5437
|
{ abortEarly: false, allowUnknown: true }
|
|
5330
5438
|
);
|
|
@@ -5344,6 +5452,11 @@ class Cart {
|
|
|
5344
5452
|
paymentIdentifier,
|
|
5345
5453
|
aggregatorName,
|
|
5346
5454
|
merchantCode,
|
|
5455
|
+
iin,
|
|
5456
|
+
network,
|
|
5457
|
+
type,
|
|
5458
|
+
cardId,
|
|
5459
|
+
cartType,
|
|
5347
5460
|
},
|
|
5348
5461
|
{ abortEarly: false, allowUnknown: false }
|
|
5349
5462
|
);
|
|
@@ -5362,6 +5475,11 @@ class Cart {
|
|
|
5362
5475
|
query_params["payment_identifier"] = paymentIdentifier;
|
|
5363
5476
|
query_params["aggregator_name"] = aggregatorName;
|
|
5364
5477
|
query_params["merchant_code"] = merchantCode;
|
|
5478
|
+
query_params["iin"] = iin;
|
|
5479
|
+
query_params["network"] = network;
|
|
5480
|
+
query_params["type"] = type;
|
|
5481
|
+
query_params["card_id"] = cardId;
|
|
5482
|
+
query_params["cart_type"] = cartType;
|
|
5365
5483
|
|
|
5366
5484
|
const response = await PlatformAPIClient.execute(
|
|
5367
5485
|
this.config,
|