@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
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 +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const PaymentPlatformApplicationValidator = require("./PaymentPlatformApplicationValidator");
|
|
5
|
+
const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -13,15 +13,20 @@ class Payment {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
16
|
+
* @param {PaymentPlatformApplicationValidator.AddEdcDeviceParam} arg - Arg object
|
|
17
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
|
+
* @returns {Promise<PaymentPlatformModel.EdcDeviceUpdateResponse>} - Success response
|
|
19
|
+
* @name addEdcDevice
|
|
20
20
|
* @summary: Update store id and device tag of edc device
|
|
21
|
-
* @description: Use this API to Update store id and device tag of edc device
|
|
21
|
+
* @description: Use this API to Update store id and device tag of edc device - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addEdcDevice/).
|
|
22
22
|
*/
|
|
23
|
-
async addEdcDevice(
|
|
24
|
-
|
|
23
|
+
async addEdcDevice(
|
|
24
|
+
{ terminalUniqueIdentifier, body } = {},
|
|
25
|
+
{ headers } = { headers: false }
|
|
26
|
+
) {
|
|
27
|
+
const {
|
|
28
|
+
error,
|
|
29
|
+
} = PaymentPlatformApplicationValidator.addEdcDevice().validate(
|
|
25
30
|
{
|
|
26
31
|
terminalUniqueIdentifier,
|
|
27
32
|
body,
|
|
@@ -33,7 +38,9 @@ class Payment {
|
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
// Showing warrnings if extra unknown parameters are found
|
|
36
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
error: warrning,
|
|
43
|
+
} = PaymentPlatformApplicationValidator.addEdcDevice().validate(
|
|
37
44
|
{
|
|
38
45
|
terminalUniqueIdentifier,
|
|
39
46
|
body,
|
|
@@ -43,9 +50,8 @@ class Payment {
|
|
|
43
50
|
if (warrning) {
|
|
44
51
|
Logger({
|
|
45
52
|
level: "WARN",
|
|
46
|
-
message:
|
|
53
|
+
message: `Parameter Validation warrnings for platform > Payment > addEdcDevice \n ${warrning}`,
|
|
47
54
|
});
|
|
48
|
-
Logger({ level: "WARN", message: warrning });
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
const query_params = {};
|
|
@@ -55,12 +61,19 @@ class Payment {
|
|
|
55
61
|
"put",
|
|
56
62
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device/${terminalUniqueIdentifier}`,
|
|
57
63
|
query_params,
|
|
58
|
-
body
|
|
64
|
+
body,
|
|
65
|
+
undefined,
|
|
66
|
+
{ headers }
|
|
59
67
|
);
|
|
60
68
|
|
|
69
|
+
let responseData = response;
|
|
70
|
+
if (headers) {
|
|
71
|
+
responseData = response[0];
|
|
72
|
+
}
|
|
73
|
+
|
|
61
74
|
const {
|
|
62
75
|
error: res_error,
|
|
63
|
-
} =
|
|
76
|
+
} = PaymentPlatformModel.EdcDeviceUpdateResponse().validate(responseData, {
|
|
64
77
|
abortEarly: false,
|
|
65
78
|
allowUnknown: false,
|
|
66
79
|
});
|
|
@@ -68,23 +81,30 @@ class Payment {
|
|
|
68
81
|
if (res_error) {
|
|
69
82
|
Logger({
|
|
70
83
|
level: "WARN",
|
|
71
|
-
message:
|
|
84
|
+
message: `Response Validation Warnnings for platform > Payment > addEdcDevice \n ${res_error}`,
|
|
72
85
|
});
|
|
73
|
-
Logger({ level: "WARN", message: res_error });
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
return response;
|
|
77
89
|
}
|
|
78
90
|
|
|
79
91
|
/**
|
|
80
|
-
* @param {
|
|
81
|
-
*
|
|
82
|
-
*
|
|
92
|
+
* @param {PaymentPlatformApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
|
|
93
|
+
* - Arg object
|
|
94
|
+
*
|
|
95
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
96
|
+
* @returns {Promise<PaymentPlatformModel.RefundAccountResponse>} - Success response
|
|
97
|
+
* @name addRefundBankAccountUsingOTP
|
|
83
98
|
* @summary: Save bank details for cancelled/returned order
|
|
84
|
-
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account.
|
|
99
|
+
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addRefundBankAccountUsingOTP/).
|
|
85
100
|
*/
|
|
86
|
-
async addRefundBankAccountUsingOTP(
|
|
87
|
-
|
|
101
|
+
async addRefundBankAccountUsingOTP(
|
|
102
|
+
{ body } = {},
|
|
103
|
+
{ headers } = { headers: false }
|
|
104
|
+
) {
|
|
105
|
+
const {
|
|
106
|
+
error,
|
|
107
|
+
} = PaymentPlatformApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
88
108
|
{
|
|
89
109
|
body,
|
|
90
110
|
},
|
|
@@ -97,7 +117,7 @@ class Payment {
|
|
|
97
117
|
// Showing warrnings if extra unknown parameters are found
|
|
98
118
|
const {
|
|
99
119
|
error: warrning,
|
|
100
|
-
} =
|
|
120
|
+
} = PaymentPlatformApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
101
121
|
{
|
|
102
122
|
body,
|
|
103
123
|
},
|
|
@@ -106,10 +126,8 @@ class Payment {
|
|
|
106
126
|
if (warrning) {
|
|
107
127
|
Logger({
|
|
108
128
|
level: "WARN",
|
|
109
|
-
message:
|
|
110
|
-
"Parameter Validation warrnings for addRefundBankAccountUsingOTP",
|
|
129
|
+
message: `Parameter Validation warrnings for platform > Payment > addRefundBankAccountUsingOTP \n ${warrning}`,
|
|
111
130
|
});
|
|
112
|
-
Logger({ level: "WARN", message: warrning });
|
|
113
131
|
}
|
|
114
132
|
|
|
115
133
|
const query_params = {};
|
|
@@ -119,12 +137,19 @@ class Payment {
|
|
|
119
137
|
"post",
|
|
120
138
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
|
|
121
139
|
query_params,
|
|
122
|
-
body
|
|
140
|
+
body,
|
|
141
|
+
undefined,
|
|
142
|
+
{ headers }
|
|
123
143
|
);
|
|
124
144
|
|
|
145
|
+
let responseData = response;
|
|
146
|
+
if (headers) {
|
|
147
|
+
responseData = response[0];
|
|
148
|
+
}
|
|
149
|
+
|
|
125
150
|
const {
|
|
126
151
|
error: res_error,
|
|
127
|
-
} =
|
|
152
|
+
} = PaymentPlatformModel.RefundAccountResponse().validate(responseData, {
|
|
128
153
|
abortEarly: false,
|
|
129
154
|
allowUnknown: false,
|
|
130
155
|
});
|
|
@@ -132,24 +157,28 @@ class Payment {
|
|
|
132
157
|
if (res_error) {
|
|
133
158
|
Logger({
|
|
134
159
|
level: "WARN",
|
|
135
|
-
message:
|
|
136
|
-
"Response Validation Warnnings for addRefundBankAccountUsingOTP",
|
|
160
|
+
message: `Response Validation Warnnings for platform > Payment > addRefundBankAccountUsingOTP \n ${res_error}`,
|
|
137
161
|
});
|
|
138
|
-
Logger({ level: "WARN", message: res_error });
|
|
139
162
|
}
|
|
140
163
|
|
|
141
164
|
return response;
|
|
142
165
|
}
|
|
143
166
|
|
|
144
167
|
/**
|
|
145
|
-
* @param {
|
|
146
|
-
*
|
|
147
|
-
*
|
|
168
|
+
* @param {PaymentPlatformApplicationValidator.CancelPaymentLinkParam} arg
|
|
169
|
+
* - Arg object
|
|
170
|
+
*
|
|
171
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
172
|
+
* @returns {Promise<PaymentPlatformModel.CancelPaymentLinkResponse>} -
|
|
173
|
+
* Success response
|
|
174
|
+
* @name cancelPaymentLink
|
|
148
175
|
* @summary: Cancel payment link
|
|
149
|
-
* @description: Use this API to cancel a payment link for the customer
|
|
176
|
+
* @description: Use this API to cancel a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/cancelPaymentLink/).
|
|
150
177
|
*/
|
|
151
|
-
async cancelPaymentLink({ body } = {}) {
|
|
152
|
-
const {
|
|
178
|
+
async cancelPaymentLink({ body } = {}, { headers } = { headers: false }) {
|
|
179
|
+
const {
|
|
180
|
+
error,
|
|
181
|
+
} = PaymentPlatformApplicationValidator.cancelPaymentLink().validate(
|
|
153
182
|
{
|
|
154
183
|
body,
|
|
155
184
|
},
|
|
@@ -160,7 +189,9 @@ class Payment {
|
|
|
160
189
|
}
|
|
161
190
|
|
|
162
191
|
// Showing warrnings if extra unknown parameters are found
|
|
163
|
-
const {
|
|
192
|
+
const {
|
|
193
|
+
error: warrning,
|
|
194
|
+
} = PaymentPlatformApplicationValidator.cancelPaymentLink().validate(
|
|
164
195
|
{
|
|
165
196
|
body,
|
|
166
197
|
},
|
|
@@ -169,9 +200,8 @@ class Payment {
|
|
|
169
200
|
if (warrning) {
|
|
170
201
|
Logger({
|
|
171
202
|
level: "WARN",
|
|
172
|
-
message:
|
|
203
|
+
message: `Parameter Validation warrnings for platform > Payment > cancelPaymentLink \n ${warrning}`,
|
|
173
204
|
});
|
|
174
|
-
Logger({ level: "WARN", message: warrning });
|
|
175
205
|
}
|
|
176
206
|
|
|
177
207
|
const query_params = {};
|
|
@@ -181,36 +211,51 @@ class Payment {
|
|
|
181
211
|
"post",
|
|
182
212
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cancel-payment-link/`,
|
|
183
213
|
query_params,
|
|
184
|
-
body
|
|
214
|
+
body,
|
|
215
|
+
undefined,
|
|
216
|
+
{ headers }
|
|
185
217
|
);
|
|
186
218
|
|
|
219
|
+
let responseData = response;
|
|
220
|
+
if (headers) {
|
|
221
|
+
responseData = response[0];
|
|
222
|
+
}
|
|
223
|
+
|
|
187
224
|
const {
|
|
188
225
|
error: res_error,
|
|
189
|
-
} =
|
|
190
|
-
|
|
191
|
-
allowUnknown: false
|
|
192
|
-
|
|
226
|
+
} = PaymentPlatformModel.CancelPaymentLinkResponse().validate(
|
|
227
|
+
responseData,
|
|
228
|
+
{ abortEarly: false, allowUnknown: false }
|
|
229
|
+
);
|
|
193
230
|
|
|
194
231
|
if (res_error) {
|
|
195
232
|
Logger({
|
|
196
233
|
level: "WARN",
|
|
197
|
-
message:
|
|
234
|
+
message: `Response Validation Warnnings for platform > Payment > cancelPaymentLink \n ${res_error}`,
|
|
198
235
|
});
|
|
199
|
-
Logger({ level: "WARN", message: res_error });
|
|
200
236
|
}
|
|
201
237
|
|
|
202
238
|
return response;
|
|
203
239
|
}
|
|
204
240
|
|
|
205
241
|
/**
|
|
206
|
-
* @param {
|
|
207
|
-
*
|
|
208
|
-
*
|
|
242
|
+
* @param {PaymentPlatformApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
|
|
243
|
+
* - Arg object
|
|
244
|
+
*
|
|
245
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
246
|
+
* @returns {Promise<PaymentPlatformModel.PaymentStatusUpdateResponse>} -
|
|
247
|
+
* Success response
|
|
248
|
+
* @name checkAndUpdatePaymentStatus
|
|
209
249
|
* @summary: Performs continuous polling to check status of payment on the server
|
|
210
|
-
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout.
|
|
250
|
+
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/checkAndUpdatePaymentStatus/).
|
|
211
251
|
*/
|
|
212
|
-
async checkAndUpdatePaymentStatus(
|
|
213
|
-
|
|
252
|
+
async checkAndUpdatePaymentStatus(
|
|
253
|
+
{ body } = {},
|
|
254
|
+
{ headers } = { headers: false }
|
|
255
|
+
) {
|
|
256
|
+
const {
|
|
257
|
+
error,
|
|
258
|
+
} = PaymentPlatformApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
214
259
|
{
|
|
215
260
|
body,
|
|
216
261
|
},
|
|
@@ -223,7 +268,7 @@ class Payment {
|
|
|
223
268
|
// Showing warrnings if extra unknown parameters are found
|
|
224
269
|
const {
|
|
225
270
|
error: warrning,
|
|
226
|
-
} =
|
|
271
|
+
} = PaymentPlatformApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
227
272
|
{
|
|
228
273
|
body,
|
|
229
274
|
},
|
|
@@ -232,10 +277,8 @@ class Payment {
|
|
|
232
277
|
if (warrning) {
|
|
233
278
|
Logger({
|
|
234
279
|
level: "WARN",
|
|
235
|
-
message:
|
|
236
|
-
"Parameter Validation warrnings for checkAndUpdatePaymentStatus",
|
|
280
|
+
message: `Parameter Validation warrnings for platform > Payment > checkAndUpdatePaymentStatus \n ${warrning}`,
|
|
237
281
|
});
|
|
238
|
-
Logger({ level: "WARN", message: warrning });
|
|
239
282
|
}
|
|
240
283
|
|
|
241
284
|
const query_params = {};
|
|
@@ -245,37 +288,46 @@ class Payment {
|
|
|
245
288
|
"post",
|
|
246
289
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/confirm/polling`,
|
|
247
290
|
query_params,
|
|
248
|
-
body
|
|
291
|
+
body,
|
|
292
|
+
undefined,
|
|
293
|
+
{ headers }
|
|
249
294
|
);
|
|
250
295
|
|
|
296
|
+
let responseData = response;
|
|
297
|
+
if (headers) {
|
|
298
|
+
responseData = response[0];
|
|
299
|
+
}
|
|
300
|
+
|
|
251
301
|
const {
|
|
252
302
|
error: res_error,
|
|
253
|
-
} =
|
|
254
|
-
|
|
255
|
-
allowUnknown: false
|
|
256
|
-
|
|
303
|
+
} = PaymentPlatformModel.PaymentStatusUpdateResponse().validate(
|
|
304
|
+
responseData,
|
|
305
|
+
{ abortEarly: false, allowUnknown: false }
|
|
306
|
+
);
|
|
257
307
|
|
|
258
308
|
if (res_error) {
|
|
259
309
|
Logger({
|
|
260
310
|
level: "WARN",
|
|
261
|
-
message:
|
|
262
|
-
"Response Validation Warnnings for checkAndUpdatePaymentStatus",
|
|
311
|
+
message: `Response Validation Warnnings for platform > Payment > checkAndUpdatePaymentStatus \n ${res_error}`,
|
|
263
312
|
});
|
|
264
|
-
Logger({ level: "WARN", message: res_error });
|
|
265
313
|
}
|
|
266
314
|
|
|
267
315
|
return response;
|
|
268
316
|
}
|
|
269
317
|
|
|
270
318
|
/**
|
|
271
|
-
* @param {
|
|
272
|
-
* @param {
|
|
273
|
-
* @returns {Promise<PaymentConfirmationResponse>} -
|
|
319
|
+
* @param {PaymentPlatformApplicationValidator.ConfirmPaymentParam} arg - Arg object
|
|
320
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
321
|
+
* @returns {Promise<PaymentPlatformModel.PaymentConfirmationResponse>} -
|
|
322
|
+
* Success response
|
|
323
|
+
* @name confirmPayment
|
|
274
324
|
* @summary: Confirm payment after successful payment from payment gateway
|
|
275
|
-
* @description: Use this API to confirm payment after payment gateway accepted payment.
|
|
325
|
+
* @description: Use this API to confirm payment after payment gateway accepted payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/confirmPayment/).
|
|
276
326
|
*/
|
|
277
|
-
async confirmPayment({ body } = {}) {
|
|
278
|
-
const {
|
|
327
|
+
async confirmPayment({ body } = {}, { headers } = { headers: false }) {
|
|
328
|
+
const {
|
|
329
|
+
error,
|
|
330
|
+
} = PaymentPlatformApplicationValidator.confirmPayment().validate(
|
|
279
331
|
{
|
|
280
332
|
body,
|
|
281
333
|
},
|
|
@@ -286,7 +338,9 @@ class Payment {
|
|
|
286
338
|
}
|
|
287
339
|
|
|
288
340
|
// Showing warrnings if extra unknown parameters are found
|
|
289
|
-
const {
|
|
341
|
+
const {
|
|
342
|
+
error: warrning,
|
|
343
|
+
} = PaymentPlatformApplicationValidator.confirmPayment().validate(
|
|
290
344
|
{
|
|
291
345
|
body,
|
|
292
346
|
},
|
|
@@ -295,9 +349,8 @@ class Payment {
|
|
|
295
349
|
if (warrning) {
|
|
296
350
|
Logger({
|
|
297
351
|
level: "WARN",
|
|
298
|
-
message:
|
|
352
|
+
message: `Parameter Validation warrnings for platform > Payment > confirmPayment \n ${warrning}`,
|
|
299
353
|
});
|
|
300
|
-
Logger({ level: "WARN", message: warrning });
|
|
301
354
|
}
|
|
302
355
|
|
|
303
356
|
const query_params = {};
|
|
@@ -307,36 +360,48 @@ class Payment {
|
|
|
307
360
|
"post",
|
|
308
361
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/confirm`,
|
|
309
362
|
query_params,
|
|
310
|
-
body
|
|
363
|
+
body,
|
|
364
|
+
undefined,
|
|
365
|
+
{ headers }
|
|
311
366
|
);
|
|
312
367
|
|
|
368
|
+
let responseData = response;
|
|
369
|
+
if (headers) {
|
|
370
|
+
responseData = response[0];
|
|
371
|
+
}
|
|
372
|
+
|
|
313
373
|
const {
|
|
314
374
|
error: res_error,
|
|
315
|
-
} =
|
|
316
|
-
|
|
317
|
-
allowUnknown: false
|
|
318
|
-
|
|
375
|
+
} = PaymentPlatformModel.PaymentConfirmationResponse().validate(
|
|
376
|
+
responseData,
|
|
377
|
+
{ abortEarly: false, allowUnknown: false }
|
|
378
|
+
);
|
|
319
379
|
|
|
320
380
|
if (res_error) {
|
|
321
381
|
Logger({
|
|
322
382
|
level: "WARN",
|
|
323
|
-
message:
|
|
383
|
+
message: `Response Validation Warnnings for platform > Payment > confirmPayment \n ${res_error}`,
|
|
324
384
|
});
|
|
325
|
-
Logger({ level: "WARN", message: res_error });
|
|
326
385
|
}
|
|
327
386
|
|
|
328
387
|
return response;
|
|
329
388
|
}
|
|
330
389
|
|
|
331
390
|
/**
|
|
332
|
-
* @param {
|
|
333
|
-
*
|
|
334
|
-
*
|
|
391
|
+
* @param {PaymentPlatformApplicationValidator.CreatePaymentLinkParam} arg
|
|
392
|
+
* - Arg object
|
|
393
|
+
*
|
|
394
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
395
|
+
* @returns {Promise<PaymentPlatformModel.CreatePaymentLinkResponse>} -
|
|
396
|
+
* Success response
|
|
397
|
+
* @name createPaymentLink
|
|
335
398
|
* @summary: Create payment link
|
|
336
|
-
* @description: Use this API to create a payment link for the customer
|
|
399
|
+
* @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentLink/).
|
|
337
400
|
*/
|
|
338
|
-
async createPaymentLink({ body } = {}) {
|
|
339
|
-
const {
|
|
401
|
+
async createPaymentLink({ body } = {}, { headers } = { headers: false }) {
|
|
402
|
+
const {
|
|
403
|
+
error,
|
|
404
|
+
} = PaymentPlatformApplicationValidator.createPaymentLink().validate(
|
|
340
405
|
{
|
|
341
406
|
body,
|
|
342
407
|
},
|
|
@@ -347,7 +412,9 @@ class Payment {
|
|
|
347
412
|
}
|
|
348
413
|
|
|
349
414
|
// Showing warrnings if extra unknown parameters are found
|
|
350
|
-
const {
|
|
415
|
+
const {
|
|
416
|
+
error: warrning,
|
|
417
|
+
} = PaymentPlatformApplicationValidator.createPaymentLink().validate(
|
|
351
418
|
{
|
|
352
419
|
body,
|
|
353
420
|
},
|
|
@@ -356,9 +423,8 @@ class Payment {
|
|
|
356
423
|
if (warrning) {
|
|
357
424
|
Logger({
|
|
358
425
|
level: "WARN",
|
|
359
|
-
message:
|
|
426
|
+
message: `Parameter Validation warrnings for platform > Payment > createPaymentLink \n ${warrning}`,
|
|
360
427
|
});
|
|
361
|
-
Logger({ level: "WARN", message: warrning });
|
|
362
428
|
}
|
|
363
429
|
|
|
364
430
|
const query_params = {};
|
|
@@ -368,35 +434,46 @@ class Payment {
|
|
|
368
434
|
"post",
|
|
369
435
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/create-payment-link/`,
|
|
370
436
|
query_params,
|
|
371
|
-
body
|
|
437
|
+
body,
|
|
438
|
+
undefined,
|
|
439
|
+
{ headers }
|
|
372
440
|
);
|
|
373
441
|
|
|
442
|
+
let responseData = response;
|
|
443
|
+
if (headers) {
|
|
444
|
+
responseData = response[0];
|
|
445
|
+
}
|
|
446
|
+
|
|
374
447
|
const {
|
|
375
448
|
error: res_error,
|
|
376
|
-
} =
|
|
377
|
-
|
|
378
|
-
allowUnknown: false
|
|
379
|
-
|
|
449
|
+
} = PaymentPlatformModel.CreatePaymentLinkResponse().validate(
|
|
450
|
+
responseData,
|
|
451
|
+
{ abortEarly: false, allowUnknown: false }
|
|
452
|
+
);
|
|
380
453
|
|
|
381
454
|
if (res_error) {
|
|
382
455
|
Logger({
|
|
383
456
|
level: "WARN",
|
|
384
|
-
message:
|
|
457
|
+
message: `Response Validation Warnnings for platform > Payment > createPaymentLink \n ${res_error}`,
|
|
385
458
|
});
|
|
386
|
-
Logger({ level: "WARN", message: res_error });
|
|
387
459
|
}
|
|
388
460
|
|
|
389
461
|
return response;
|
|
390
462
|
}
|
|
391
463
|
|
|
392
464
|
/**
|
|
393
|
-
* @param {
|
|
394
|
-
* @returns {Promise<EdcAggregatorAndModelListResponse>}
|
|
465
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
466
|
+
* @returns {Promise<PaymentPlatformModel.EdcAggregatorAndModelListResponse>}
|
|
467
|
+
* - Success response
|
|
468
|
+
*
|
|
469
|
+
* @name edcAggregatorsAndModelList
|
|
395
470
|
* @summary: get some information about the store and edc device
|
|
396
|
-
* @description: Use this API to get info of devices linked to a particular app.
|
|
471
|
+
* @description: Use this API to get info of devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcAggregatorsAndModelList/).
|
|
397
472
|
*/
|
|
398
|
-
async edcAggregatorsAndModelList({} = {}) {
|
|
399
|
-
const {
|
|
473
|
+
async edcAggregatorsAndModelList({ headers } = { headers: false }) {
|
|
474
|
+
const {
|
|
475
|
+
error,
|
|
476
|
+
} = PaymentPlatformApplicationValidator.edcAggregatorsAndModelList().validate(
|
|
400
477
|
{},
|
|
401
478
|
{ abortEarly: false, allowUnknown: true }
|
|
402
479
|
);
|
|
@@ -407,17 +484,15 @@ class Payment {
|
|
|
407
484
|
// Showing warrnings if extra unknown parameters are found
|
|
408
485
|
const {
|
|
409
486
|
error: warrning,
|
|
410
|
-
} =
|
|
487
|
+
} = PaymentPlatformApplicationValidator.edcAggregatorsAndModelList().validate(
|
|
411
488
|
{},
|
|
412
489
|
{ abortEarly: false, allowUnknown: false }
|
|
413
490
|
);
|
|
414
491
|
if (warrning) {
|
|
415
492
|
Logger({
|
|
416
493
|
level: "WARN",
|
|
417
|
-
message:
|
|
418
|
-
"Parameter Validation warrnings for edcAggregatorsAndModelList",
|
|
494
|
+
message: `Parameter Validation warrnings for platform > Payment > edcAggregatorsAndModelList \n ${warrning}`,
|
|
419
495
|
});
|
|
420
|
-
Logger({ level: "WARN", message: warrning });
|
|
421
496
|
}
|
|
422
497
|
|
|
423
498
|
const query_params = {};
|
|
@@ -427,40 +502,48 @@ class Payment {
|
|
|
427
502
|
"get",
|
|
428
503
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-aggregator-list`,
|
|
429
504
|
query_params,
|
|
430
|
-
undefined
|
|
505
|
+
undefined,
|
|
506
|
+
undefined,
|
|
507
|
+
{ headers }
|
|
431
508
|
);
|
|
432
509
|
|
|
510
|
+
let responseData = response;
|
|
511
|
+
if (headers) {
|
|
512
|
+
responseData = response[0];
|
|
513
|
+
}
|
|
514
|
+
|
|
433
515
|
const {
|
|
434
516
|
error: res_error,
|
|
435
|
-
} =
|
|
436
|
-
|
|
437
|
-
allowUnknown: false
|
|
438
|
-
|
|
517
|
+
} = PaymentPlatformModel.EdcAggregatorAndModelListResponse().validate(
|
|
518
|
+
responseData,
|
|
519
|
+
{ abortEarly: false, allowUnknown: false }
|
|
520
|
+
);
|
|
439
521
|
|
|
440
522
|
if (res_error) {
|
|
441
523
|
Logger({
|
|
442
524
|
level: "WARN",
|
|
443
|
-
message:
|
|
525
|
+
message: `Response Validation Warnnings for platform > Payment > edcAggregatorsAndModelList \n ${res_error}`,
|
|
444
526
|
});
|
|
445
|
-
Logger({ level: "WARN", message: res_error });
|
|
446
527
|
}
|
|
447
528
|
|
|
448
529
|
return response;
|
|
449
530
|
}
|
|
450
531
|
|
|
451
532
|
/**
|
|
452
|
-
* @param {
|
|
453
|
-
* @param {
|
|
454
|
-
* @
|
|
455
|
-
* @
|
|
456
|
-
* @param {number} [arg.storeId] -
|
|
457
|
-
* @param {string} [arg.deviceTag] -
|
|
458
|
-
* @returns {Promise<EdcDeviceListResponse>} - Success response
|
|
533
|
+
* @param {PaymentPlatformApplicationValidator.EdcDeviceListParam} arg - Arg object
|
|
534
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
535
|
+
* @returns {Promise<PaymentPlatformModel.EdcDeviceListResponse>} - Success response
|
|
536
|
+
* @name edcDeviceList
|
|
459
537
|
* @summary: get all the device list of an app
|
|
460
|
-
* @description: Use this API to get all devices linked to a particular app.
|
|
538
|
+
* @description: Use this API to get all devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceList/).
|
|
461
539
|
*/
|
|
462
|
-
async edcDeviceList(
|
|
463
|
-
|
|
540
|
+
async edcDeviceList(
|
|
541
|
+
{ pageNo, pageSize, isActive, storeId, deviceTag } = {},
|
|
542
|
+
{ headers } = { headers: false }
|
|
543
|
+
) {
|
|
544
|
+
const {
|
|
545
|
+
error,
|
|
546
|
+
} = PaymentPlatformApplicationValidator.edcDeviceList().validate(
|
|
464
547
|
{
|
|
465
548
|
pageNo,
|
|
466
549
|
pageSize,
|
|
@@ -475,7 +558,9 @@ class Payment {
|
|
|
475
558
|
}
|
|
476
559
|
|
|
477
560
|
// Showing warrnings if extra unknown parameters are found
|
|
478
|
-
const {
|
|
561
|
+
const {
|
|
562
|
+
error: warrning,
|
|
563
|
+
} = PaymentPlatformApplicationValidator.edcDeviceList().validate(
|
|
479
564
|
{
|
|
480
565
|
pageNo,
|
|
481
566
|
pageSize,
|
|
@@ -488,9 +573,8 @@ class Payment {
|
|
|
488
573
|
if (warrning) {
|
|
489
574
|
Logger({
|
|
490
575
|
level: "WARN",
|
|
491
|
-
message:
|
|
576
|
+
message: `Parameter Validation warrnings for platform > Payment > edcDeviceList \n ${warrning}`,
|
|
492
577
|
});
|
|
493
|
-
Logger({ level: "WARN", message: warrning });
|
|
494
578
|
}
|
|
495
579
|
|
|
496
580
|
const query_params = {};
|
|
@@ -505,12 +589,19 @@ class Payment {
|
|
|
505
589
|
"get",
|
|
506
590
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device-list`,
|
|
507
591
|
query_params,
|
|
508
|
-
undefined
|
|
592
|
+
undefined,
|
|
593
|
+
undefined,
|
|
594
|
+
{ headers }
|
|
509
595
|
);
|
|
510
596
|
|
|
597
|
+
let responseData = response;
|
|
598
|
+
if (headers) {
|
|
599
|
+
responseData = response[0];
|
|
600
|
+
}
|
|
601
|
+
|
|
511
602
|
const {
|
|
512
603
|
error: res_error,
|
|
513
|
-
} =
|
|
604
|
+
} = PaymentPlatformModel.EdcDeviceListResponse().validate(responseData, {
|
|
514
605
|
abortEarly: false,
|
|
515
606
|
allowUnknown: false,
|
|
516
607
|
});
|
|
@@ -518,22 +609,24 @@ class Payment {
|
|
|
518
609
|
if (res_error) {
|
|
519
610
|
Logger({
|
|
520
611
|
level: "WARN",
|
|
521
|
-
message:
|
|
612
|
+
message: `Response Validation Warnnings for platform > Payment > edcDeviceList \n ${res_error}`,
|
|
522
613
|
});
|
|
523
|
-
Logger({ level: "WARN", message: res_error });
|
|
524
614
|
}
|
|
525
615
|
|
|
526
616
|
return response;
|
|
527
617
|
}
|
|
528
618
|
|
|
529
619
|
/**
|
|
530
|
-
* @param {
|
|
531
|
-
* @returns {Promise<EdcDeviceStatsResponse>} - Success response
|
|
620
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
621
|
+
* @returns {Promise<PaymentPlatformModel.EdcDeviceStatsResponse>} - Success response
|
|
622
|
+
* @name edcDeviceStats
|
|
532
623
|
* @summary: get some information about the store and edc device
|
|
533
|
-
* @description: Use this API to get info of devices linked to a particular app.
|
|
624
|
+
* @description: Use this API to get info of devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceStats/).
|
|
534
625
|
*/
|
|
535
|
-
async edcDeviceStats({} = {}) {
|
|
536
|
-
const {
|
|
626
|
+
async edcDeviceStats({ headers } = { headers: false }) {
|
|
627
|
+
const {
|
|
628
|
+
error,
|
|
629
|
+
} = PaymentPlatformApplicationValidator.edcDeviceStats().validate(
|
|
537
630
|
{},
|
|
538
631
|
{ abortEarly: false, allowUnknown: true }
|
|
539
632
|
);
|
|
@@ -542,16 +635,17 @@ class Payment {
|
|
|
542
635
|
}
|
|
543
636
|
|
|
544
637
|
// Showing warrnings if extra unknown parameters are found
|
|
545
|
-
const {
|
|
638
|
+
const {
|
|
639
|
+
error: warrning,
|
|
640
|
+
} = PaymentPlatformApplicationValidator.edcDeviceStats().validate(
|
|
546
641
|
{},
|
|
547
642
|
{ abortEarly: false, allowUnknown: false }
|
|
548
643
|
);
|
|
549
644
|
if (warrning) {
|
|
550
645
|
Logger({
|
|
551
646
|
level: "WARN",
|
|
552
|
-
message:
|
|
647
|
+
message: `Parameter Validation warrnings for platform > Payment > edcDeviceStats \n ${warrning}`,
|
|
553
648
|
});
|
|
554
|
-
Logger({ level: "WARN", message: warrning });
|
|
555
649
|
}
|
|
556
650
|
|
|
557
651
|
const query_params = {};
|
|
@@ -561,12 +655,19 @@ class Payment {
|
|
|
561
655
|
"get",
|
|
562
656
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device-stats`,
|
|
563
657
|
query_params,
|
|
564
|
-
undefined
|
|
658
|
+
undefined,
|
|
659
|
+
undefined,
|
|
660
|
+
{ headers }
|
|
565
661
|
);
|
|
566
662
|
|
|
663
|
+
let responseData = response;
|
|
664
|
+
if (headers) {
|
|
665
|
+
responseData = response[0];
|
|
666
|
+
}
|
|
667
|
+
|
|
567
668
|
const {
|
|
568
669
|
error: res_error,
|
|
569
|
-
} =
|
|
670
|
+
} = PaymentPlatformModel.EdcDeviceStatsResponse().validate(responseData, {
|
|
570
671
|
abortEarly: false,
|
|
571
672
|
allowUnknown: false,
|
|
572
673
|
});
|
|
@@ -574,28 +675,30 @@ class Payment {
|
|
|
574
675
|
if (res_error) {
|
|
575
676
|
Logger({
|
|
576
677
|
level: "WARN",
|
|
577
|
-
message:
|
|
678
|
+
message: `Response Validation Warnnings for platform > Payment > edcDeviceStats \n ${res_error}`,
|
|
578
679
|
});
|
|
579
|
-
Logger({ level: "WARN", message: res_error });
|
|
580
680
|
}
|
|
581
681
|
|
|
582
682
|
return response;
|
|
583
683
|
}
|
|
584
684
|
|
|
585
685
|
/**
|
|
586
|
-
* @param {
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* @
|
|
686
|
+
* @param {PaymentPlatformApplicationValidator.GetBankAccountDetailsOpenAPIParam} arg
|
|
687
|
+
* - Arg object
|
|
688
|
+
*
|
|
689
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
690
|
+
* @returns {Promise<PaymentPlatformModel.RefundAccountResponse>} - Success response
|
|
691
|
+
* @name getBankAccountDetailsOpenAPI
|
|
590
692
|
* @summary: Get bank details
|
|
591
|
-
* @description: Use this API to get saved bank details for returned/cancelled order using order id.
|
|
693
|
+
* @description: Use this API to get saved bank details for returned/cancelled order using order id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBankAccountDetailsOpenAPI/).
|
|
592
694
|
*/
|
|
593
|
-
async getBankAccountDetailsOpenAPI(
|
|
594
|
-
orderId,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
695
|
+
async getBankAccountDetailsOpenAPI(
|
|
696
|
+
{ orderId, requestHash } = {},
|
|
697
|
+
{ headers } = { headers: false }
|
|
698
|
+
) {
|
|
699
|
+
const {
|
|
700
|
+
error,
|
|
701
|
+
} = PaymentPlatformApplicationValidator.getBankAccountDetailsOpenAPI().validate(
|
|
599
702
|
{
|
|
600
703
|
orderId,
|
|
601
704
|
|
|
@@ -610,7 +713,7 @@ class Payment {
|
|
|
610
713
|
// Showing warrnings if extra unknown parameters are found
|
|
611
714
|
const {
|
|
612
715
|
error: warrning,
|
|
613
|
-
} =
|
|
716
|
+
} = PaymentPlatformApplicationValidator.getBankAccountDetailsOpenAPI().validate(
|
|
614
717
|
{
|
|
615
718
|
orderId,
|
|
616
719
|
|
|
@@ -621,10 +724,8 @@ class Payment {
|
|
|
621
724
|
if (warrning) {
|
|
622
725
|
Logger({
|
|
623
726
|
level: "WARN",
|
|
624
|
-
message:
|
|
625
|
-
"Parameter Validation warrnings for getBankAccountDetailsOpenAPI",
|
|
727
|
+
message: `Parameter Validation warrnings for platform > Payment > getBankAccountDetailsOpenAPI \n ${warrning}`,
|
|
626
728
|
});
|
|
627
|
-
Logger({ level: "WARN", message: warrning });
|
|
628
729
|
}
|
|
629
730
|
|
|
630
731
|
const query_params = {};
|
|
@@ -636,12 +737,19 @@ class Payment {
|
|
|
636
737
|
"get",
|
|
637
738
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
|
|
638
739
|
query_params,
|
|
639
|
-
undefined
|
|
740
|
+
undefined,
|
|
741
|
+
undefined,
|
|
742
|
+
{ headers }
|
|
640
743
|
);
|
|
641
744
|
|
|
745
|
+
let responseData = response;
|
|
746
|
+
if (headers) {
|
|
747
|
+
responseData = response[0];
|
|
748
|
+
}
|
|
749
|
+
|
|
642
750
|
const {
|
|
643
751
|
error: res_error,
|
|
644
|
-
} =
|
|
752
|
+
} = PaymentPlatformModel.RefundAccountResponse().validate(responseData, {
|
|
645
753
|
abortEarly: false,
|
|
646
754
|
allowUnknown: false,
|
|
647
755
|
});
|
|
@@ -649,23 +757,25 @@ class Payment {
|
|
|
649
757
|
if (res_error) {
|
|
650
758
|
Logger({
|
|
651
759
|
level: "WARN",
|
|
652
|
-
message:
|
|
653
|
-
"Response Validation Warnnings for getBankAccountDetailsOpenAPI",
|
|
760
|
+
message: `Response Validation Warnnings for platform > Payment > getBankAccountDetailsOpenAPI \n ${res_error}`,
|
|
654
761
|
});
|
|
655
|
-
Logger({ level: "WARN", message: res_error });
|
|
656
762
|
}
|
|
657
763
|
|
|
658
764
|
return response;
|
|
659
765
|
}
|
|
660
766
|
|
|
661
767
|
/**
|
|
662
|
-
* @param {
|
|
663
|
-
* @returns {Promise<PaymentGatewayConfigResponse>} -
|
|
768
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
769
|
+
* @returns {Promise<PaymentPlatformModel.PaymentGatewayConfigResponse>} -
|
|
770
|
+
* Success response
|
|
771
|
+
* @name getBrandPaymentGatewayConfig
|
|
664
772
|
* @summary: Get All Brand Payment Gateway Config Secret
|
|
665
|
-
* @description: Get All Brand Payment Gateway Config Secret
|
|
773
|
+
* @description: Get All Brand Payment Gateway Config Secret - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBrandPaymentGatewayConfig/).
|
|
666
774
|
*/
|
|
667
|
-
async getBrandPaymentGatewayConfig({} = {}) {
|
|
668
|
-
const {
|
|
775
|
+
async getBrandPaymentGatewayConfig({ headers } = { headers: false }) {
|
|
776
|
+
const {
|
|
777
|
+
error,
|
|
778
|
+
} = PaymentPlatformApplicationValidator.getBrandPaymentGatewayConfig().validate(
|
|
669
779
|
{},
|
|
670
780
|
{ abortEarly: false, allowUnknown: true }
|
|
671
781
|
);
|
|
@@ -676,17 +786,15 @@ class Payment {
|
|
|
676
786
|
// Showing warrnings if extra unknown parameters are found
|
|
677
787
|
const {
|
|
678
788
|
error: warrning,
|
|
679
|
-
} =
|
|
789
|
+
} = PaymentPlatformApplicationValidator.getBrandPaymentGatewayConfig().validate(
|
|
680
790
|
{},
|
|
681
791
|
{ abortEarly: false, allowUnknown: false }
|
|
682
792
|
);
|
|
683
793
|
if (warrning) {
|
|
684
794
|
Logger({
|
|
685
795
|
level: "WARN",
|
|
686
|
-
message:
|
|
687
|
-
"Parameter Validation warrnings for getBrandPaymentGatewayConfig",
|
|
796
|
+
message: `Parameter Validation warrnings for platform > Payment > getBrandPaymentGatewayConfig \n ${warrning}`,
|
|
688
797
|
});
|
|
689
|
-
Logger({ level: "WARN", message: warrning });
|
|
690
798
|
}
|
|
691
799
|
|
|
692
800
|
const query_params = {};
|
|
@@ -696,37 +804,49 @@ class Payment {
|
|
|
696
804
|
"get",
|
|
697
805
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
698
806
|
query_params,
|
|
699
|
-
undefined
|
|
807
|
+
undefined,
|
|
808
|
+
undefined,
|
|
809
|
+
{ headers }
|
|
700
810
|
);
|
|
701
811
|
|
|
812
|
+
let responseData = response;
|
|
813
|
+
if (headers) {
|
|
814
|
+
responseData = response[0];
|
|
815
|
+
}
|
|
816
|
+
|
|
702
817
|
const {
|
|
703
818
|
error: res_error,
|
|
704
|
-
} =
|
|
705
|
-
|
|
706
|
-
allowUnknown: false
|
|
707
|
-
|
|
819
|
+
} = PaymentPlatformModel.PaymentGatewayConfigResponse().validate(
|
|
820
|
+
responseData,
|
|
821
|
+
{ abortEarly: false, allowUnknown: false }
|
|
822
|
+
);
|
|
708
823
|
|
|
709
824
|
if (res_error) {
|
|
710
825
|
Logger({
|
|
711
826
|
level: "WARN",
|
|
712
|
-
message:
|
|
713
|
-
"Response Validation Warnnings for getBrandPaymentGatewayConfig",
|
|
827
|
+
message: `Response Validation Warnnings for platform > Payment > getBrandPaymentGatewayConfig \n ${res_error}`,
|
|
714
828
|
});
|
|
715
|
-
Logger({ level: "WARN", message: res_error });
|
|
716
829
|
}
|
|
717
830
|
|
|
718
831
|
return response;
|
|
719
832
|
}
|
|
720
833
|
|
|
721
834
|
/**
|
|
722
|
-
* @param {
|
|
723
|
-
* @param {
|
|
724
|
-
* @returns {Promise<EdcDeviceDetailsResponse>} -
|
|
835
|
+
* @param {PaymentPlatformApplicationValidator.GetEdcDeviceParam} arg - Arg object
|
|
836
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
837
|
+
* @returns {Promise<PaymentPlatformModel.EdcDeviceDetailsResponse>} -
|
|
838
|
+
* Success response
|
|
839
|
+
* @name getEdcDevice
|
|
725
840
|
* @summary: get details of a single edc device
|
|
726
|
-
* @description: Use this API to get details of a single edc device
|
|
841
|
+
* @description: Use this API to get details of a single edc device - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getEdcDevice/).
|
|
727
842
|
*/
|
|
728
|
-
async getEdcDevice(
|
|
729
|
-
|
|
843
|
+
async getEdcDevice(
|
|
844
|
+
{ terminalUniqueIdentifier } = {},
|
|
845
|
+
{ headers } = { headers: false }
|
|
846
|
+
) {
|
|
847
|
+
const {
|
|
848
|
+
error,
|
|
849
|
+
} = PaymentPlatformApplicationValidator.getEdcDevice().validate(
|
|
730
850
|
{
|
|
731
851
|
terminalUniqueIdentifier,
|
|
732
852
|
},
|
|
@@ -737,7 +857,9 @@ class Payment {
|
|
|
737
857
|
}
|
|
738
858
|
|
|
739
859
|
// Showing warrnings if extra unknown parameters are found
|
|
740
|
-
const {
|
|
860
|
+
const {
|
|
861
|
+
error: warrning,
|
|
862
|
+
} = PaymentPlatformApplicationValidator.getEdcDevice().validate(
|
|
741
863
|
{
|
|
742
864
|
terminalUniqueIdentifier,
|
|
743
865
|
},
|
|
@@ -746,9 +868,8 @@ class Payment {
|
|
|
746
868
|
if (warrning) {
|
|
747
869
|
Logger({
|
|
748
870
|
level: "WARN",
|
|
749
|
-
message:
|
|
871
|
+
message: `Parameter Validation warrnings for platform > Payment > getEdcDevice \n ${warrning}`,
|
|
750
872
|
});
|
|
751
|
-
Logger({ level: "WARN", message: warrning });
|
|
752
873
|
}
|
|
753
874
|
|
|
754
875
|
const query_params = {};
|
|
@@ -758,12 +879,19 @@ class Payment {
|
|
|
758
879
|
"get",
|
|
759
880
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device/${terminalUniqueIdentifier}`,
|
|
760
881
|
query_params,
|
|
761
|
-
undefined
|
|
882
|
+
undefined,
|
|
883
|
+
undefined,
|
|
884
|
+
{ headers }
|
|
762
885
|
);
|
|
763
886
|
|
|
887
|
+
let responseData = response;
|
|
888
|
+
if (headers) {
|
|
889
|
+
responseData = response[0];
|
|
890
|
+
}
|
|
891
|
+
|
|
764
892
|
const {
|
|
765
893
|
error: res_error,
|
|
766
|
-
} =
|
|
894
|
+
} = PaymentPlatformModel.EdcDeviceDetailsResponse().validate(responseData, {
|
|
767
895
|
abortEarly: false,
|
|
768
896
|
allowUnknown: false,
|
|
769
897
|
});
|
|
@@ -771,22 +899,24 @@ class Payment {
|
|
|
771
899
|
if (res_error) {
|
|
772
900
|
Logger({
|
|
773
901
|
level: "WARN",
|
|
774
|
-
message:
|
|
902
|
+
message: `Response Validation Warnnings for platform > Payment > getEdcDevice \n ${res_error}`,
|
|
775
903
|
});
|
|
776
|
-
Logger({ level: "WARN", message: res_error });
|
|
777
904
|
}
|
|
778
905
|
|
|
779
906
|
return response;
|
|
780
907
|
}
|
|
781
908
|
|
|
782
909
|
/**
|
|
783
|
-
* @param {
|
|
784
|
-
* @returns {Promise<GetPaymentCodeResponse>} - Success response
|
|
910
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
911
|
+
* @returns {Promise<PaymentPlatformModel.GetPaymentCodeResponse>} - Success response
|
|
912
|
+
* @name getPaymentCodeOption
|
|
785
913
|
* @summary: List Payment Options Method Codes
|
|
786
|
-
* @description: Get all active List Payment Options Method Codes
|
|
914
|
+
* @description: Get all active List Payment Options Method Codes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentCodeOption/).
|
|
787
915
|
*/
|
|
788
|
-
async getPaymentCodeOption({} = {}) {
|
|
789
|
-
const {
|
|
916
|
+
async getPaymentCodeOption({ headers } = { headers: false }) {
|
|
917
|
+
const {
|
|
918
|
+
error,
|
|
919
|
+
} = PaymentPlatformApplicationValidator.getPaymentCodeOption().validate(
|
|
790
920
|
{},
|
|
791
921
|
{ abortEarly: false, allowUnknown: true }
|
|
792
922
|
);
|
|
@@ -797,16 +927,15 @@ class Payment {
|
|
|
797
927
|
// Showing warrnings if extra unknown parameters are found
|
|
798
928
|
const {
|
|
799
929
|
error: warrning,
|
|
800
|
-
} =
|
|
930
|
+
} = PaymentPlatformApplicationValidator.getPaymentCodeOption().validate(
|
|
801
931
|
{},
|
|
802
932
|
{ abortEarly: false, allowUnknown: false }
|
|
803
933
|
);
|
|
804
934
|
if (warrning) {
|
|
805
935
|
Logger({
|
|
806
936
|
level: "WARN",
|
|
807
|
-
message:
|
|
937
|
+
message: `Parameter Validation warrnings for platform > Payment > getPaymentCodeOption \n ${warrning}`,
|
|
808
938
|
});
|
|
809
|
-
Logger({ level: "WARN", message: warrning });
|
|
810
939
|
}
|
|
811
940
|
|
|
812
941
|
const query_params = {};
|
|
@@ -816,12 +945,19 @@ class Payment {
|
|
|
816
945
|
"get",
|
|
817
946
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/codes`,
|
|
818
947
|
query_params,
|
|
819
|
-
undefined
|
|
948
|
+
undefined,
|
|
949
|
+
undefined,
|
|
950
|
+
{ headers }
|
|
820
951
|
);
|
|
821
952
|
|
|
953
|
+
let responseData = response;
|
|
954
|
+
if (headers) {
|
|
955
|
+
responseData = response[0];
|
|
956
|
+
}
|
|
957
|
+
|
|
822
958
|
const {
|
|
823
959
|
error: res_error,
|
|
824
|
-
} =
|
|
960
|
+
} = PaymentPlatformModel.GetPaymentCodeResponse().validate(responseData, {
|
|
825
961
|
abortEarly: false,
|
|
826
962
|
allowUnknown: false,
|
|
827
963
|
});
|
|
@@ -829,23 +965,28 @@ class Payment {
|
|
|
829
965
|
if (res_error) {
|
|
830
966
|
Logger({
|
|
831
967
|
level: "WARN",
|
|
832
|
-
message:
|
|
968
|
+
message: `Response Validation Warnnings for platform > Payment > getPaymentCodeOption \n ${res_error}`,
|
|
833
969
|
});
|
|
834
|
-
Logger({ level: "WARN", message: res_error });
|
|
835
970
|
}
|
|
836
971
|
|
|
837
972
|
return response;
|
|
838
973
|
}
|
|
839
974
|
|
|
840
975
|
/**
|
|
841
|
-
* @param {
|
|
842
|
-
* @param {
|
|
843
|
-
* @returns {Promise<GetPaymentLinkResponse>} - Success response
|
|
976
|
+
* @param {PaymentPlatformApplicationValidator.GetPaymentLinkParam} arg - Arg object
|
|
977
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
978
|
+
* @returns {Promise<PaymentPlatformModel.GetPaymentLinkResponse>} - Success response
|
|
979
|
+
* @name getPaymentLink
|
|
844
980
|
* @summary: Get payment link
|
|
845
|
-
* @description: Use this API to get a payment link
|
|
981
|
+
* @description: Use this API to get a payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentLink/).
|
|
846
982
|
*/
|
|
847
|
-
async getPaymentLink(
|
|
848
|
-
|
|
983
|
+
async getPaymentLink(
|
|
984
|
+
{ paymentLinkId } = {},
|
|
985
|
+
{ headers } = { headers: false }
|
|
986
|
+
) {
|
|
987
|
+
const {
|
|
988
|
+
error,
|
|
989
|
+
} = PaymentPlatformApplicationValidator.getPaymentLink().validate(
|
|
849
990
|
{
|
|
850
991
|
paymentLinkId,
|
|
851
992
|
},
|
|
@@ -856,7 +997,9 @@ class Payment {
|
|
|
856
997
|
}
|
|
857
998
|
|
|
858
999
|
// Showing warrnings if extra unknown parameters are found
|
|
859
|
-
const {
|
|
1000
|
+
const {
|
|
1001
|
+
error: warrning,
|
|
1002
|
+
} = PaymentPlatformApplicationValidator.getPaymentLink().validate(
|
|
860
1003
|
{
|
|
861
1004
|
paymentLinkId,
|
|
862
1005
|
},
|
|
@@ -865,9 +1008,8 @@ class Payment {
|
|
|
865
1008
|
if (warrning) {
|
|
866
1009
|
Logger({
|
|
867
1010
|
level: "WARN",
|
|
868
|
-
message:
|
|
1011
|
+
message: `Parameter Validation warrnings for platform > Payment > getPaymentLink \n ${warrning}`,
|
|
869
1012
|
});
|
|
870
|
-
Logger({ level: "WARN", message: warrning });
|
|
871
1013
|
}
|
|
872
1014
|
|
|
873
1015
|
const query_params = {};
|
|
@@ -878,12 +1020,19 @@ class Payment {
|
|
|
878
1020
|
"get",
|
|
879
1021
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/create-payment-link/`,
|
|
880
1022
|
query_params,
|
|
881
|
-
undefined
|
|
1023
|
+
undefined,
|
|
1024
|
+
undefined,
|
|
1025
|
+
{ headers }
|
|
882
1026
|
);
|
|
883
1027
|
|
|
1028
|
+
let responseData = response;
|
|
1029
|
+
if (headers) {
|
|
1030
|
+
responseData = response[0];
|
|
1031
|
+
}
|
|
1032
|
+
|
|
884
1033
|
const {
|
|
885
1034
|
error: res_error,
|
|
886
|
-
} =
|
|
1035
|
+
} = PaymentPlatformModel.GetPaymentLinkResponse().validate(responseData, {
|
|
887
1036
|
abortEarly: false,
|
|
888
1037
|
allowUnknown: false,
|
|
889
1038
|
});
|
|
@@ -891,24 +1040,30 @@ class Payment {
|
|
|
891
1040
|
if (res_error) {
|
|
892
1041
|
Logger({
|
|
893
1042
|
level: "WARN",
|
|
894
|
-
message:
|
|
1043
|
+
message: `Response Validation Warnnings for platform > Payment > getPaymentLink \n ${res_error}`,
|
|
895
1044
|
});
|
|
896
|
-
Logger({ level: "WARN", message: res_error });
|
|
897
1045
|
}
|
|
898
1046
|
|
|
899
1047
|
return response;
|
|
900
1048
|
}
|
|
901
1049
|
|
|
902
1050
|
/**
|
|
903
|
-
* @param {
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
* @
|
|
1051
|
+
* @param {PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam} arg
|
|
1052
|
+
* - Arg object
|
|
1053
|
+
*
|
|
1054
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1055
|
+
* @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
|
|
1056
|
+
* @name getPaymentModeRoutes
|
|
907
1057
|
* @summary: Get All Valid Payment Options
|
|
908
|
-
* @description: Use this API to get Get All Valid Payment Options for making payment
|
|
1058
|
+
* @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/).
|
|
909
1059
|
*/
|
|
910
|
-
async getPaymentModeRoutes(
|
|
911
|
-
|
|
1060
|
+
async getPaymentModeRoutes(
|
|
1061
|
+
{ refresh, requestType } = {},
|
|
1062
|
+
{ headers } = { headers: false }
|
|
1063
|
+
) {
|
|
1064
|
+
const {
|
|
1065
|
+
error,
|
|
1066
|
+
} = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate(
|
|
912
1067
|
{
|
|
913
1068
|
refresh,
|
|
914
1069
|
requestType,
|
|
@@ -922,7 +1077,7 @@ class Payment {
|
|
|
922
1077
|
// Showing warrnings if extra unknown parameters are found
|
|
923
1078
|
const {
|
|
924
1079
|
error: warrning,
|
|
925
|
-
} =
|
|
1080
|
+
} = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate(
|
|
926
1081
|
{
|
|
927
1082
|
refresh,
|
|
928
1083
|
requestType,
|
|
@@ -932,9 +1087,8 @@ class Payment {
|
|
|
932
1087
|
if (warrning) {
|
|
933
1088
|
Logger({
|
|
934
1089
|
level: "WARN",
|
|
935
|
-
message:
|
|
1090
|
+
message: `Parameter Validation warrnings for platform > Payment > getPaymentModeRoutes \n ${warrning}`,
|
|
936
1091
|
});
|
|
937
|
-
Logger({ level: "WARN", message: warrning });
|
|
938
1092
|
}
|
|
939
1093
|
|
|
940
1094
|
const query_params = {};
|
|
@@ -946,12 +1100,19 @@ class Payment {
|
|
|
946
1100
|
"get",
|
|
947
1101
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options`,
|
|
948
1102
|
query_params,
|
|
949
|
-
undefined
|
|
1103
|
+
undefined,
|
|
1104
|
+
undefined,
|
|
1105
|
+
{ headers }
|
|
950
1106
|
);
|
|
951
1107
|
|
|
1108
|
+
let responseData = response;
|
|
1109
|
+
if (headers) {
|
|
1110
|
+
responseData = response[0];
|
|
1111
|
+
}
|
|
1112
|
+
|
|
952
1113
|
const {
|
|
953
1114
|
error: res_error,
|
|
954
|
-
} =
|
|
1115
|
+
} = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, {
|
|
955
1116
|
abortEarly: false,
|
|
956
1117
|
allowUnknown: false,
|
|
957
1118
|
});
|
|
@@ -959,45 +1120,39 @@ class Payment {
|
|
|
959
1120
|
if (res_error) {
|
|
960
1121
|
Logger({
|
|
961
1122
|
level: "WARN",
|
|
962
|
-
message:
|
|
1123
|
+
message: `Response Validation Warnnings for platform > Payment > getPaymentModeRoutes \n ${res_error}`,
|
|
963
1124
|
});
|
|
964
|
-
Logger({ level: "WARN", message: res_error });
|
|
965
1125
|
}
|
|
966
1126
|
|
|
967
1127
|
return response;
|
|
968
1128
|
}
|
|
969
1129
|
|
|
970
1130
|
/**
|
|
971
|
-
* @param {
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
* @param {
|
|
975
|
-
* @
|
|
976
|
-
* @
|
|
977
|
-
* to remove temporary cache files on payment gateway and replace with the
|
|
978
|
-
* latest one.
|
|
979
|
-
* @param {string} [arg.cardReference] - Card reference id of user's debit
|
|
980
|
-
* or credit card.
|
|
981
|
-
* @param {string} arg.orderType - The order type of shipment * HomeDelivery
|
|
982
|
-
* - If the customer wants the order home-delivered * PickAtStore - If the
|
|
983
|
-
* customer wants the handover of an order at the store itself.
|
|
984
|
-
* @param {string} [arg.userDetails] - URIencoded JSON containing details of
|
|
985
|
-
* an anonymous user.
|
|
986
|
-
* @returns {Promise<PaymentOptionsResponse>} - Success response
|
|
1131
|
+
* @param {PaymentPlatformApplicationValidator.GetPosPaymentModeRoutesParam} arg
|
|
1132
|
+
* - Arg object
|
|
1133
|
+
*
|
|
1134
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1135
|
+
* @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
|
|
1136
|
+
* @name getPosPaymentModeRoutes
|
|
987
1137
|
* @summary: Get All Valid Payment Options
|
|
988
|
-
* @description: Use this API to get Get All Valid Payment Options for making payment
|
|
1138
|
+
* @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPosPaymentModeRoutes/).
|
|
989
1139
|
*/
|
|
990
|
-
async getPosPaymentModeRoutes(
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1140
|
+
async getPosPaymentModeRoutes(
|
|
1141
|
+
{
|
|
1142
|
+
amount,
|
|
1143
|
+
cartId,
|
|
1144
|
+
pincode,
|
|
1145
|
+
checkoutMode,
|
|
1146
|
+
orderType,
|
|
1147
|
+
refresh,
|
|
1148
|
+
cardReference,
|
|
1149
|
+
userDetails,
|
|
1150
|
+
} = {},
|
|
1151
|
+
{ headers } = { headers: false }
|
|
1152
|
+
) {
|
|
1153
|
+
const {
|
|
1154
|
+
error,
|
|
1155
|
+
} = PaymentPlatformApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
1001
1156
|
{
|
|
1002
1157
|
amount,
|
|
1003
1158
|
cartId,
|
|
@@ -1017,7 +1172,7 @@ class Payment {
|
|
|
1017
1172
|
// Showing warrnings if extra unknown parameters are found
|
|
1018
1173
|
const {
|
|
1019
1174
|
error: warrning,
|
|
1020
|
-
} =
|
|
1175
|
+
} = PaymentPlatformApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
1021
1176
|
{
|
|
1022
1177
|
amount,
|
|
1023
1178
|
cartId,
|
|
@@ -1033,9 +1188,8 @@ class Payment {
|
|
|
1033
1188
|
if (warrning) {
|
|
1034
1189
|
Logger({
|
|
1035
1190
|
level: "WARN",
|
|
1036
|
-
message:
|
|
1191
|
+
message: `Parameter Validation warrnings for platform > Payment > getPosPaymentModeRoutes \n ${warrning}`,
|
|
1037
1192
|
});
|
|
1038
|
-
Logger({ level: "WARN", message: warrning });
|
|
1039
1193
|
}
|
|
1040
1194
|
|
|
1041
1195
|
const query_params = {};
|
|
@@ -1053,12 +1207,19 @@ class Payment {
|
|
|
1053
1207
|
"get",
|
|
1054
1208
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/pos`,
|
|
1055
1209
|
query_params,
|
|
1056
|
-
undefined
|
|
1210
|
+
undefined,
|
|
1211
|
+
undefined,
|
|
1212
|
+
{ headers }
|
|
1057
1213
|
);
|
|
1058
1214
|
|
|
1215
|
+
let responseData = response;
|
|
1216
|
+
if (headers) {
|
|
1217
|
+
responseData = response[0];
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1059
1220
|
const {
|
|
1060
1221
|
error: res_error,
|
|
1061
|
-
} =
|
|
1222
|
+
} = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, {
|
|
1062
1223
|
abortEarly: false,
|
|
1063
1224
|
allowUnknown: false,
|
|
1064
1225
|
});
|
|
@@ -1066,23 +1227,31 @@ class Payment {
|
|
|
1066
1227
|
if (res_error) {
|
|
1067
1228
|
Logger({
|
|
1068
1229
|
level: "WARN",
|
|
1069
|
-
message:
|
|
1230
|
+
message: `Response Validation Warnnings for platform > Payment > getPosPaymentModeRoutes \n ${res_error}`,
|
|
1070
1231
|
});
|
|
1071
|
-
Logger({ level: "WARN", message: res_error });
|
|
1072
1232
|
}
|
|
1073
1233
|
|
|
1074
1234
|
return response;
|
|
1075
1235
|
}
|
|
1076
1236
|
|
|
1077
1237
|
/**
|
|
1078
|
-
* @param {
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1238
|
+
* @param {PaymentPlatformApplicationValidator.GetUserBeneficiariesParam} arg
|
|
1239
|
+
* - Arg object
|
|
1240
|
+
*
|
|
1241
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1242
|
+
* @returns {Promise<PaymentPlatformModel.OrderBeneficiaryResponse>} -
|
|
1243
|
+
* Success response
|
|
1244
|
+
* @name getUserBeneficiaries
|
|
1081
1245
|
* @summary: List User Beneficiary
|
|
1082
|
-
* @description: Get all active beneficiary details added by the user for refund
|
|
1246
|
+
* @description: Get all active beneficiary details added by the user for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserBeneficiaries/).
|
|
1083
1247
|
*/
|
|
1084
|
-
async getUserBeneficiaries(
|
|
1085
|
-
|
|
1248
|
+
async getUserBeneficiaries(
|
|
1249
|
+
{ orderId } = {},
|
|
1250
|
+
{ headers } = { headers: false }
|
|
1251
|
+
) {
|
|
1252
|
+
const {
|
|
1253
|
+
error,
|
|
1254
|
+
} = PaymentPlatformApplicationValidator.getUserBeneficiaries().validate(
|
|
1086
1255
|
{ orderId },
|
|
1087
1256
|
{ abortEarly: false, allowUnknown: true }
|
|
1088
1257
|
);
|
|
@@ -1093,16 +1262,15 @@ class Payment {
|
|
|
1093
1262
|
// Showing warrnings if extra unknown parameters are found
|
|
1094
1263
|
const {
|
|
1095
1264
|
error: warrning,
|
|
1096
|
-
} =
|
|
1265
|
+
} = PaymentPlatformApplicationValidator.getUserBeneficiaries().validate(
|
|
1097
1266
|
{ orderId },
|
|
1098
1267
|
{ abortEarly: false, allowUnknown: false }
|
|
1099
1268
|
);
|
|
1100
1269
|
if (warrning) {
|
|
1101
1270
|
Logger({
|
|
1102
1271
|
level: "WARN",
|
|
1103
|
-
message:
|
|
1272
|
+
message: `Parameter Validation warrnings for platform > Payment > getUserBeneficiaries \n ${warrning}`,
|
|
1104
1273
|
});
|
|
1105
|
-
Logger({ level: "WARN", message: warrning });
|
|
1106
1274
|
}
|
|
1107
1275
|
|
|
1108
1276
|
const query_params = {};
|
|
@@ -1113,12 +1281,19 @@ class Payment {
|
|
|
1113
1281
|
"get",
|
|
1114
1282
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/user`,
|
|
1115
1283
|
query_params,
|
|
1116
|
-
undefined
|
|
1284
|
+
undefined,
|
|
1285
|
+
undefined,
|
|
1286
|
+
{ headers }
|
|
1117
1287
|
);
|
|
1118
1288
|
|
|
1289
|
+
let responseData = response;
|
|
1290
|
+
if (headers) {
|
|
1291
|
+
responseData = response[0];
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1119
1294
|
const {
|
|
1120
1295
|
error: res_error,
|
|
1121
|
-
} =
|
|
1296
|
+
} = PaymentPlatformModel.OrderBeneficiaryResponse().validate(responseData, {
|
|
1122
1297
|
abortEarly: false,
|
|
1123
1298
|
allowUnknown: false,
|
|
1124
1299
|
});
|
|
@@ -1126,24 +1301,30 @@ class Payment {
|
|
|
1126
1301
|
if (res_error) {
|
|
1127
1302
|
Logger({
|
|
1128
1303
|
level: "WARN",
|
|
1129
|
-
message:
|
|
1304
|
+
message: `Response Validation Warnnings for platform > Payment > getUserBeneficiaries \n ${res_error}`,
|
|
1130
1305
|
});
|
|
1131
|
-
Logger({ level: "WARN", message: res_error });
|
|
1132
1306
|
}
|
|
1133
1307
|
|
|
1134
1308
|
return response;
|
|
1135
1309
|
}
|
|
1136
1310
|
|
|
1137
1311
|
/**
|
|
1138
|
-
* @param {
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* @
|
|
1312
|
+
* @param {PaymentPlatformApplicationValidator.GetUserCODlimitRoutesParam} arg
|
|
1313
|
+
* - Arg object
|
|
1314
|
+
*
|
|
1315
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1316
|
+
* @returns {Promise<PaymentPlatformModel.GetUserCODLimitResponse>} - Success response
|
|
1317
|
+
* @name getUserCODlimitRoutes
|
|
1142
1318
|
* @summary: Get COD limit for user
|
|
1143
|
-
* @description: Use this API to get user cod limit and reamining limit for the payment
|
|
1319
|
+
* @description: Use this API to get user cod limit and reamining limit for the payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserCODlimitRoutes/).
|
|
1144
1320
|
*/
|
|
1145
|
-
async getUserCODlimitRoutes(
|
|
1146
|
-
|
|
1321
|
+
async getUserCODlimitRoutes(
|
|
1322
|
+
{ merchantUserId, mobileNo } = {},
|
|
1323
|
+
{ headers } = { headers: false }
|
|
1324
|
+
) {
|
|
1325
|
+
const {
|
|
1326
|
+
error,
|
|
1327
|
+
} = PaymentPlatformApplicationValidator.getUserCODlimitRoutes().validate(
|
|
1147
1328
|
{
|
|
1148
1329
|
merchantUserId,
|
|
1149
1330
|
mobileNo,
|
|
@@ -1157,7 +1338,7 @@ class Payment {
|
|
|
1157
1338
|
// Showing warrnings if extra unknown parameters are found
|
|
1158
1339
|
const {
|
|
1159
1340
|
error: warrning,
|
|
1160
|
-
} =
|
|
1341
|
+
} = PaymentPlatformApplicationValidator.getUserCODlimitRoutes().validate(
|
|
1161
1342
|
{
|
|
1162
1343
|
merchantUserId,
|
|
1163
1344
|
mobileNo,
|
|
@@ -1167,9 +1348,8 @@ class Payment {
|
|
|
1167
1348
|
if (warrning) {
|
|
1168
1349
|
Logger({
|
|
1169
1350
|
level: "WARN",
|
|
1170
|
-
message:
|
|
1351
|
+
message: `Parameter Validation warrnings for platform > Payment > getUserCODlimitRoutes \n ${warrning}`,
|
|
1171
1352
|
});
|
|
1172
|
-
Logger({ level: "WARN", message: warrning });
|
|
1173
1353
|
}
|
|
1174
1354
|
|
|
1175
1355
|
const query_params = {};
|
|
@@ -1181,12 +1361,19 @@ class Payment {
|
|
|
1181
1361
|
"get",
|
|
1182
1362
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
|
|
1183
1363
|
query_params,
|
|
1184
|
-
undefined
|
|
1364
|
+
undefined,
|
|
1365
|
+
undefined,
|
|
1366
|
+
{ headers }
|
|
1185
1367
|
);
|
|
1186
1368
|
|
|
1369
|
+
let responseData = response;
|
|
1370
|
+
if (headers) {
|
|
1371
|
+
responseData = response[0];
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1187
1374
|
const {
|
|
1188
1375
|
error: res_error,
|
|
1189
|
-
} =
|
|
1376
|
+
} = PaymentPlatformModel.GetUserCODLimitResponse().validate(responseData, {
|
|
1190
1377
|
abortEarly: false,
|
|
1191
1378
|
allowUnknown: false,
|
|
1192
1379
|
});
|
|
@@ -1194,23 +1381,31 @@ class Payment {
|
|
|
1194
1381
|
if (res_error) {
|
|
1195
1382
|
Logger({
|
|
1196
1383
|
level: "WARN",
|
|
1197
|
-
message:
|
|
1384
|
+
message: `Response Validation Warnnings for platform > Payment > getUserCODlimitRoutes \n ${res_error}`,
|
|
1198
1385
|
});
|
|
1199
|
-
Logger({ level: "WARN", message: res_error });
|
|
1200
1386
|
}
|
|
1201
1387
|
|
|
1202
1388
|
return response;
|
|
1203
1389
|
}
|
|
1204
1390
|
|
|
1205
1391
|
/**
|
|
1206
|
-
* @param {
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1392
|
+
* @param {PaymentPlatformApplicationValidator.GetUserOrderBeneficiariesParam} arg
|
|
1393
|
+
* - Arg object
|
|
1394
|
+
*
|
|
1395
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1396
|
+
* @returns {Promise<PaymentPlatformModel.OrderBeneficiaryResponse>} -
|
|
1397
|
+
* Success response
|
|
1398
|
+
* @name getUserOrderBeneficiaries
|
|
1209
1399
|
* @summary: List Order Beneficiary
|
|
1210
|
-
* @description: Get all active beneficiary details added by the user for refund
|
|
1400
|
+
* @description: Get all active beneficiary details added by the user for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserOrderBeneficiaries/).
|
|
1211
1401
|
*/
|
|
1212
|
-
async getUserOrderBeneficiaries(
|
|
1213
|
-
|
|
1402
|
+
async getUserOrderBeneficiaries(
|
|
1403
|
+
{ orderId } = {},
|
|
1404
|
+
{ headers } = { headers: false }
|
|
1405
|
+
) {
|
|
1406
|
+
const {
|
|
1407
|
+
error,
|
|
1408
|
+
} = PaymentPlatformApplicationValidator.getUserOrderBeneficiaries().validate(
|
|
1214
1409
|
{ orderId },
|
|
1215
1410
|
{ abortEarly: false, allowUnknown: true }
|
|
1216
1411
|
);
|
|
@@ -1221,16 +1416,15 @@ class Payment {
|
|
|
1221
1416
|
// Showing warrnings if extra unknown parameters are found
|
|
1222
1417
|
const {
|
|
1223
1418
|
error: warrning,
|
|
1224
|
-
} =
|
|
1419
|
+
} = PaymentPlatformApplicationValidator.getUserOrderBeneficiaries().validate(
|
|
1225
1420
|
{ orderId },
|
|
1226
1421
|
{ abortEarly: false, allowUnknown: false }
|
|
1227
1422
|
);
|
|
1228
1423
|
if (warrning) {
|
|
1229
1424
|
Logger({
|
|
1230
1425
|
level: "WARN",
|
|
1231
|
-
message:
|
|
1426
|
+
message: `Parameter Validation warrnings for platform > Payment > getUserOrderBeneficiaries \n ${warrning}`,
|
|
1232
1427
|
});
|
|
1233
|
-
Logger({ level: "WARN", message: warrning });
|
|
1234
1428
|
}
|
|
1235
1429
|
|
|
1236
1430
|
const query_params = {};
|
|
@@ -1241,12 +1435,19 @@ class Payment {
|
|
|
1241
1435
|
"get",
|
|
1242
1436
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/order`,
|
|
1243
1437
|
query_params,
|
|
1244
|
-
undefined
|
|
1438
|
+
undefined,
|
|
1439
|
+
undefined,
|
|
1440
|
+
{ headers }
|
|
1245
1441
|
);
|
|
1246
1442
|
|
|
1443
|
+
let responseData = response;
|
|
1444
|
+
if (headers) {
|
|
1445
|
+
responseData = response[0];
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1247
1448
|
const {
|
|
1248
1449
|
error: res_error,
|
|
1249
|
-
} =
|
|
1450
|
+
} = PaymentPlatformModel.OrderBeneficiaryResponse().validate(responseData, {
|
|
1250
1451
|
abortEarly: false,
|
|
1251
1452
|
allowUnknown: false,
|
|
1252
1453
|
});
|
|
@@ -1254,23 +1455,28 @@ class Payment {
|
|
|
1254
1455
|
if (res_error) {
|
|
1255
1456
|
Logger({
|
|
1256
1457
|
level: "WARN",
|
|
1257
|
-
message:
|
|
1458
|
+
message: `Response Validation Warnnings for platform > Payment > getUserOrderBeneficiaries \n ${res_error}`,
|
|
1258
1459
|
});
|
|
1259
|
-
Logger({ level: "WARN", message: res_error });
|
|
1260
1460
|
}
|
|
1261
1461
|
|
|
1262
1462
|
return response;
|
|
1263
1463
|
}
|
|
1264
1464
|
|
|
1265
1465
|
/**
|
|
1266
|
-
* @param {
|
|
1267
|
-
*
|
|
1268
|
-
*
|
|
1466
|
+
* @param {PaymentPlatformApplicationValidator.InitialisePaymentParam} arg
|
|
1467
|
+
* - Arg object
|
|
1468
|
+
*
|
|
1469
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1470
|
+
* @returns {Promise<PaymentPlatformModel.PaymentInitializationResponse>} -
|
|
1471
|
+
* Success response
|
|
1472
|
+
* @name initialisePayment
|
|
1269
1473
|
* @summary: Initialize a payment (server-to-server) for UPI and BharatQR
|
|
1270
|
-
* @description: PUse this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen.
|
|
1474
|
+
* @description: PUse this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/initialisePayment/).
|
|
1271
1475
|
*/
|
|
1272
|
-
async initialisePayment({ body } = {}) {
|
|
1273
|
-
const {
|
|
1476
|
+
async initialisePayment({ body } = {}, { headers } = { headers: false }) {
|
|
1477
|
+
const {
|
|
1478
|
+
error,
|
|
1479
|
+
} = PaymentPlatformApplicationValidator.initialisePayment().validate(
|
|
1274
1480
|
{
|
|
1275
1481
|
body,
|
|
1276
1482
|
},
|
|
@@ -1281,7 +1487,9 @@ class Payment {
|
|
|
1281
1487
|
}
|
|
1282
1488
|
|
|
1283
1489
|
// Showing warrnings if extra unknown parameters are found
|
|
1284
|
-
const {
|
|
1490
|
+
const {
|
|
1491
|
+
error: warrning,
|
|
1492
|
+
} = PaymentPlatformApplicationValidator.initialisePayment().validate(
|
|
1285
1493
|
{
|
|
1286
1494
|
body,
|
|
1287
1495
|
},
|
|
@@ -1290,9 +1498,8 @@ class Payment {
|
|
|
1290
1498
|
if (warrning) {
|
|
1291
1499
|
Logger({
|
|
1292
1500
|
level: "WARN",
|
|
1293
|
-
message:
|
|
1501
|
+
message: `Parameter Validation warrnings for platform > Payment > initialisePayment \n ${warrning}`,
|
|
1294
1502
|
});
|
|
1295
|
-
Logger({ level: "WARN", message: warrning });
|
|
1296
1503
|
}
|
|
1297
1504
|
|
|
1298
1505
|
const query_params = {};
|
|
@@ -1302,36 +1509,48 @@ class Payment {
|
|
|
1302
1509
|
"post",
|
|
1303
1510
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/request`,
|
|
1304
1511
|
query_params,
|
|
1305
|
-
body
|
|
1512
|
+
body,
|
|
1513
|
+
undefined,
|
|
1514
|
+
{ headers }
|
|
1306
1515
|
);
|
|
1307
1516
|
|
|
1517
|
+
let responseData = response;
|
|
1518
|
+
if (headers) {
|
|
1519
|
+
responseData = response[0];
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1308
1522
|
const {
|
|
1309
1523
|
error: res_error,
|
|
1310
|
-
} =
|
|
1311
|
-
|
|
1312
|
-
allowUnknown: false
|
|
1313
|
-
|
|
1524
|
+
} = PaymentPlatformModel.PaymentInitializationResponse().validate(
|
|
1525
|
+
responseData,
|
|
1526
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1527
|
+
);
|
|
1314
1528
|
|
|
1315
1529
|
if (res_error) {
|
|
1316
1530
|
Logger({
|
|
1317
1531
|
level: "WARN",
|
|
1318
|
-
message:
|
|
1532
|
+
message: `Response Validation Warnnings for platform > Payment > initialisePayment \n ${res_error}`,
|
|
1319
1533
|
});
|
|
1320
|
-
Logger({ level: "WARN", message: res_error });
|
|
1321
1534
|
}
|
|
1322
1535
|
|
|
1323
1536
|
return response;
|
|
1324
1537
|
}
|
|
1325
1538
|
|
|
1326
1539
|
/**
|
|
1327
|
-
* @param {
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1540
|
+
* @param {PaymentPlatformApplicationValidator.MerchantOnBoardingParam} arg
|
|
1541
|
+
* - Arg object
|
|
1542
|
+
*
|
|
1543
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1544
|
+
* @returns {Promise<PaymentPlatformModel.MerchantOnBoardingResponse>} -
|
|
1545
|
+
* Success response
|
|
1546
|
+
* @name merchantOnBoarding
|
|
1330
1547
|
* @summary: API to push Ajiodhan merchant data to Gringotts system
|
|
1331
|
-
* @description: Use this API to push Ajiodhan merchant data to Gringotts system
|
|
1548
|
+
* @description: Use this API to push Ajiodhan merchant data to Gringotts system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/merchantOnBoarding/).
|
|
1332
1549
|
*/
|
|
1333
|
-
async merchantOnBoarding({ body } = {}) {
|
|
1334
|
-
const {
|
|
1550
|
+
async merchantOnBoarding({ body } = {}, { headers } = { headers: false }) {
|
|
1551
|
+
const {
|
|
1552
|
+
error,
|
|
1553
|
+
} = PaymentPlatformApplicationValidator.merchantOnBoarding().validate(
|
|
1335
1554
|
{
|
|
1336
1555
|
body,
|
|
1337
1556
|
},
|
|
@@ -1342,7 +1561,9 @@ class Payment {
|
|
|
1342
1561
|
}
|
|
1343
1562
|
|
|
1344
1563
|
// Showing warrnings if extra unknown parameters are found
|
|
1345
|
-
const {
|
|
1564
|
+
const {
|
|
1565
|
+
error: warrning,
|
|
1566
|
+
} = PaymentPlatformApplicationValidator.merchantOnBoarding().validate(
|
|
1346
1567
|
{
|
|
1347
1568
|
body,
|
|
1348
1569
|
},
|
|
@@ -1351,9 +1572,8 @@ class Payment {
|
|
|
1351
1572
|
if (warrning) {
|
|
1352
1573
|
Logger({
|
|
1353
1574
|
level: "WARN",
|
|
1354
|
-
message:
|
|
1575
|
+
message: `Parameter Validation warrnings for platform > Payment > merchantOnBoarding \n ${warrning}`,
|
|
1355
1576
|
});
|
|
1356
|
-
Logger({ level: "WARN", message: warrning });
|
|
1357
1577
|
}
|
|
1358
1578
|
|
|
1359
1579
|
const query_params = {};
|
|
@@ -1363,42 +1583,48 @@ class Payment {
|
|
|
1363
1583
|
"post",
|
|
1364
1584
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/merchant-onboarding`,
|
|
1365
1585
|
query_params,
|
|
1366
|
-
body
|
|
1586
|
+
body,
|
|
1587
|
+
undefined,
|
|
1588
|
+
{ headers }
|
|
1367
1589
|
);
|
|
1368
1590
|
|
|
1591
|
+
let responseData = response;
|
|
1592
|
+
if (headers) {
|
|
1593
|
+
responseData = response[0];
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1369
1596
|
const {
|
|
1370
1597
|
error: res_error,
|
|
1371
|
-
} =
|
|
1372
|
-
|
|
1373
|
-
allowUnknown: false
|
|
1374
|
-
|
|
1598
|
+
} = PaymentPlatformModel.MerchantOnBoardingResponse().validate(
|
|
1599
|
+
responseData,
|
|
1600
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1601
|
+
);
|
|
1375
1602
|
|
|
1376
1603
|
if (res_error) {
|
|
1377
1604
|
Logger({
|
|
1378
1605
|
level: "WARN",
|
|
1379
|
-
message:
|
|
1606
|
+
message: `Response Validation Warnnings for platform > Payment > merchantOnBoarding \n ${res_error}`,
|
|
1380
1607
|
});
|
|
1381
|
-
Logger({ level: "WARN", message: res_error });
|
|
1382
1608
|
}
|
|
1383
1609
|
|
|
1384
1610
|
return response;
|
|
1385
1611
|
}
|
|
1386
1612
|
|
|
1387
1613
|
/**
|
|
1388
|
-
* @param {
|
|
1389
|
-
* @param {
|
|
1390
|
-
* @
|
|
1391
|
-
* @
|
|
1392
|
-
* @returns {Promise<GetOauthUrlResponse>} - Success response
|
|
1614
|
+
* @param {PaymentPlatformApplicationValidator.OauthGetUrlParam} arg - Arg object
|
|
1615
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1616
|
+
* @returns {Promise<PaymentPlatformModel.GetOauthUrlResponse>} - Success response
|
|
1617
|
+
* @name oauthGetUrl
|
|
1393
1618
|
* @summary: API to Get the url to call for oauth
|
|
1394
|
-
* @description: Use this API to Get the url to call for oauth.
|
|
1619
|
+
* @description: Use this API to Get the url to call for oauth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/oauthGetUrl/).
|
|
1395
1620
|
*/
|
|
1396
|
-
async oauthGetUrl(
|
|
1397
|
-
aggregator,
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1621
|
+
async oauthGetUrl(
|
|
1622
|
+
{ aggregator, successRedirectUrl, failureRedirectUrl } = {},
|
|
1623
|
+
{ headers } = { headers: false }
|
|
1624
|
+
) {
|
|
1625
|
+
const {
|
|
1626
|
+
error,
|
|
1627
|
+
} = PaymentPlatformApplicationValidator.oauthGetUrl().validate(
|
|
1402
1628
|
{
|
|
1403
1629
|
aggregator,
|
|
1404
1630
|
successRedirectUrl,
|
|
@@ -1411,7 +1637,9 @@ class Payment {
|
|
|
1411
1637
|
}
|
|
1412
1638
|
|
|
1413
1639
|
// Showing warrnings if extra unknown parameters are found
|
|
1414
|
-
const {
|
|
1640
|
+
const {
|
|
1641
|
+
error: warrning,
|
|
1642
|
+
} = PaymentPlatformApplicationValidator.oauthGetUrl().validate(
|
|
1415
1643
|
{
|
|
1416
1644
|
aggregator,
|
|
1417
1645
|
successRedirectUrl,
|
|
@@ -1422,9 +1650,8 @@ class Payment {
|
|
|
1422
1650
|
if (warrning) {
|
|
1423
1651
|
Logger({
|
|
1424
1652
|
level: "WARN",
|
|
1425
|
-
message:
|
|
1653
|
+
message: `Parameter Validation warrnings for platform > Payment > oauthGetUrl \n ${warrning}`,
|
|
1426
1654
|
});
|
|
1427
|
-
Logger({ level: "WARN", message: warrning });
|
|
1428
1655
|
}
|
|
1429
1656
|
|
|
1430
1657
|
const query_params = {};
|
|
@@ -1436,12 +1663,19 @@ class Payment {
|
|
|
1436
1663
|
"get",
|
|
1437
1664
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/onboard/${aggregator}/`,
|
|
1438
1665
|
query_params,
|
|
1439
|
-
undefined
|
|
1666
|
+
undefined,
|
|
1667
|
+
undefined,
|
|
1668
|
+
{ headers }
|
|
1440
1669
|
);
|
|
1441
1670
|
|
|
1671
|
+
let responseData = response;
|
|
1672
|
+
if (headers) {
|
|
1673
|
+
responseData = response[0];
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1442
1676
|
const {
|
|
1443
1677
|
error: res_error,
|
|
1444
|
-
} =
|
|
1678
|
+
} = PaymentPlatformModel.GetOauthUrlResponse().validate(responseData, {
|
|
1445
1679
|
abortEarly: false,
|
|
1446
1680
|
allowUnknown: false,
|
|
1447
1681
|
});
|
|
@@ -1449,23 +1683,29 @@ class Payment {
|
|
|
1449
1683
|
if (res_error) {
|
|
1450
1684
|
Logger({
|
|
1451
1685
|
level: "WARN",
|
|
1452
|
-
message:
|
|
1686
|
+
message: `Response Validation Warnnings for platform > Payment > oauthGetUrl \n ${res_error}`,
|
|
1453
1687
|
});
|
|
1454
|
-
Logger({ level: "WARN", message: res_error });
|
|
1455
1688
|
}
|
|
1456
1689
|
|
|
1457
1690
|
return response;
|
|
1458
1691
|
}
|
|
1459
1692
|
|
|
1460
1693
|
/**
|
|
1461
|
-
* @param {
|
|
1462
|
-
*
|
|
1463
|
-
*
|
|
1694
|
+
* @param {PaymentPlatformApplicationValidator.PaymentStatusBulkParam} arg
|
|
1695
|
+
* - Arg object
|
|
1696
|
+
*
|
|
1697
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1698
|
+
* @returns {Promise<PaymentPlatformModel.PaymentStatusBulkHandlerResponse>}
|
|
1699
|
+
* - Success response
|
|
1700
|
+
*
|
|
1701
|
+
* @name paymentStatusBulk
|
|
1464
1702
|
* @summary: Get Payment status and information for a list of order_ids
|
|
1465
|
-
* @description: Use this API to get Payment status and information for a list of order_ids
|
|
1703
|
+
* @description: Use this API to get Payment status and information for a list of order_ids - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/paymentStatusBulk/).
|
|
1466
1704
|
*/
|
|
1467
|
-
async paymentStatusBulk({ body } = {}) {
|
|
1468
|
-
const {
|
|
1705
|
+
async paymentStatusBulk({ body } = {}, { headers } = { headers: false }) {
|
|
1706
|
+
const {
|
|
1707
|
+
error,
|
|
1708
|
+
} = PaymentPlatformApplicationValidator.paymentStatusBulk().validate(
|
|
1469
1709
|
{
|
|
1470
1710
|
body,
|
|
1471
1711
|
},
|
|
@@ -1476,7 +1716,9 @@ class Payment {
|
|
|
1476
1716
|
}
|
|
1477
1717
|
|
|
1478
1718
|
// Showing warrnings if extra unknown parameters are found
|
|
1479
|
-
const {
|
|
1719
|
+
const {
|
|
1720
|
+
error: warrning,
|
|
1721
|
+
} = PaymentPlatformApplicationValidator.paymentStatusBulk().validate(
|
|
1480
1722
|
{
|
|
1481
1723
|
body,
|
|
1482
1724
|
},
|
|
@@ -1485,9 +1727,8 @@ class Payment {
|
|
|
1485
1727
|
if (warrning) {
|
|
1486
1728
|
Logger({
|
|
1487
1729
|
level: "WARN",
|
|
1488
|
-
message:
|
|
1730
|
+
message: `Parameter Validation warrnings for platform > Payment > paymentStatusBulk \n ${warrning}`,
|
|
1489
1731
|
});
|
|
1490
|
-
Logger({ level: "WARN", message: warrning });
|
|
1491
1732
|
}
|
|
1492
1733
|
|
|
1493
1734
|
const query_params = {};
|
|
@@ -1497,36 +1738,51 @@ class Payment {
|
|
|
1497
1738
|
"post",
|
|
1498
1739
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/payment-status-bulk/`,
|
|
1499
1740
|
query_params,
|
|
1500
|
-
body
|
|
1741
|
+
body,
|
|
1742
|
+
undefined,
|
|
1743
|
+
{ headers }
|
|
1501
1744
|
);
|
|
1502
1745
|
|
|
1746
|
+
let responseData = response;
|
|
1747
|
+
if (headers) {
|
|
1748
|
+
responseData = response[0];
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1503
1751
|
const {
|
|
1504
1752
|
error: res_error,
|
|
1505
|
-
} =
|
|
1506
|
-
|
|
1507
|
-
allowUnknown: false
|
|
1508
|
-
|
|
1753
|
+
} = PaymentPlatformModel.PaymentStatusBulkHandlerResponse().validate(
|
|
1754
|
+
responseData,
|
|
1755
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1756
|
+
);
|
|
1509
1757
|
|
|
1510
1758
|
if (res_error) {
|
|
1511
1759
|
Logger({
|
|
1512
1760
|
level: "WARN",
|
|
1513
|
-
message:
|
|
1761
|
+
message: `Response Validation Warnnings for platform > Payment > paymentStatusBulk \n ${res_error}`,
|
|
1514
1762
|
});
|
|
1515
|
-
Logger({ level: "WARN", message: res_error });
|
|
1516
1763
|
}
|
|
1517
1764
|
|
|
1518
1765
|
return response;
|
|
1519
1766
|
}
|
|
1520
1767
|
|
|
1521
1768
|
/**
|
|
1522
|
-
* @param {
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1769
|
+
* @param {PaymentPlatformApplicationValidator.PollingPaymentLinkParam} arg
|
|
1770
|
+
* - Arg object
|
|
1771
|
+
*
|
|
1772
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1773
|
+
* @returns {Promise<PaymentPlatformModel.PollingPaymentLinkResponse>} -
|
|
1774
|
+
* Success response
|
|
1775
|
+
* @name pollingPaymentLink
|
|
1525
1776
|
* @summary: Used for polling if payment successful or not
|
|
1526
|
-
* @description: Use this API to poll if payment through payment was successful or not
|
|
1777
|
+
* @description: Use this API to poll if payment through payment was successful or not - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/pollingPaymentLink/).
|
|
1527
1778
|
*/
|
|
1528
|
-
async pollingPaymentLink(
|
|
1529
|
-
|
|
1779
|
+
async pollingPaymentLink(
|
|
1780
|
+
{ paymentLinkId } = {},
|
|
1781
|
+
{ headers } = { headers: false }
|
|
1782
|
+
) {
|
|
1783
|
+
const {
|
|
1784
|
+
error,
|
|
1785
|
+
} = PaymentPlatformApplicationValidator.pollingPaymentLink().validate(
|
|
1530
1786
|
{
|
|
1531
1787
|
paymentLinkId,
|
|
1532
1788
|
},
|
|
@@ -1537,7 +1793,9 @@ class Payment {
|
|
|
1537
1793
|
}
|
|
1538
1794
|
|
|
1539
1795
|
// Showing warrnings if extra unknown parameters are found
|
|
1540
|
-
const {
|
|
1796
|
+
const {
|
|
1797
|
+
error: warrning,
|
|
1798
|
+
} = PaymentPlatformApplicationValidator.pollingPaymentLink().validate(
|
|
1541
1799
|
{
|
|
1542
1800
|
paymentLinkId,
|
|
1543
1801
|
},
|
|
@@ -1546,9 +1804,8 @@ class Payment {
|
|
|
1546
1804
|
if (warrning) {
|
|
1547
1805
|
Logger({
|
|
1548
1806
|
level: "WARN",
|
|
1549
|
-
message:
|
|
1807
|
+
message: `Parameter Validation warrnings for platform > Payment > pollingPaymentLink \n ${warrning}`,
|
|
1550
1808
|
});
|
|
1551
|
-
Logger({ level: "WARN", message: warrning });
|
|
1552
1809
|
}
|
|
1553
1810
|
|
|
1554
1811
|
const query_params = {};
|
|
@@ -1559,36 +1816,45 @@ class Payment {
|
|
|
1559
1816
|
"get",
|
|
1560
1817
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/polling-payment-link/`,
|
|
1561
1818
|
query_params,
|
|
1562
|
-
undefined
|
|
1819
|
+
undefined,
|
|
1820
|
+
undefined,
|
|
1821
|
+
{ headers }
|
|
1563
1822
|
);
|
|
1564
1823
|
|
|
1824
|
+
let responseData = response;
|
|
1825
|
+
if (headers) {
|
|
1826
|
+
responseData = response[0];
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1565
1829
|
const {
|
|
1566
1830
|
error: res_error,
|
|
1567
|
-
} =
|
|
1568
|
-
|
|
1569
|
-
allowUnknown: false
|
|
1570
|
-
|
|
1831
|
+
} = PaymentPlatformModel.PollingPaymentLinkResponse().validate(
|
|
1832
|
+
responseData,
|
|
1833
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1834
|
+
);
|
|
1571
1835
|
|
|
1572
1836
|
if (res_error) {
|
|
1573
1837
|
Logger({
|
|
1574
1838
|
level: "WARN",
|
|
1575
|
-
message:
|
|
1839
|
+
message: `Response Validation Warnnings for platform > Payment > pollingPaymentLink \n ${res_error}`,
|
|
1576
1840
|
});
|
|
1577
|
-
Logger({ level: "WARN", message: res_error });
|
|
1578
1841
|
}
|
|
1579
1842
|
|
|
1580
1843
|
return response;
|
|
1581
1844
|
}
|
|
1582
1845
|
|
|
1583
1846
|
/**
|
|
1584
|
-
* @param {
|
|
1585
|
-
* @param {
|
|
1586
|
-
* @returns {Promise<RepaymentResponse>} - Success response
|
|
1847
|
+
* @param {PaymentPlatformApplicationValidator.RepaymentDetailsParam} arg - Arg object
|
|
1848
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1849
|
+
* @returns {Promise<PaymentPlatformModel.RepaymentResponse>} - Success response
|
|
1850
|
+
* @name repaymentDetails
|
|
1587
1851
|
* @summary: API to register repayment details
|
|
1588
|
-
* @description: Use this API to register any repayment record in the db and notify the aggrgator
|
|
1852
|
+
* @description: Use this API to register any repayment record in the db and notify the aggrgator - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/repaymentDetails/).
|
|
1589
1853
|
*/
|
|
1590
|
-
async repaymentDetails({ body } = {}) {
|
|
1591
|
-
const {
|
|
1854
|
+
async repaymentDetails({ body } = {}, { headers } = { headers: false }) {
|
|
1855
|
+
const {
|
|
1856
|
+
error,
|
|
1857
|
+
} = PaymentPlatformApplicationValidator.repaymentDetails().validate(
|
|
1592
1858
|
{
|
|
1593
1859
|
body,
|
|
1594
1860
|
},
|
|
@@ -1599,7 +1865,9 @@ class Payment {
|
|
|
1599
1865
|
}
|
|
1600
1866
|
|
|
1601
1867
|
// Showing warrnings if extra unknown parameters are found
|
|
1602
|
-
const {
|
|
1868
|
+
const {
|
|
1869
|
+
error: warrning,
|
|
1870
|
+
} = PaymentPlatformApplicationValidator.repaymentDetails().validate(
|
|
1603
1871
|
{
|
|
1604
1872
|
body,
|
|
1605
1873
|
},
|
|
@@ -1608,9 +1876,8 @@ class Payment {
|
|
|
1608
1876
|
if (warrning) {
|
|
1609
1877
|
Logger({
|
|
1610
1878
|
level: "WARN",
|
|
1611
|
-
message:
|
|
1879
|
+
message: `Parameter Validation warrnings for platform > Payment > repaymentDetails \n ${warrning}`,
|
|
1612
1880
|
});
|
|
1613
|
-
Logger({ level: "WARN", message: warrning });
|
|
1614
1881
|
}
|
|
1615
1882
|
|
|
1616
1883
|
const query_params = {};
|
|
@@ -1620,12 +1887,19 @@ class Payment {
|
|
|
1620
1887
|
"post",
|
|
1621
1888
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/repayment-details`,
|
|
1622
1889
|
query_params,
|
|
1623
|
-
body
|
|
1890
|
+
body,
|
|
1891
|
+
undefined,
|
|
1892
|
+
{ headers }
|
|
1624
1893
|
);
|
|
1625
1894
|
|
|
1895
|
+
let responseData = response;
|
|
1896
|
+
if (headers) {
|
|
1897
|
+
responseData = response[0];
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1626
1900
|
const {
|
|
1627
1901
|
error: res_error,
|
|
1628
|
-
} =
|
|
1902
|
+
} = PaymentPlatformModel.RepaymentResponse().validate(responseData, {
|
|
1629
1903
|
abortEarly: false,
|
|
1630
1904
|
allowUnknown: false,
|
|
1631
1905
|
});
|
|
@@ -1633,23 +1907,28 @@ class Payment {
|
|
|
1633
1907
|
if (res_error) {
|
|
1634
1908
|
Logger({
|
|
1635
1909
|
level: "WARN",
|
|
1636
|
-
message:
|
|
1910
|
+
message: `Response Validation Warnnings for platform > Payment > repaymentDetails \n ${res_error}`,
|
|
1637
1911
|
});
|
|
1638
|
-
Logger({ level: "WARN", message: res_error });
|
|
1639
1912
|
}
|
|
1640
1913
|
|
|
1641
1914
|
return response;
|
|
1642
1915
|
}
|
|
1643
1916
|
|
|
1644
1917
|
/**
|
|
1645
|
-
* @param {
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
1918
|
+
* @param {PaymentPlatformApplicationValidator.ResendOrCancelPaymentParam} arg
|
|
1919
|
+
* - Arg object
|
|
1920
|
+
*
|
|
1921
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1922
|
+
* @returns {Promise<PaymentPlatformModel.ResendOrCancelPaymentResponse>} -
|
|
1923
|
+
* Success response
|
|
1924
|
+
* @name resendOrCancelPayment
|
|
1648
1925
|
* @summary: API to resend and cancel a payment link which was already generated.
|
|
1649
|
-
* @description: Use this API to perform resend or cancel a payment link based on request payload.
|
|
1926
|
+
* @description: Use this API to perform resend or cancel a payment link based on request payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/resendOrCancelPayment/).
|
|
1650
1927
|
*/
|
|
1651
|
-
async resendOrCancelPayment({ body } = {}) {
|
|
1652
|
-
const {
|
|
1928
|
+
async resendOrCancelPayment({ body } = {}, { headers } = { headers: false }) {
|
|
1929
|
+
const {
|
|
1930
|
+
error,
|
|
1931
|
+
} = PaymentPlatformApplicationValidator.resendOrCancelPayment().validate(
|
|
1653
1932
|
{
|
|
1654
1933
|
body,
|
|
1655
1934
|
},
|
|
@@ -1662,7 +1941,7 @@ class Payment {
|
|
|
1662
1941
|
// Showing warrnings if extra unknown parameters are found
|
|
1663
1942
|
const {
|
|
1664
1943
|
error: warrning,
|
|
1665
|
-
} =
|
|
1944
|
+
} = PaymentPlatformApplicationValidator.resendOrCancelPayment().validate(
|
|
1666
1945
|
{
|
|
1667
1946
|
body,
|
|
1668
1947
|
},
|
|
@@ -1671,9 +1950,8 @@ class Payment {
|
|
|
1671
1950
|
if (warrning) {
|
|
1672
1951
|
Logger({
|
|
1673
1952
|
level: "WARN",
|
|
1674
|
-
message:
|
|
1953
|
+
message: `Parameter Validation warrnings for platform > Payment > resendOrCancelPayment \n ${warrning}`,
|
|
1675
1954
|
});
|
|
1676
|
-
Logger({ level: "WARN", message: warrning });
|
|
1677
1955
|
}
|
|
1678
1956
|
|
|
1679
1957
|
const query_params = {};
|
|
@@ -1683,36 +1961,48 @@ class Payment {
|
|
|
1683
1961
|
"post",
|
|
1684
1962
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/cancel`,
|
|
1685
1963
|
query_params,
|
|
1686
|
-
body
|
|
1964
|
+
body,
|
|
1965
|
+
undefined,
|
|
1966
|
+
{ headers }
|
|
1687
1967
|
);
|
|
1688
1968
|
|
|
1969
|
+
let responseData = response;
|
|
1970
|
+
if (headers) {
|
|
1971
|
+
responseData = response[0];
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1689
1974
|
const {
|
|
1690
1975
|
error: res_error,
|
|
1691
|
-
} =
|
|
1692
|
-
|
|
1693
|
-
allowUnknown: false
|
|
1694
|
-
|
|
1976
|
+
} = PaymentPlatformModel.ResendOrCancelPaymentResponse().validate(
|
|
1977
|
+
responseData,
|
|
1978
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1979
|
+
);
|
|
1695
1980
|
|
|
1696
1981
|
if (res_error) {
|
|
1697
1982
|
Logger({
|
|
1698
1983
|
level: "WARN",
|
|
1699
|
-
message:
|
|
1984
|
+
message: `Response Validation Warnnings for platform > Payment > resendOrCancelPayment \n ${res_error}`,
|
|
1700
1985
|
});
|
|
1701
|
-
Logger({ level: "WARN", message: res_error });
|
|
1702
1986
|
}
|
|
1703
1987
|
|
|
1704
1988
|
return response;
|
|
1705
1989
|
}
|
|
1706
1990
|
|
|
1707
1991
|
/**
|
|
1708
|
-
* @param {
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1992
|
+
* @param {PaymentPlatformApplicationValidator.ResendPaymentLinkParam} arg
|
|
1993
|
+
* - Arg object
|
|
1994
|
+
*
|
|
1995
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1996
|
+
* @returns {Promise<PaymentPlatformModel.ResendPaymentLinkResponse>} -
|
|
1997
|
+
* Success response
|
|
1998
|
+
* @name resendPaymentLink
|
|
1711
1999
|
* @summary: Resend payment link
|
|
1712
|
-
* @description: Use this API to resend a payment link for the customer
|
|
2000
|
+
* @description: Use this API to resend a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/resendPaymentLink/).
|
|
1713
2001
|
*/
|
|
1714
|
-
async resendPaymentLink({ body } = {}) {
|
|
1715
|
-
const {
|
|
2002
|
+
async resendPaymentLink({ body } = {}, { headers } = { headers: false }) {
|
|
2003
|
+
const {
|
|
2004
|
+
error,
|
|
2005
|
+
} = PaymentPlatformApplicationValidator.resendPaymentLink().validate(
|
|
1716
2006
|
{
|
|
1717
2007
|
body,
|
|
1718
2008
|
},
|
|
@@ -1723,7 +2013,9 @@ class Payment {
|
|
|
1723
2013
|
}
|
|
1724
2014
|
|
|
1725
2015
|
// Showing warrnings if extra unknown parameters are found
|
|
1726
|
-
const {
|
|
2016
|
+
const {
|
|
2017
|
+
error: warrning,
|
|
2018
|
+
} = PaymentPlatformApplicationValidator.resendPaymentLink().validate(
|
|
1727
2019
|
{
|
|
1728
2020
|
body,
|
|
1729
2021
|
},
|
|
@@ -1732,9 +2024,8 @@ class Payment {
|
|
|
1732
2024
|
if (warrning) {
|
|
1733
2025
|
Logger({
|
|
1734
2026
|
level: "WARN",
|
|
1735
|
-
message:
|
|
2027
|
+
message: `Parameter Validation warrnings for platform > Payment > resendPaymentLink \n ${warrning}`,
|
|
1736
2028
|
});
|
|
1737
|
-
Logger({ level: "WARN", message: warrning });
|
|
1738
2029
|
}
|
|
1739
2030
|
|
|
1740
2031
|
const query_params = {};
|
|
@@ -1744,36 +2035,48 @@ class Payment {
|
|
|
1744
2035
|
"post",
|
|
1745
2036
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resend-payment-link/`,
|
|
1746
2037
|
query_params,
|
|
1747
|
-
body
|
|
2038
|
+
body,
|
|
2039
|
+
undefined,
|
|
2040
|
+
{ headers }
|
|
1748
2041
|
);
|
|
1749
2042
|
|
|
2043
|
+
let responseData = response;
|
|
2044
|
+
if (headers) {
|
|
2045
|
+
responseData = response[0];
|
|
2046
|
+
}
|
|
2047
|
+
|
|
1750
2048
|
const {
|
|
1751
2049
|
error: res_error,
|
|
1752
|
-
} =
|
|
1753
|
-
|
|
1754
|
-
allowUnknown: false
|
|
1755
|
-
|
|
2050
|
+
} = PaymentPlatformModel.ResendPaymentLinkResponse().validate(
|
|
2051
|
+
responseData,
|
|
2052
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2053
|
+
);
|
|
1756
2054
|
|
|
1757
2055
|
if (res_error) {
|
|
1758
2056
|
Logger({
|
|
1759
2057
|
level: "WARN",
|
|
1760
|
-
message:
|
|
2058
|
+
message: `Response Validation Warnnings for platform > Payment > resendPaymentLink \n ${res_error}`,
|
|
1761
2059
|
});
|
|
1762
|
-
Logger({ level: "WARN", message: res_error });
|
|
1763
2060
|
}
|
|
1764
2061
|
|
|
1765
2062
|
return response;
|
|
1766
2063
|
}
|
|
1767
2064
|
|
|
1768
2065
|
/**
|
|
1769
|
-
* @param {
|
|
1770
|
-
* @param {
|
|
1771
|
-
* @returns {Promise<RevokeOAuthToken>} - Success response
|
|
2066
|
+
* @param {PaymentPlatformApplicationValidator.RevokeOauthTokenParam} arg - Arg object
|
|
2067
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2068
|
+
* @returns {Promise<PaymentPlatformModel.RevokeOAuthToken>} - Success response
|
|
2069
|
+
* @name revokeOauthToken
|
|
1772
2070
|
* @summary: API to Revoke oauth for razorpay partnership
|
|
1773
|
-
* @description: Use this API to Revoke oauth for razorpay partnership
|
|
2071
|
+
* @description: Use this API to Revoke oauth for razorpay partnership - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/revokeOauthToken/).
|
|
1774
2072
|
*/
|
|
1775
|
-
async revokeOauthToken(
|
|
1776
|
-
|
|
2073
|
+
async revokeOauthToken(
|
|
2074
|
+
{ aggregator } = {},
|
|
2075
|
+
{ headers } = { headers: false }
|
|
2076
|
+
) {
|
|
2077
|
+
const {
|
|
2078
|
+
error,
|
|
2079
|
+
} = PaymentPlatformApplicationValidator.revokeOauthToken().validate(
|
|
1777
2080
|
{
|
|
1778
2081
|
aggregator,
|
|
1779
2082
|
},
|
|
@@ -1784,7 +2087,9 @@ class Payment {
|
|
|
1784
2087
|
}
|
|
1785
2088
|
|
|
1786
2089
|
// Showing warrnings if extra unknown parameters are found
|
|
1787
|
-
const {
|
|
2090
|
+
const {
|
|
2091
|
+
error: warrning,
|
|
2092
|
+
} = PaymentPlatformApplicationValidator.revokeOauthToken().validate(
|
|
1788
2093
|
{
|
|
1789
2094
|
aggregator,
|
|
1790
2095
|
},
|
|
@@ -1793,9 +2098,8 @@ class Payment {
|
|
|
1793
2098
|
if (warrning) {
|
|
1794
2099
|
Logger({
|
|
1795
2100
|
level: "WARN",
|
|
1796
|
-
message:
|
|
2101
|
+
message: `Parameter Validation warrnings for platform > Payment > revokeOauthToken \n ${warrning}`,
|
|
1797
2102
|
});
|
|
1798
|
-
Logger({ level: "WARN", message: warrning });
|
|
1799
2103
|
}
|
|
1800
2104
|
|
|
1801
2105
|
const query_params = {};
|
|
@@ -1805,12 +2109,19 @@ class Payment {
|
|
|
1805
2109
|
"post",
|
|
1806
2110
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/revoke/${aggregator}/`,
|
|
1807
2111
|
query_params,
|
|
1808
|
-
undefined
|
|
2112
|
+
undefined,
|
|
2113
|
+
undefined,
|
|
2114
|
+
{ headers }
|
|
1809
2115
|
);
|
|
1810
2116
|
|
|
2117
|
+
let responseData = response;
|
|
2118
|
+
if (headers) {
|
|
2119
|
+
responseData = response[0];
|
|
2120
|
+
}
|
|
2121
|
+
|
|
1811
2122
|
const {
|
|
1812
2123
|
error: res_error,
|
|
1813
|
-
} =
|
|
2124
|
+
} = PaymentPlatformModel.RevokeOAuthToken().validate(responseData, {
|
|
1814
2125
|
abortEarly: false,
|
|
1815
2126
|
allowUnknown: false,
|
|
1816
2127
|
});
|
|
@@ -1818,23 +2129,31 @@ class Payment {
|
|
|
1818
2129
|
if (res_error) {
|
|
1819
2130
|
Logger({
|
|
1820
2131
|
level: "WARN",
|
|
1821
|
-
message:
|
|
2132
|
+
message: `Response Validation Warnnings for platform > Payment > revokeOauthToken \n ${res_error}`,
|
|
1822
2133
|
});
|
|
1823
|
-
Logger({ level: "WARN", message: res_error });
|
|
1824
2134
|
}
|
|
1825
2135
|
|
|
1826
2136
|
return response;
|
|
1827
2137
|
}
|
|
1828
2138
|
|
|
1829
2139
|
/**
|
|
1830
|
-
* @param {
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
2140
|
+
* @param {PaymentPlatformApplicationValidator.SaveBrandPaymentGatewayConfigParam} arg
|
|
2141
|
+
* - Arg object
|
|
2142
|
+
*
|
|
2143
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2144
|
+
* @returns {Promise<PaymentPlatformModel.PaymentGatewayToBeReviewed>} -
|
|
2145
|
+
* Success response
|
|
2146
|
+
* @name saveBrandPaymentGatewayConfig
|
|
1833
2147
|
* @summary: Save Config Secret For Brand Payment Gateway
|
|
1834
|
-
* @description: Save Config Secret For Brand Payment Gateway
|
|
2148
|
+
* @description: Save Config Secret For Brand Payment Gateway - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/saveBrandPaymentGatewayConfig/).
|
|
1835
2149
|
*/
|
|
1836
|
-
async saveBrandPaymentGatewayConfig(
|
|
1837
|
-
|
|
2150
|
+
async saveBrandPaymentGatewayConfig(
|
|
2151
|
+
{ body } = {},
|
|
2152
|
+
{ headers } = { headers: false }
|
|
2153
|
+
) {
|
|
2154
|
+
const {
|
|
2155
|
+
error,
|
|
2156
|
+
} = PaymentPlatformApplicationValidator.saveBrandPaymentGatewayConfig().validate(
|
|
1838
2157
|
{
|
|
1839
2158
|
body,
|
|
1840
2159
|
},
|
|
@@ -1847,7 +2166,7 @@ class Payment {
|
|
|
1847
2166
|
// Showing warrnings if extra unknown parameters are found
|
|
1848
2167
|
const {
|
|
1849
2168
|
error: warrning,
|
|
1850
|
-
} =
|
|
2169
|
+
} = PaymentPlatformApplicationValidator.saveBrandPaymentGatewayConfig().validate(
|
|
1851
2170
|
{
|
|
1852
2171
|
body,
|
|
1853
2172
|
},
|
|
@@ -1856,10 +2175,8 @@ class Payment {
|
|
|
1856
2175
|
if (warrning) {
|
|
1857
2176
|
Logger({
|
|
1858
2177
|
level: "WARN",
|
|
1859
|
-
message:
|
|
1860
|
-
"Parameter Validation warrnings for saveBrandPaymentGatewayConfig",
|
|
2178
|
+
message: `Parameter Validation warrnings for platform > Payment > saveBrandPaymentGatewayConfig \n ${warrning}`,
|
|
1861
2179
|
});
|
|
1862
|
-
Logger({ level: "WARN", message: warrning });
|
|
1863
2180
|
}
|
|
1864
2181
|
|
|
1865
2182
|
const query_params = {};
|
|
@@ -1869,37 +2186,47 @@ class Payment {
|
|
|
1869
2186
|
"post",
|
|
1870
2187
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
1871
2188
|
query_params,
|
|
1872
|
-
body
|
|
2189
|
+
body,
|
|
2190
|
+
undefined,
|
|
2191
|
+
{ headers }
|
|
1873
2192
|
);
|
|
1874
2193
|
|
|
2194
|
+
let responseData = response;
|
|
2195
|
+
if (headers) {
|
|
2196
|
+
responseData = response[0];
|
|
2197
|
+
}
|
|
2198
|
+
|
|
1875
2199
|
const {
|
|
1876
2200
|
error: res_error,
|
|
1877
|
-
} =
|
|
1878
|
-
|
|
1879
|
-
allowUnknown: false
|
|
1880
|
-
|
|
2201
|
+
} = PaymentPlatformModel.PaymentGatewayToBeReviewed().validate(
|
|
2202
|
+
responseData,
|
|
2203
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2204
|
+
);
|
|
1881
2205
|
|
|
1882
2206
|
if (res_error) {
|
|
1883
2207
|
Logger({
|
|
1884
2208
|
level: "WARN",
|
|
1885
|
-
message:
|
|
1886
|
-
"Response Validation Warnnings for saveBrandPaymentGatewayConfig",
|
|
2209
|
+
message: `Response Validation Warnnings for platform > Payment > saveBrandPaymentGatewayConfig \n ${res_error}`,
|
|
1887
2210
|
});
|
|
1888
|
-
Logger({ level: "WARN", message: res_error });
|
|
1889
2211
|
}
|
|
1890
2212
|
|
|
1891
2213
|
return response;
|
|
1892
2214
|
}
|
|
1893
2215
|
|
|
1894
2216
|
/**
|
|
1895
|
-
* @param {
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
2217
|
+
* @param {PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam} arg
|
|
2218
|
+
* - Arg object
|
|
2219
|
+
*
|
|
2220
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2221
|
+
* @returns {Promise<PaymentPlatformModel.SetCODOptionResponse>} - Success response
|
|
2222
|
+
* @name setUserCODlimitRoutes
|
|
1898
2223
|
* @summary: Set COD option for user for payment
|
|
1899
|
-
* @description: Use this API to set cod option as true or false for the payment
|
|
2224
|
+
* @description: Use this API to set cod option as true or false for the payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setUserCODlimitRoutes/).
|
|
1900
2225
|
*/
|
|
1901
|
-
async setUserCODlimitRoutes({ body } = {}) {
|
|
1902
|
-
const {
|
|
2226
|
+
async setUserCODlimitRoutes({ body } = {}, { headers } = { headers: false }) {
|
|
2227
|
+
const {
|
|
2228
|
+
error,
|
|
2229
|
+
} = PaymentPlatformApplicationValidator.setUserCODlimitRoutes().validate(
|
|
1903
2230
|
{
|
|
1904
2231
|
body,
|
|
1905
2232
|
},
|
|
@@ -1912,7 +2239,7 @@ class Payment {
|
|
|
1912
2239
|
// Showing warrnings if extra unknown parameters are found
|
|
1913
2240
|
const {
|
|
1914
2241
|
error: warrning,
|
|
1915
|
-
} =
|
|
2242
|
+
} = PaymentPlatformApplicationValidator.setUserCODlimitRoutes().validate(
|
|
1916
2243
|
{
|
|
1917
2244
|
body,
|
|
1918
2245
|
},
|
|
@@ -1921,9 +2248,8 @@ class Payment {
|
|
|
1921
2248
|
if (warrning) {
|
|
1922
2249
|
Logger({
|
|
1923
2250
|
level: "WARN",
|
|
1924
|
-
message:
|
|
2251
|
+
message: `Parameter Validation warrnings for platform > Payment > setUserCODlimitRoutes \n ${warrning}`,
|
|
1925
2252
|
});
|
|
1926
|
-
Logger({ level: "WARN", message: warrning });
|
|
1927
2253
|
}
|
|
1928
2254
|
|
|
1929
2255
|
const query_params = {};
|
|
@@ -1933,12 +2259,19 @@ class Payment {
|
|
|
1933
2259
|
"put",
|
|
1934
2260
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
|
|
1935
2261
|
query_params,
|
|
1936
|
-
body
|
|
2262
|
+
body,
|
|
2263
|
+
undefined,
|
|
2264
|
+
{ headers }
|
|
1937
2265
|
);
|
|
1938
2266
|
|
|
2267
|
+
let responseData = response;
|
|
2268
|
+
if (headers) {
|
|
2269
|
+
responseData = response[0];
|
|
2270
|
+
}
|
|
2271
|
+
|
|
1939
2272
|
const {
|
|
1940
2273
|
error: res_error,
|
|
1941
|
-
} =
|
|
2274
|
+
} = PaymentPlatformModel.SetCODOptionResponse().validate(responseData, {
|
|
1942
2275
|
abortEarly: false,
|
|
1943
2276
|
allowUnknown: false,
|
|
1944
2277
|
});
|
|
@@ -1946,23 +2279,25 @@ class Payment {
|
|
|
1946
2279
|
if (res_error) {
|
|
1947
2280
|
Logger({
|
|
1948
2281
|
level: "WARN",
|
|
1949
|
-
message:
|
|
2282
|
+
message: `Response Validation Warnnings for platform > Payment > setUserCODlimitRoutes \n ${res_error}`,
|
|
1950
2283
|
});
|
|
1951
|
-
Logger({ level: "WARN", message: res_error });
|
|
1952
2284
|
}
|
|
1953
2285
|
|
|
1954
2286
|
return response;
|
|
1955
2287
|
}
|
|
1956
2288
|
|
|
1957
2289
|
/**
|
|
1958
|
-
* @param {
|
|
1959
|
-
* @param {
|
|
1960
|
-
* @returns {Promise<EdcDeviceAddResponse>} - Success response
|
|
2290
|
+
* @param {PaymentPlatformApplicationValidator.UpdateEdcDeviceParam} arg - Arg object
|
|
2291
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2292
|
+
* @returns {Promise<PaymentPlatformModel.EdcDeviceAddResponse>} - Success response
|
|
2293
|
+
* @name updateEdcDevice
|
|
1961
2294
|
* @summary: map new edc device to the terminal
|
|
1962
|
-
* @description: Use this API to map new edc device to the terminal
|
|
2295
|
+
* @description: Use this API to map new edc device to the terminal - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateEdcDevice/).
|
|
1963
2296
|
*/
|
|
1964
|
-
async updateEdcDevice({ body } = {}) {
|
|
1965
|
-
const {
|
|
2297
|
+
async updateEdcDevice({ body } = {}, { headers } = { headers: false }) {
|
|
2298
|
+
const {
|
|
2299
|
+
error,
|
|
2300
|
+
} = PaymentPlatformApplicationValidator.updateEdcDevice().validate(
|
|
1966
2301
|
{
|
|
1967
2302
|
body,
|
|
1968
2303
|
},
|
|
@@ -1973,7 +2308,9 @@ class Payment {
|
|
|
1973
2308
|
}
|
|
1974
2309
|
|
|
1975
2310
|
// Showing warrnings if extra unknown parameters are found
|
|
1976
|
-
const {
|
|
2311
|
+
const {
|
|
2312
|
+
error: warrning,
|
|
2313
|
+
} = PaymentPlatformApplicationValidator.updateEdcDevice().validate(
|
|
1977
2314
|
{
|
|
1978
2315
|
body,
|
|
1979
2316
|
},
|
|
@@ -1982,9 +2319,8 @@ class Payment {
|
|
|
1982
2319
|
if (warrning) {
|
|
1983
2320
|
Logger({
|
|
1984
2321
|
level: "WARN",
|
|
1985
|
-
message:
|
|
2322
|
+
message: `Parameter Validation warrnings for platform > Payment > updateEdcDevice \n ${warrning}`,
|
|
1986
2323
|
});
|
|
1987
|
-
Logger({ level: "WARN", message: warrning });
|
|
1988
2324
|
}
|
|
1989
2325
|
|
|
1990
2326
|
const query_params = {};
|
|
@@ -1994,12 +2330,19 @@ class Payment {
|
|
|
1994
2330
|
"post",
|
|
1995
2331
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device`,
|
|
1996
2332
|
query_params,
|
|
1997
|
-
body
|
|
2333
|
+
body,
|
|
2334
|
+
undefined,
|
|
2335
|
+
{ headers }
|
|
1998
2336
|
);
|
|
1999
2337
|
|
|
2338
|
+
let responseData = response;
|
|
2339
|
+
if (headers) {
|
|
2340
|
+
responseData = response[0];
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2000
2343
|
const {
|
|
2001
2344
|
error: res_error,
|
|
2002
|
-
} =
|
|
2345
|
+
} = PaymentPlatformModel.EdcDeviceAddResponse().validate(responseData, {
|
|
2003
2346
|
abortEarly: false,
|
|
2004
2347
|
allowUnknown: false,
|
|
2005
2348
|
});
|
|
@@ -2007,23 +2350,31 @@ class Payment {
|
|
|
2007
2350
|
if (res_error) {
|
|
2008
2351
|
Logger({
|
|
2009
2352
|
level: "WARN",
|
|
2010
|
-
message:
|
|
2353
|
+
message: `Response Validation Warnnings for platform > Payment > updateEdcDevice \n ${res_error}`,
|
|
2011
2354
|
});
|
|
2012
|
-
Logger({ level: "WARN", message: res_error });
|
|
2013
2355
|
}
|
|
2014
2356
|
|
|
2015
2357
|
return response;
|
|
2016
2358
|
}
|
|
2017
2359
|
|
|
2018
2360
|
/**
|
|
2019
|
-
* @param {
|
|
2020
|
-
*
|
|
2021
|
-
*
|
|
2361
|
+
* @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
|
|
2362
|
+
* - Arg object
|
|
2363
|
+
*
|
|
2364
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2365
|
+
* @returns {Promise<PaymentPlatformModel.ValidateCustomerResponse>} -
|
|
2366
|
+
* Success response
|
|
2367
|
+
* @name verifyCustomerForPayment
|
|
2022
2368
|
* @summary: Validate customer for payment
|
|
2023
|
-
* @description: Use this API to check if the customer is eligible to use credit-line facilities such as Simpl Pay Later and Rupifi.
|
|
2369
|
+
* @description: Use this API to check if the customer is eligible to use credit-line facilities such as Simpl Pay Later and Rupifi. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyCustomerForPayment/).
|
|
2024
2370
|
*/
|
|
2025
|
-
async verifyCustomerForPayment(
|
|
2026
|
-
|
|
2371
|
+
async verifyCustomerForPayment(
|
|
2372
|
+
{ body } = {},
|
|
2373
|
+
{ headers } = { headers: false }
|
|
2374
|
+
) {
|
|
2375
|
+
const {
|
|
2376
|
+
error,
|
|
2377
|
+
} = PaymentPlatformApplicationValidator.verifyCustomerForPayment().validate(
|
|
2027
2378
|
{
|
|
2028
2379
|
body,
|
|
2029
2380
|
},
|
|
@@ -2036,7 +2387,7 @@ class Payment {
|
|
|
2036
2387
|
// Showing warrnings if extra unknown parameters are found
|
|
2037
2388
|
const {
|
|
2038
2389
|
error: warrning,
|
|
2039
|
-
} =
|
|
2390
|
+
} = PaymentPlatformApplicationValidator.verifyCustomerForPayment().validate(
|
|
2040
2391
|
{
|
|
2041
2392
|
body,
|
|
2042
2393
|
},
|
|
@@ -2045,9 +2396,8 @@ class Payment {
|
|
|
2045
2396
|
if (warrning) {
|
|
2046
2397
|
Logger({
|
|
2047
2398
|
level: "WARN",
|
|
2048
|
-
message:
|
|
2399
|
+
message: `Parameter Validation warrnings for platform > Payment > verifyCustomerForPayment \n ${warrning}`,
|
|
2049
2400
|
});
|
|
2050
|
-
Logger({ level: "WARN", message: warrning });
|
|
2051
2401
|
}
|
|
2052
2402
|
|
|
2053
2403
|
const query_params = {};
|
|
@@ -2057,12 +2407,19 @@ class Payment {
|
|
|
2057
2407
|
"post",
|
|
2058
2408
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/customer/validation`,
|
|
2059
2409
|
query_params,
|
|
2060
|
-
body
|
|
2410
|
+
body,
|
|
2411
|
+
undefined,
|
|
2412
|
+
{ headers }
|
|
2061
2413
|
);
|
|
2062
2414
|
|
|
2415
|
+
let responseData = response;
|
|
2416
|
+
if (headers) {
|
|
2417
|
+
responseData = response[0];
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2063
2420
|
const {
|
|
2064
2421
|
error: res_error,
|
|
2065
|
-
} =
|
|
2422
|
+
} = PaymentPlatformModel.ValidateCustomerResponse().validate(responseData, {
|
|
2066
2423
|
abortEarly: false,
|
|
2067
2424
|
allowUnknown: false,
|
|
2068
2425
|
});
|
|
@@ -2070,9 +2427,8 @@ class Payment {
|
|
|
2070
2427
|
if (res_error) {
|
|
2071
2428
|
Logger({
|
|
2072
2429
|
level: "WARN",
|
|
2073
|
-
message:
|
|
2430
|
+
message: `Response Validation Warnnings for platform > Payment > verifyCustomerForPayment \n ${res_error}`,
|
|
2074
2431
|
});
|
|
2075
|
-
Logger({ level: "WARN", message: res_error });
|
|
2076
2432
|
}
|
|
2077
2433
|
|
|
2078
2434
|
return response;
|