@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
- package/sdk/application/Cart/CartApplicationClient.js +60 -1262
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
- package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
- package/sdk/application/Common/CommonApplicationClient.js +5 -90
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
- package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
- package/sdk/application/Content/ContentApplicationClient.js +126 -942
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
- package/sdk/application/Lead/LeadApplicationClient.js +32 -201
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
- package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
- package/sdk/application/Order/OrderApplicationClient.js +86 -555
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
- package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +47 -1817
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
- package/sdk/application/index.d.ts +0 -19
- package/sdk/application/index.js +0 -35
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
- package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
- package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
- package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
- package/sdk/platform/Content/ContentPlatformModel.js +390 -521
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
- package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
- package/sdk/platform/Order/OrderPlatformClient.js +275 -528
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
- package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
- package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
- package/sdk/platform/Share/SharePlatformModel.js +4 -27
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
- package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +19 -793
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
- package/sdk/application/Cart/CartApplicationModel.js +0 -2718
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
- package/sdk/application/Cart/CartApplicationValidator.js +0 -546
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
- package/sdk/application/Content/ContentApplicationModel.js +0 -1640
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
- package/sdk/application/Content/ContentApplicationValidator.js +0 -269
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
- package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
- package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
- package/sdk/application/Order/OrderApplicationModel.js +0 -1669
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
- package/sdk/application/Order/OrderApplicationValidator.js +0 -210
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
1
|
const {
|
|
3
2
|
FDKClientValidationError,
|
|
4
3
|
FDKResponseValidationError,
|
|
5
4
|
} = require("../../common/FDKError");
|
|
5
|
+
|
|
6
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
6
7
|
const constructUrl = require("../constructUrl");
|
|
7
8
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const
|
|
9
|
-
const PaymentApplicationModel = require("./PaymentApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
12
10
|
|
|
13
11
|
class Payment {
|
|
14
12
|
constructor(_conf) {
|
|
@@ -109,10 +107,9 @@ class Payment {
|
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
/**
|
|
112
|
-
* @param {PaymentApplicationValidator.AddBeneficiaryDetailsParam} arg - Arg object.
|
|
113
110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
114
111
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
115
|
-
* @returns {Promise<
|
|
112
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
116
113
|
* @name addBeneficiaryDetails
|
|
117
114
|
* @summary: Add beneficiary for refund
|
|
118
115
|
* @description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/).
|
|
@@ -121,30 +118,6 @@ class Payment {
|
|
|
121
118
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
122
119
|
{ responseHeaders } = { responseHeaders: false }
|
|
123
120
|
) {
|
|
124
|
-
const {
|
|
125
|
-
error,
|
|
126
|
-
} = PaymentApplicationValidator.addBeneficiaryDetails().validate(
|
|
127
|
-
{ body },
|
|
128
|
-
{ abortEarly: false, allowUnknown: true }
|
|
129
|
-
);
|
|
130
|
-
if (error) {
|
|
131
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Showing warrnings if extra unknown parameters are found
|
|
135
|
-
const {
|
|
136
|
-
error: warrning,
|
|
137
|
-
} = PaymentApplicationValidator.addBeneficiaryDetails().validate(
|
|
138
|
-
{ body },
|
|
139
|
-
{ abortEarly: false, allowUnknown: false }
|
|
140
|
-
);
|
|
141
|
-
if (warrning) {
|
|
142
|
-
Logger({
|
|
143
|
-
level: "WARN",
|
|
144
|
-
message: `Parameter Validation warrnings for application > Payment > addBeneficiaryDetails \n ${warrning}`,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
121
|
const query_params = {};
|
|
149
122
|
|
|
150
123
|
const xHeaders = {};
|
|
@@ -167,34 +140,13 @@ class Payment {
|
|
|
167
140
|
responseData = response[0];
|
|
168
141
|
}
|
|
169
142
|
|
|
170
|
-
const {
|
|
171
|
-
error: res_error,
|
|
172
|
-
} = PaymentApplicationModel.RefundAccountDetails().validate(responseData, {
|
|
173
|
-
abortEarly: false,
|
|
174
|
-
allowUnknown: true,
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
if (res_error) {
|
|
178
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
179
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
180
|
-
} else {
|
|
181
|
-
Logger({
|
|
182
|
-
level: "WARN",
|
|
183
|
-
message: `Response Validation Warnings for application > Payment > addBeneficiaryDetails \n ${res_error}`,
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
143
|
return response;
|
|
189
144
|
}
|
|
190
145
|
|
|
191
146
|
/**
|
|
192
|
-
* @param {PaymentApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
|
|
193
|
-
* - Arg object.
|
|
194
|
-
*
|
|
195
147
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
196
148
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
197
|
-
* @returns {Promise<
|
|
149
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
198
150
|
* @name addRefundBankAccountUsingOTP
|
|
199
151
|
* @summary: Add refund account using OTP verification
|
|
200
152
|
* @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/).
|
|
@@ -203,30 +155,6 @@ class Payment {
|
|
|
203
155
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
204
156
|
{ responseHeaders } = { responseHeaders: false }
|
|
205
157
|
) {
|
|
206
|
-
const {
|
|
207
|
-
error,
|
|
208
|
-
} = PaymentApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
209
|
-
{ body },
|
|
210
|
-
{ abortEarly: false, allowUnknown: true }
|
|
211
|
-
);
|
|
212
|
-
if (error) {
|
|
213
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// Showing warrnings if extra unknown parameters are found
|
|
217
|
-
const {
|
|
218
|
-
error: warrning,
|
|
219
|
-
} = PaymentApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
220
|
-
{ body },
|
|
221
|
-
{ abortEarly: false, allowUnknown: false }
|
|
222
|
-
);
|
|
223
|
-
if (warrning) {
|
|
224
|
-
Logger({
|
|
225
|
-
level: "WARN",
|
|
226
|
-
message: `Parameter Validation warrnings for application > Payment > addRefundBankAccountUsingOTP \n ${warrning}`,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
158
|
const query_params = {};
|
|
231
159
|
|
|
232
160
|
const xHeaders = {};
|
|
@@ -249,32 +177,13 @@ class Payment {
|
|
|
249
177
|
responseData = response[0];
|
|
250
178
|
}
|
|
251
179
|
|
|
252
|
-
const {
|
|
253
|
-
error: res_error,
|
|
254
|
-
} = PaymentApplicationModel.RefundAccountDetails().validate(responseData, {
|
|
255
|
-
abortEarly: false,
|
|
256
|
-
allowUnknown: true,
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
if (res_error) {
|
|
260
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
261
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
262
|
-
} else {
|
|
263
|
-
Logger({
|
|
264
|
-
level: "WARN",
|
|
265
|
-
message: `Response Validation Warnings for application > Payment > addRefundBankAccountUsingOTP \n ${res_error}`,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
180
|
return response;
|
|
271
181
|
}
|
|
272
182
|
|
|
273
183
|
/**
|
|
274
|
-
* @param {PaymentApplicationValidator.AttachCardToCustomerParam} arg - Arg object.
|
|
275
184
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
276
185
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
277
|
-
* @returns {Promise<
|
|
186
|
+
* @returns {Promise<AttachCardsResponse>} - Success response
|
|
278
187
|
* @name attachCardToCustomer
|
|
279
188
|
* @summary: Link payment card to customer
|
|
280
189
|
* @description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/).
|
|
@@ -283,30 +192,6 @@ class Payment {
|
|
|
283
192
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
284
193
|
{ responseHeaders } = { responseHeaders: false }
|
|
285
194
|
) {
|
|
286
|
-
const {
|
|
287
|
-
error,
|
|
288
|
-
} = PaymentApplicationValidator.attachCardToCustomer().validate(
|
|
289
|
-
{ body },
|
|
290
|
-
{ abortEarly: false, allowUnknown: true }
|
|
291
|
-
);
|
|
292
|
-
if (error) {
|
|
293
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// Showing warrnings if extra unknown parameters are found
|
|
297
|
-
const {
|
|
298
|
-
error: warrning,
|
|
299
|
-
} = PaymentApplicationValidator.attachCardToCustomer().validate(
|
|
300
|
-
{ body },
|
|
301
|
-
{ abortEarly: false, allowUnknown: false }
|
|
302
|
-
);
|
|
303
|
-
if (warrning) {
|
|
304
|
-
Logger({
|
|
305
|
-
level: "WARN",
|
|
306
|
-
message: `Parameter Validation warrnings for application > Payment > attachCardToCustomer \n ${warrning}`,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
|
|
310
195
|
const query_params = {};
|
|
311
196
|
|
|
312
197
|
const xHeaders = {};
|
|
@@ -329,33 +214,13 @@ class Payment {
|
|
|
329
214
|
responseData = response[0];
|
|
330
215
|
}
|
|
331
216
|
|
|
332
|
-
const {
|
|
333
|
-
error: res_error,
|
|
334
|
-
} = PaymentApplicationModel.AttachCardsDetails().validate(responseData, {
|
|
335
|
-
abortEarly: false,
|
|
336
|
-
allowUnknown: true,
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
if (res_error) {
|
|
340
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
341
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
342
|
-
} else {
|
|
343
|
-
Logger({
|
|
344
|
-
level: "WARN",
|
|
345
|
-
message: `Response Validation Warnings for application > Payment > attachCardToCustomer \n ${res_error}`,
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
217
|
return response;
|
|
351
218
|
}
|
|
352
219
|
|
|
353
220
|
/**
|
|
354
|
-
* @param {PaymentApplicationValidator.CancelPaymentLinkParam} arg - Arg object.
|
|
355
221
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
356
222
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
357
|
-
* @returns {Promise<
|
|
358
|
-
* Success response
|
|
223
|
+
* @returns {Promise<CancelPaymentLinkResponse>} - Success response
|
|
359
224
|
* @name cancelPaymentLink
|
|
360
225
|
* @summary: Cancel payment link
|
|
361
226
|
* @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
|
|
@@ -364,28 +229,6 @@ class Payment {
|
|
|
364
229
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
365
230
|
{ responseHeaders } = { responseHeaders: false }
|
|
366
231
|
) {
|
|
367
|
-
const { error } = PaymentApplicationValidator.cancelPaymentLink().validate(
|
|
368
|
-
{ body },
|
|
369
|
-
{ abortEarly: false, allowUnknown: true }
|
|
370
|
-
);
|
|
371
|
-
if (error) {
|
|
372
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
// Showing warrnings if extra unknown parameters are found
|
|
376
|
-
const {
|
|
377
|
-
error: warrning,
|
|
378
|
-
} = PaymentApplicationValidator.cancelPaymentLink().validate(
|
|
379
|
-
{ body },
|
|
380
|
-
{ abortEarly: false, allowUnknown: false }
|
|
381
|
-
);
|
|
382
|
-
if (warrning) {
|
|
383
|
-
Logger({
|
|
384
|
-
level: "WARN",
|
|
385
|
-
message: `Parameter Validation warrnings for application > Payment > cancelPaymentLink \n ${warrning}`,
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
|
|
389
232
|
const query_params = {};
|
|
390
233
|
|
|
391
234
|
const xHeaders = {};
|
|
@@ -408,33 +251,13 @@ class Payment {
|
|
|
408
251
|
responseData = response[0];
|
|
409
252
|
}
|
|
410
253
|
|
|
411
|
-
const {
|
|
412
|
-
error: res_error,
|
|
413
|
-
} = PaymentApplicationModel.CancelPaymentLinkDetails().validate(
|
|
414
|
-
responseData,
|
|
415
|
-
{ abortEarly: false, allowUnknown: true }
|
|
416
|
-
);
|
|
417
|
-
|
|
418
|
-
if (res_error) {
|
|
419
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
420
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
421
|
-
} else {
|
|
422
|
-
Logger({
|
|
423
|
-
level: "WARN",
|
|
424
|
-
message: `Response Validation Warnings for application > Payment > cancelPaymentLink \n ${res_error}`,
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
254
|
return response;
|
|
430
255
|
}
|
|
431
256
|
|
|
432
257
|
/**
|
|
433
|
-
* @param {PaymentApplicationValidator.CardDetailsParam} arg - Arg object.
|
|
434
258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
435
259
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
436
|
-
* @returns {Promise<
|
|
437
|
-
* Success response
|
|
260
|
+
* @returns {Promise<CardDetailsResponse>} - Success response
|
|
438
261
|
* @name cardDetails
|
|
439
262
|
* @summary: Get card details
|
|
440
263
|
* @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
|
|
@@ -443,26 +266,13 @@ class Payment {
|
|
|
443
266
|
{ cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
444
267
|
{ responseHeaders } = { responseHeaders: false }
|
|
445
268
|
) {
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// Showing warrnings if extra unknown parameters are found
|
|
455
|
-
const {
|
|
456
|
-
error: warrning,
|
|
457
|
-
} = PaymentApplicationValidator.cardDetails().validate(
|
|
458
|
-
{ cardInfo, aggregator },
|
|
459
|
-
{ abortEarly: false, allowUnknown: false }
|
|
460
|
-
);
|
|
461
|
-
if (warrning) {
|
|
462
|
-
Logger({
|
|
463
|
-
level: "WARN",
|
|
464
|
-
message: `Parameter Validation warrnings for application > Payment > cardDetails \n ${warrning}`,
|
|
269
|
+
const errors = validateRequiredParams(arguments[0], ["cardInfo"]);
|
|
270
|
+
if (errors.length > 0) {
|
|
271
|
+
const error = new FDKClientValidationError({
|
|
272
|
+
message: "Missing required field",
|
|
273
|
+
details: errors,
|
|
465
274
|
});
|
|
275
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
466
276
|
}
|
|
467
277
|
|
|
468
278
|
const query_params = {};
|
|
@@ -488,35 +298,13 @@ class Payment {
|
|
|
488
298
|
responseData = response[0];
|
|
489
299
|
}
|
|
490
300
|
|
|
491
|
-
const {
|
|
492
|
-
error: res_error,
|
|
493
|
-
} = PaymentApplicationModel.CardDetailsFetchedDetails().validate(
|
|
494
|
-
responseData,
|
|
495
|
-
{ abortEarly: false, allowUnknown: true }
|
|
496
|
-
);
|
|
497
|
-
|
|
498
|
-
if (res_error) {
|
|
499
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
500
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
501
|
-
} else {
|
|
502
|
-
Logger({
|
|
503
|
-
level: "WARN",
|
|
504
|
-
message: `Response Validation Warnings for application > Payment > cardDetails \n ${res_error}`,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
301
|
return response;
|
|
510
302
|
}
|
|
511
303
|
|
|
512
304
|
/**
|
|
513
|
-
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
|
|
514
|
-
* - Arg object.
|
|
515
|
-
*
|
|
516
305
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
517
306
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
518
|
-
* @returns {Promise<
|
|
519
|
-
* Success response
|
|
307
|
+
* @returns {Promise<PaymentStatusUpdateResponse>} - Success response
|
|
520
308
|
* @name checkAndUpdatePaymentStatus
|
|
521
309
|
* @summary: Update payment status
|
|
522
310
|
* @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/).
|
|
@@ -525,30 +313,6 @@ class Payment {
|
|
|
525
313
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
526
314
|
{ responseHeaders } = { responseHeaders: false }
|
|
527
315
|
) {
|
|
528
|
-
const {
|
|
529
|
-
error,
|
|
530
|
-
} = PaymentApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
531
|
-
{ body },
|
|
532
|
-
{ abortEarly: false, allowUnknown: true }
|
|
533
|
-
);
|
|
534
|
-
if (error) {
|
|
535
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
// Showing warrnings if extra unknown parameters are found
|
|
539
|
-
const {
|
|
540
|
-
error: warrning,
|
|
541
|
-
} = PaymentApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
542
|
-
{ body },
|
|
543
|
-
{ abortEarly: false, allowUnknown: false }
|
|
544
|
-
);
|
|
545
|
-
if (warrning) {
|
|
546
|
-
Logger({
|
|
547
|
-
level: "WARN",
|
|
548
|
-
message: `Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatus \n ${warrning}`,
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
|
|
552
316
|
const query_params = {};
|
|
553
317
|
|
|
554
318
|
const xHeaders = {};
|
|
@@ -571,35 +335,13 @@ class Payment {
|
|
|
571
335
|
responseData = response[0];
|
|
572
336
|
}
|
|
573
337
|
|
|
574
|
-
const {
|
|
575
|
-
error: res_error,
|
|
576
|
-
} = PaymentApplicationModel.PaymentStatusUpdateDetails().validate(
|
|
577
|
-
responseData,
|
|
578
|
-
{ abortEarly: false, allowUnknown: true }
|
|
579
|
-
);
|
|
580
|
-
|
|
581
|
-
if (res_error) {
|
|
582
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
583
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
584
|
-
} else {
|
|
585
|
-
Logger({
|
|
586
|
-
level: "WARN",
|
|
587
|
-
message: `Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatus \n ${res_error}`,
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
338
|
return response;
|
|
593
339
|
}
|
|
594
340
|
|
|
595
341
|
/**
|
|
596
|
-
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusPaymentLinkParam} arg
|
|
597
|
-
* - Arg object.
|
|
598
|
-
*
|
|
599
342
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
600
343
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
601
|
-
* @returns {Promise<
|
|
602
|
-
* Success response
|
|
344
|
+
* @returns {Promise<PaymentStatusUpdateResponse>} - Success response
|
|
603
345
|
* @name checkAndUpdatePaymentStatusPaymentLink
|
|
604
346
|
* @summary: Update payment link status
|
|
605
347
|
* @description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/).
|
|
@@ -608,30 +350,6 @@ class Payment {
|
|
|
608
350
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
609
351
|
{ responseHeaders } = { responseHeaders: false }
|
|
610
352
|
) {
|
|
611
|
-
const {
|
|
612
|
-
error,
|
|
613
|
-
} = PaymentApplicationValidator.checkAndUpdatePaymentStatusPaymentLink().validate(
|
|
614
|
-
{ body },
|
|
615
|
-
{ abortEarly: false, allowUnknown: true }
|
|
616
|
-
);
|
|
617
|
-
if (error) {
|
|
618
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// Showing warrnings if extra unknown parameters are found
|
|
622
|
-
const {
|
|
623
|
-
error: warrning,
|
|
624
|
-
} = PaymentApplicationValidator.checkAndUpdatePaymentStatusPaymentLink().validate(
|
|
625
|
-
{ body },
|
|
626
|
-
{ abortEarly: false, allowUnknown: false }
|
|
627
|
-
);
|
|
628
|
-
if (warrning) {
|
|
629
|
-
Logger({
|
|
630
|
-
level: "WARN",
|
|
631
|
-
message: `Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${warrning}`,
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
|
|
635
353
|
const query_params = {};
|
|
636
354
|
|
|
637
355
|
const xHeaders = {};
|
|
@@ -654,32 +372,13 @@ class Payment {
|
|
|
654
372
|
responseData = response[0];
|
|
655
373
|
}
|
|
656
374
|
|
|
657
|
-
const {
|
|
658
|
-
error: res_error,
|
|
659
|
-
} = PaymentApplicationModel.PaymentStatusUpdateDetails().validate(
|
|
660
|
-
responseData,
|
|
661
|
-
{ abortEarly: false, allowUnknown: true }
|
|
662
|
-
);
|
|
663
|
-
|
|
664
|
-
if (res_error) {
|
|
665
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
666
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
667
|
-
} else {
|
|
668
|
-
Logger({
|
|
669
|
-
level: "WARN",
|
|
670
|
-
message: `Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${res_error}`,
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
375
|
return response;
|
|
676
376
|
}
|
|
677
377
|
|
|
678
378
|
/**
|
|
679
|
-
* @param {PaymentApplicationValidator.CheckCreditParam} arg - Arg object.
|
|
680
379
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
681
380
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
682
|
-
* @returns {Promise<
|
|
381
|
+
* @returns {Promise<CheckCreditResponse>} - Success response
|
|
683
382
|
* @name checkCredit
|
|
684
383
|
* @summary: Verify credit availability and status
|
|
685
384
|
* @description: Check the availability and status of customer credit, providing the status of payment along with registration information and signup URL if the customer is not registered. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/).
|
|
@@ -688,28 +387,6 @@ class Payment {
|
|
|
688
387
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
689
388
|
{ responseHeaders } = { responseHeaders: false }
|
|
690
389
|
) {
|
|
691
|
-
const { error } = PaymentApplicationValidator.checkCredit().validate(
|
|
692
|
-
{ aggregator },
|
|
693
|
-
{ abortEarly: false, allowUnknown: true }
|
|
694
|
-
);
|
|
695
|
-
if (error) {
|
|
696
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// Showing warrnings if extra unknown parameters are found
|
|
700
|
-
const {
|
|
701
|
-
error: warrning,
|
|
702
|
-
} = PaymentApplicationValidator.checkCredit().validate(
|
|
703
|
-
{ aggregator },
|
|
704
|
-
{ abortEarly: false, allowUnknown: false }
|
|
705
|
-
);
|
|
706
|
-
if (warrning) {
|
|
707
|
-
Logger({
|
|
708
|
-
level: "WARN",
|
|
709
|
-
message: `Parameter Validation warrnings for application > Payment > checkCredit \n ${warrning}`,
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
|
|
713
390
|
const query_params = {};
|
|
714
391
|
query_params["aggregator"] = aggregator;
|
|
715
392
|
|
|
@@ -733,35 +410,13 @@ class Payment {
|
|
|
733
410
|
responseData = response[0];
|
|
734
411
|
}
|
|
735
412
|
|
|
736
|
-
const {
|
|
737
|
-
error: res_error,
|
|
738
|
-
} = PaymentApplicationModel.CheckCreditDetails().validate(responseData, {
|
|
739
|
-
abortEarly: false,
|
|
740
|
-
allowUnknown: true,
|
|
741
|
-
});
|
|
742
|
-
|
|
743
|
-
if (res_error) {
|
|
744
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
745
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
746
|
-
} else {
|
|
747
|
-
Logger({
|
|
748
|
-
level: "WARN",
|
|
749
|
-
message: `Response Validation Warnings for application > Payment > checkCredit \n ${res_error}`,
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
413
|
return response;
|
|
755
414
|
}
|
|
756
415
|
|
|
757
416
|
/**
|
|
758
|
-
* @param {PaymentApplicationValidator.CreateOrderHandlerPaymentLinkParam} arg
|
|
759
|
-
* - Arg object.
|
|
760
|
-
*
|
|
761
417
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
762
418
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
763
|
-
* @returns {Promise<
|
|
764
|
-
* Success response
|
|
419
|
+
* @returns {Promise<CreateOrderUserResponse>} - Success response
|
|
765
420
|
* @name createOrderHandlerPaymentLink
|
|
766
421
|
* @summary: Create order for payment via link
|
|
767
422
|
* @description: Initiate the creation of an order handler for processing payments through a link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/).
|
|
@@ -770,30 +425,6 @@ class Payment {
|
|
|
770
425
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
771
426
|
{ responseHeaders } = { responseHeaders: false }
|
|
772
427
|
) {
|
|
773
|
-
const {
|
|
774
|
-
error,
|
|
775
|
-
} = PaymentApplicationValidator.createOrderHandlerPaymentLink().validate(
|
|
776
|
-
{ body },
|
|
777
|
-
{ abortEarly: false, allowUnknown: true }
|
|
778
|
-
);
|
|
779
|
-
if (error) {
|
|
780
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
// Showing warrnings if extra unknown parameters are found
|
|
784
|
-
const {
|
|
785
|
-
error: warrning,
|
|
786
|
-
} = PaymentApplicationValidator.createOrderHandlerPaymentLink().validate(
|
|
787
|
-
{ body },
|
|
788
|
-
{ abortEarly: false, allowUnknown: false }
|
|
789
|
-
);
|
|
790
|
-
if (warrning) {
|
|
791
|
-
Logger({
|
|
792
|
-
level: "WARN",
|
|
793
|
-
message: `Parameter Validation warrnings for application > Payment > createOrderHandlerPaymentLink \n ${warrning}`,
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
|
|
797
428
|
const query_params = {};
|
|
798
429
|
|
|
799
430
|
const xHeaders = {};
|
|
@@ -816,33 +447,13 @@ class Payment {
|
|
|
816
447
|
responseData = response[0];
|
|
817
448
|
}
|
|
818
449
|
|
|
819
|
-
const {
|
|
820
|
-
error: res_error,
|
|
821
|
-
} = PaymentApplicationModel.CreateOrderUserDetails().validate(
|
|
822
|
-
responseData,
|
|
823
|
-
{ abortEarly: false, allowUnknown: true }
|
|
824
|
-
);
|
|
825
|
-
|
|
826
|
-
if (res_error) {
|
|
827
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
828
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
829
|
-
} else {
|
|
830
|
-
Logger({
|
|
831
|
-
level: "WARN",
|
|
832
|
-
message: `Response Validation Warnings for application > Payment > createOrderHandlerPaymentLink \n ${res_error}`,
|
|
833
|
-
});
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
|
|
837
450
|
return response;
|
|
838
451
|
}
|
|
839
452
|
|
|
840
453
|
/**
|
|
841
|
-
* @param {PaymentApplicationValidator.CreatePaymentLinkParam} arg - Arg object.
|
|
842
454
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
843
455
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
844
|
-
* @returns {Promise<
|
|
845
|
-
* Success response
|
|
456
|
+
* @returns {Promise<CreatePaymentLinkResponse>} - Success response
|
|
846
457
|
* @name createPaymentLink
|
|
847
458
|
* @summary: Create payment link
|
|
848
459
|
* @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
|
|
@@ -851,28 +462,6 @@ class Payment {
|
|
|
851
462
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
852
463
|
{ responseHeaders } = { responseHeaders: false }
|
|
853
464
|
) {
|
|
854
|
-
const { error } = PaymentApplicationValidator.createPaymentLink().validate(
|
|
855
|
-
{ body },
|
|
856
|
-
{ abortEarly: false, allowUnknown: true }
|
|
857
|
-
);
|
|
858
|
-
if (error) {
|
|
859
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
// Showing warrnings if extra unknown parameters are found
|
|
863
|
-
const {
|
|
864
|
-
error: warrning,
|
|
865
|
-
} = PaymentApplicationValidator.createPaymentLink().validate(
|
|
866
|
-
{ body },
|
|
867
|
-
{ abortEarly: false, allowUnknown: false }
|
|
868
|
-
);
|
|
869
|
-
if (warrning) {
|
|
870
|
-
Logger({
|
|
871
|
-
level: "WARN",
|
|
872
|
-
message: `Parameter Validation warrnings for application > Payment > createPaymentLink \n ${warrning}`,
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
|
|
876
465
|
const query_params = {};
|
|
877
466
|
|
|
878
467
|
const xHeaders = {};
|
|
@@ -895,32 +484,13 @@ class Payment {
|
|
|
895
484
|
responseData = response[0];
|
|
896
485
|
}
|
|
897
486
|
|
|
898
|
-
const {
|
|
899
|
-
error: res_error,
|
|
900
|
-
} = PaymentApplicationModel.CreatePaymentLinkDetails().validate(
|
|
901
|
-
responseData,
|
|
902
|
-
{ abortEarly: false, allowUnknown: true }
|
|
903
|
-
);
|
|
904
|
-
|
|
905
|
-
if (res_error) {
|
|
906
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
907
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
908
|
-
} else {
|
|
909
|
-
Logger({
|
|
910
|
-
level: "WARN",
|
|
911
|
-
message: `Response Validation Warnings for application > Payment > createPaymentLink \n ${res_error}`,
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
|
|
916
487
|
return response;
|
|
917
488
|
}
|
|
918
489
|
|
|
919
490
|
/**
|
|
920
|
-
* @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object.
|
|
921
491
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
922
492
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
923
|
-
* @returns {Promise<
|
|
493
|
+
* @returns {Promise<PaymentOrderResponse>} - Success response
|
|
924
494
|
* @name createPaymentOrder
|
|
925
495
|
* @summary: Create Order
|
|
926
496
|
* @description: Create an order and payment on the aggregator side. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/).
|
|
@@ -929,28 +499,6 @@ class Payment {
|
|
|
929
499
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
930
500
|
{ responseHeaders } = { responseHeaders: false }
|
|
931
501
|
) {
|
|
932
|
-
const { error } = PaymentApplicationValidator.createPaymentOrder().validate(
|
|
933
|
-
{ body },
|
|
934
|
-
{ abortEarly: false, allowUnknown: true }
|
|
935
|
-
);
|
|
936
|
-
if (error) {
|
|
937
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
// Showing warrnings if extra unknown parameters are found
|
|
941
|
-
const {
|
|
942
|
-
error: warrning,
|
|
943
|
-
} = PaymentApplicationValidator.createPaymentOrder().validate(
|
|
944
|
-
{ body },
|
|
945
|
-
{ abortEarly: false, allowUnknown: false }
|
|
946
|
-
);
|
|
947
|
-
if (warrning) {
|
|
948
|
-
Logger({
|
|
949
|
-
level: "WARN",
|
|
950
|
-
message: `Parameter Validation warrnings for application > Payment > createPaymentOrder \n ${warrning}`,
|
|
951
|
-
});
|
|
952
|
-
}
|
|
953
|
-
|
|
954
502
|
const query_params = {};
|
|
955
503
|
|
|
956
504
|
const xHeaders = {};
|
|
@@ -973,34 +521,13 @@ class Payment {
|
|
|
973
521
|
responseData = response[0];
|
|
974
522
|
}
|
|
975
523
|
|
|
976
|
-
const {
|
|
977
|
-
error: res_error,
|
|
978
|
-
} = PaymentApplicationModel.PaymentOrderDetails().validate(responseData, {
|
|
979
|
-
abortEarly: false,
|
|
980
|
-
allowUnknown: true,
|
|
981
|
-
});
|
|
982
|
-
|
|
983
|
-
if (res_error) {
|
|
984
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
985
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
986
|
-
} else {
|
|
987
|
-
Logger({
|
|
988
|
-
level: "WARN",
|
|
989
|
-
message: `Response Validation Warnings for application > Payment > createPaymentOrder \n ${res_error}`,
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
|
|
994
524
|
return response;
|
|
995
525
|
}
|
|
996
526
|
|
|
997
527
|
/**
|
|
998
|
-
* @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
|
|
999
528
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1000
529
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1001
|
-
* @returns {Promise<
|
|
1002
|
-
* - Success response
|
|
1003
|
-
*
|
|
530
|
+
* @returns {Promise<CustomerCreditSummaryResponse>} - Success response
|
|
1004
531
|
* @name customerCreditSummary
|
|
1005
532
|
* @summary: Credit summary
|
|
1006
533
|
* @description: Get summary of the customer's credit information, including details such as merchant customer reference ID, status, balance, limit, due amount, used amount, due date, days overdue, total due amount, and a repayment URL. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/).
|
|
@@ -1009,30 +536,6 @@ class Payment {
|
|
|
1009
536
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
1010
537
|
{ responseHeaders } = { responseHeaders: false }
|
|
1011
538
|
) {
|
|
1012
|
-
const {
|
|
1013
|
-
error,
|
|
1014
|
-
} = PaymentApplicationValidator.customerCreditSummary().validate(
|
|
1015
|
-
{ aggregator },
|
|
1016
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1017
|
-
);
|
|
1018
|
-
if (error) {
|
|
1019
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1023
|
-
const {
|
|
1024
|
-
error: warrning,
|
|
1025
|
-
} = PaymentApplicationValidator.customerCreditSummary().validate(
|
|
1026
|
-
{ aggregator },
|
|
1027
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1028
|
-
);
|
|
1029
|
-
if (warrning) {
|
|
1030
|
-
Logger({
|
|
1031
|
-
level: "WARN",
|
|
1032
|
-
message: `Parameter Validation warrnings for application > Payment > customerCreditSummary \n ${warrning}`,
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
539
|
const query_params = {};
|
|
1037
540
|
query_params["aggregator"] = aggregator;
|
|
1038
541
|
|
|
@@ -1056,33 +559,13 @@ class Payment {
|
|
|
1056
559
|
responseData = response[0];
|
|
1057
560
|
}
|
|
1058
561
|
|
|
1059
|
-
const {
|
|
1060
|
-
error: res_error,
|
|
1061
|
-
} = PaymentApplicationModel.CustomerCreditSummaryDetails().validate(
|
|
1062
|
-
responseData,
|
|
1063
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1064
|
-
);
|
|
1065
|
-
|
|
1066
|
-
if (res_error) {
|
|
1067
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1068
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1069
|
-
} else {
|
|
1070
|
-
Logger({
|
|
1071
|
-
level: "WARN",
|
|
1072
|
-
message: `Response Validation Warnings for application > Payment > customerCreditSummary \n ${res_error}`,
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
562
|
return response;
|
|
1078
563
|
}
|
|
1079
564
|
|
|
1080
565
|
/**
|
|
1081
|
-
* @param {PaymentApplicationValidator.CustomerOnboardParam} arg - Arg object.
|
|
1082
566
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1083
567
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1084
|
-
* @returns {Promise<
|
|
1085
|
-
* Success response
|
|
568
|
+
* @returns {Promise<CustomerOnboardingResponse>} - Success response
|
|
1086
569
|
* @name customerOnboard
|
|
1087
570
|
* @summary: Onboard customer for payment
|
|
1088
571
|
* @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/).
|
|
@@ -1091,28 +574,6 @@ class Payment {
|
|
|
1091
574
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1092
575
|
{ responseHeaders } = { responseHeaders: false }
|
|
1093
576
|
) {
|
|
1094
|
-
const { error } = PaymentApplicationValidator.customerOnboard().validate(
|
|
1095
|
-
{ body },
|
|
1096
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1097
|
-
);
|
|
1098
|
-
if (error) {
|
|
1099
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1103
|
-
const {
|
|
1104
|
-
error: warrning,
|
|
1105
|
-
} = PaymentApplicationValidator.customerOnboard().validate(
|
|
1106
|
-
{ body },
|
|
1107
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1108
|
-
);
|
|
1109
|
-
if (warrning) {
|
|
1110
|
-
Logger({
|
|
1111
|
-
level: "WARN",
|
|
1112
|
-
message: `Parameter Validation warrnings for application > Payment > customerOnboard \n ${warrning}`,
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
577
|
const query_params = {};
|
|
1117
578
|
|
|
1118
579
|
const xHeaders = {};
|
|
@@ -1135,32 +596,13 @@ class Payment {
|
|
|
1135
596
|
responseData = response[0];
|
|
1136
597
|
}
|
|
1137
598
|
|
|
1138
|
-
const {
|
|
1139
|
-
error: res_error,
|
|
1140
|
-
} = PaymentApplicationModel.CustomerOnboardingDetails().validate(
|
|
1141
|
-
responseData,
|
|
1142
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1143
|
-
);
|
|
1144
|
-
|
|
1145
|
-
if (res_error) {
|
|
1146
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1147
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1148
|
-
} else {
|
|
1149
|
-
Logger({
|
|
1150
|
-
level: "WARN",
|
|
1151
|
-
message: `Response Validation Warnings for application > Payment > customerOnboard \n ${res_error}`,
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
599
|
return response;
|
|
1157
600
|
}
|
|
1158
601
|
|
|
1159
602
|
/**
|
|
1160
|
-
* @param {PaymentApplicationValidator.DeleteUserCardParam} arg - Arg object.
|
|
1161
603
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1162
604
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1163
|
-
* @returns {Promise<
|
|
605
|
+
* @returns {Promise<DeleteCardsResponse>} - Success response
|
|
1164
606
|
* @name deleteUserCard
|
|
1165
607
|
* @summary: Delete customer card
|
|
1166
608
|
* @description: Delete payment card from the user's account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
|
|
@@ -1169,28 +611,6 @@ class Payment {
|
|
|
1169
611
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1170
612
|
{ responseHeaders } = { responseHeaders: false }
|
|
1171
613
|
) {
|
|
1172
|
-
const { error } = PaymentApplicationValidator.deleteUserCard().validate(
|
|
1173
|
-
{ body },
|
|
1174
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1175
|
-
);
|
|
1176
|
-
if (error) {
|
|
1177
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1181
|
-
const {
|
|
1182
|
-
error: warrning,
|
|
1183
|
-
} = PaymentApplicationValidator.deleteUserCard().validate(
|
|
1184
|
-
{ body },
|
|
1185
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1186
|
-
);
|
|
1187
|
-
if (warrning) {
|
|
1188
|
-
Logger({
|
|
1189
|
-
level: "WARN",
|
|
1190
|
-
message: `Parameter Validation warrnings for application > Payment > deleteUserCard \n ${warrning}`,
|
|
1191
|
-
});
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
614
|
const query_params = {};
|
|
1195
615
|
|
|
1196
616
|
const xHeaders = {};
|
|
@@ -1213,32 +633,13 @@ class Payment {
|
|
|
1213
633
|
responseData = response[0];
|
|
1214
634
|
}
|
|
1215
635
|
|
|
1216
|
-
const {
|
|
1217
|
-
error: res_error,
|
|
1218
|
-
} = PaymentApplicationModel.DeleteCardsDetails().validate(responseData, {
|
|
1219
|
-
abortEarly: false,
|
|
1220
|
-
allowUnknown: true,
|
|
1221
|
-
});
|
|
1222
|
-
|
|
1223
|
-
if (res_error) {
|
|
1224
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1225
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1226
|
-
} else {
|
|
1227
|
-
Logger({
|
|
1228
|
-
level: "WARN",
|
|
1229
|
-
message: `Response Validation Warnings for application > Payment > deleteUserCard \n ${res_error}`,
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
636
|
return response;
|
|
1235
637
|
}
|
|
1236
638
|
|
|
1237
639
|
/**
|
|
1238
|
-
* @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object.
|
|
1239
640
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1240
641
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1241
|
-
* @returns {Promise<
|
|
642
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
1242
643
|
* @name delinkWallet
|
|
1243
644
|
* @summary: Delink the wallet
|
|
1244
645
|
* @description: Delink the wallet. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/).
|
|
@@ -1247,28 +648,6 @@ class Payment {
|
|
|
1247
648
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1248
649
|
{ responseHeaders } = { responseHeaders: false }
|
|
1249
650
|
) {
|
|
1250
|
-
const { error } = PaymentApplicationValidator.delinkWallet().validate(
|
|
1251
|
-
{ body },
|
|
1252
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1253
|
-
);
|
|
1254
|
-
if (error) {
|
|
1255
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1259
|
-
const {
|
|
1260
|
-
error: warrning,
|
|
1261
|
-
} = PaymentApplicationValidator.delinkWallet().validate(
|
|
1262
|
-
{ body },
|
|
1263
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1264
|
-
);
|
|
1265
|
-
if (warrning) {
|
|
1266
|
-
Logger({
|
|
1267
|
-
level: "WARN",
|
|
1268
|
-
message: `Parameter Validation warrnings for application > Payment > delinkWallet \n ${warrning}`,
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
651
|
const query_params = {};
|
|
1273
652
|
|
|
1274
653
|
const xHeaders = {};
|
|
@@ -1291,36 +670,13 @@ class Payment {
|
|
|
1291
670
|
responseData = response[0];
|
|
1292
671
|
}
|
|
1293
672
|
|
|
1294
|
-
const {
|
|
1295
|
-
error: res_error,
|
|
1296
|
-
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
1297
|
-
abortEarly: false,
|
|
1298
|
-
allowUnknown: true,
|
|
1299
|
-
});
|
|
1300
|
-
|
|
1301
|
-
if (res_error) {
|
|
1302
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1303
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1304
|
-
} else {
|
|
1305
|
-
Logger({
|
|
1306
|
-
level: "WARN",
|
|
1307
|
-
message: `Response Validation Warnings for application > Payment > delinkWallet \n ${res_error}`,
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
673
|
return response;
|
|
1313
674
|
}
|
|
1314
675
|
|
|
1315
676
|
/**
|
|
1316
|
-
* @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
|
|
1317
|
-
* - Arg object.
|
|
1318
|
-
*
|
|
1319
677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1320
678
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1321
|
-
* @returns {Promise<
|
|
1322
|
-
* - Success response
|
|
1323
|
-
*
|
|
679
|
+
* @returns {Promise<UpdateRefundTransferModeResponse>} - Success response
|
|
1324
680
|
* @name enableOrDisableRefundTransferMode
|
|
1325
681
|
* @summary: Toggle refund mode
|
|
1326
682
|
* @description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/).
|
|
@@ -1329,30 +685,6 @@ class Payment {
|
|
|
1329
685
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1330
686
|
{ responseHeaders } = { responseHeaders: false }
|
|
1331
687
|
) {
|
|
1332
|
-
const {
|
|
1333
|
-
error,
|
|
1334
|
-
} = PaymentApplicationValidator.enableOrDisableRefundTransferMode().validate(
|
|
1335
|
-
{ body },
|
|
1336
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1337
|
-
);
|
|
1338
|
-
if (error) {
|
|
1339
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1343
|
-
const {
|
|
1344
|
-
error: warrning,
|
|
1345
|
-
} = PaymentApplicationValidator.enableOrDisableRefundTransferMode().validate(
|
|
1346
|
-
{ body },
|
|
1347
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1348
|
-
);
|
|
1349
|
-
if (warrning) {
|
|
1350
|
-
Logger({
|
|
1351
|
-
level: "WARN",
|
|
1352
|
-
message: `Parameter Validation warrnings for application > Payment > enableOrDisableRefundTransferMode \n ${warrning}`,
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
688
|
const query_params = {};
|
|
1357
689
|
|
|
1358
690
|
const xHeaders = {};
|
|
@@ -1375,34 +707,13 @@ class Payment {
|
|
|
1375
707
|
responseData = response[0];
|
|
1376
708
|
}
|
|
1377
709
|
|
|
1378
|
-
const {
|
|
1379
|
-
error: res_error,
|
|
1380
|
-
} = PaymentApplicationModel.RefundTransferModeUpdateDetails().validate(
|
|
1381
|
-
responseData,
|
|
1382
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1383
|
-
);
|
|
1384
|
-
|
|
1385
|
-
if (res_error) {
|
|
1386
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1387
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1388
|
-
} else {
|
|
1389
|
-
Logger({
|
|
1390
|
-
level: "WARN",
|
|
1391
|
-
message: `Response Validation Warnings for application > Payment > enableOrDisableRefundTransferMode \n ${res_error}`,
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
710
|
return response;
|
|
1397
711
|
}
|
|
1398
712
|
|
|
1399
713
|
/**
|
|
1400
|
-
* @param {PaymentApplicationValidator.GetActiveCardAggregatorParam} arg - Arg object.
|
|
1401
714
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1402
715
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1403
|
-
* @returns {Promise<
|
|
1404
|
-
* - Success response
|
|
1405
|
-
*
|
|
716
|
+
* @returns {Promise<ActiveCardPaymentGatewayResponse>} - Success response
|
|
1406
717
|
* @name getActiveCardAggregator
|
|
1407
718
|
* @summary: Retrieve active card aggregator
|
|
1408
719
|
* @description: Get details about the active card aggregator used by the user, including the aggregator name.You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/).
|
|
@@ -1411,30 +722,6 @@ class Payment {
|
|
|
1411
722
|
{ refresh, requestHeaders } = { requestHeaders: {} },
|
|
1412
723
|
{ responseHeaders } = { responseHeaders: false }
|
|
1413
724
|
) {
|
|
1414
|
-
const {
|
|
1415
|
-
error,
|
|
1416
|
-
} = PaymentApplicationValidator.getActiveCardAggregator().validate(
|
|
1417
|
-
{ refresh },
|
|
1418
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1419
|
-
);
|
|
1420
|
-
if (error) {
|
|
1421
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1425
|
-
const {
|
|
1426
|
-
error: warrning,
|
|
1427
|
-
} = PaymentApplicationValidator.getActiveCardAggregator().validate(
|
|
1428
|
-
{ refresh },
|
|
1429
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1430
|
-
);
|
|
1431
|
-
if (warrning) {
|
|
1432
|
-
Logger({
|
|
1433
|
-
level: "WARN",
|
|
1434
|
-
message: `Parameter Validation warrnings for application > Payment > getActiveCardAggregator \n ${warrning}`,
|
|
1435
|
-
});
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
725
|
const query_params = {};
|
|
1439
726
|
query_params["refresh"] = refresh;
|
|
1440
727
|
|
|
@@ -1458,35 +745,13 @@ class Payment {
|
|
|
1458
745
|
responseData = response[0];
|
|
1459
746
|
}
|
|
1460
747
|
|
|
1461
|
-
const {
|
|
1462
|
-
error: res_error,
|
|
1463
|
-
} = PaymentApplicationModel.ActiveCardPaymentGatewayDetails().validate(
|
|
1464
|
-
responseData,
|
|
1465
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1466
|
-
);
|
|
1467
|
-
|
|
1468
|
-
if (res_error) {
|
|
1469
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1470
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1471
|
-
} else {
|
|
1472
|
-
Logger({
|
|
1473
|
-
level: "WARN",
|
|
1474
|
-
message: `Response Validation Warnings for application > Payment > getActiveCardAggregator \n ${res_error}`,
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
748
|
return response;
|
|
1480
749
|
}
|
|
1481
750
|
|
|
1482
751
|
/**
|
|
1483
|
-
* @param {PaymentApplicationValidator.GetActiveRefundTransferModesParam} arg
|
|
1484
|
-
* - Arg object.
|
|
1485
|
-
*
|
|
1486
752
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1487
753
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1488
|
-
* @returns {Promise<
|
|
1489
|
-
* Success response
|
|
754
|
+
* @returns {Promise<TransferModeResponse>} - Success response
|
|
1490
755
|
* @name getActiveRefundTransferModes
|
|
1491
756
|
* @summary: Get refund transfer modes
|
|
1492
757
|
* @description: Lists available refund modes, such as UPI, providing details like display name, logo, and ID for each mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/).
|
|
@@ -1495,30 +760,6 @@ class Payment {
|
|
|
1495
760
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1496
761
|
{ responseHeaders } = { responseHeaders: false }
|
|
1497
762
|
) {
|
|
1498
|
-
const {
|
|
1499
|
-
error,
|
|
1500
|
-
} = PaymentApplicationValidator.getActiveRefundTransferModes().validate(
|
|
1501
|
-
{},
|
|
1502
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1503
|
-
);
|
|
1504
|
-
if (error) {
|
|
1505
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1509
|
-
const {
|
|
1510
|
-
error: warrning,
|
|
1511
|
-
} = PaymentApplicationValidator.getActiveRefundTransferModes().validate(
|
|
1512
|
-
{},
|
|
1513
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1514
|
-
);
|
|
1515
|
-
if (warrning) {
|
|
1516
|
-
Logger({
|
|
1517
|
-
level: "WARN",
|
|
1518
|
-
message: `Parameter Validation warrnings for application > Payment > getActiveRefundTransferModes \n ${warrning}`,
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
763
|
const query_params = {};
|
|
1523
764
|
|
|
1524
765
|
const xHeaders = {};
|
|
@@ -1541,32 +782,13 @@ class Payment {
|
|
|
1541
782
|
responseData = response[0];
|
|
1542
783
|
}
|
|
1543
784
|
|
|
1544
|
-
const {
|
|
1545
|
-
error: res_error,
|
|
1546
|
-
} = PaymentApplicationModel.TransferModeFetchDetails().validate(
|
|
1547
|
-
responseData,
|
|
1548
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1549
|
-
);
|
|
1550
|
-
|
|
1551
|
-
if (res_error) {
|
|
1552
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1553
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1554
|
-
} else {
|
|
1555
|
-
Logger({
|
|
1556
|
-
level: "WARN",
|
|
1557
|
-
message: `Response Validation Warnings for application > Payment > getActiveRefundTransferModes \n ${res_error}`,
|
|
1558
|
-
});
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
785
|
return response;
|
|
1563
786
|
}
|
|
1564
787
|
|
|
1565
788
|
/**
|
|
1566
|
-
* @param {PaymentApplicationValidator.GetActiveUserCardsParam} arg - Arg object.
|
|
1567
789
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1568
790
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1569
|
-
* @returns {Promise<
|
|
791
|
+
* @returns {Promise<ListCardsResponse>} - Success response
|
|
1570
792
|
* @name getActiveUserCards
|
|
1571
793
|
* @summary: Get customer cards
|
|
1572
794
|
* @description: List all active cards saved by the user.Includes details such as the card's aggregator name, card ID, token, reference, number, expiration date, type, issuer, brand, nickname, and whether it has expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/).
|
|
@@ -1575,28 +797,6 @@ class Payment {
|
|
|
1575
797
|
{ forceRefresh, requestHeaders } = { requestHeaders: {} },
|
|
1576
798
|
{ responseHeaders } = { responseHeaders: false }
|
|
1577
799
|
) {
|
|
1578
|
-
const { error } = PaymentApplicationValidator.getActiveUserCards().validate(
|
|
1579
|
-
{ forceRefresh },
|
|
1580
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1581
|
-
);
|
|
1582
|
-
if (error) {
|
|
1583
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1587
|
-
const {
|
|
1588
|
-
error: warrning,
|
|
1589
|
-
} = PaymentApplicationValidator.getActiveUserCards().validate(
|
|
1590
|
-
{ forceRefresh },
|
|
1591
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1592
|
-
);
|
|
1593
|
-
if (warrning) {
|
|
1594
|
-
Logger({
|
|
1595
|
-
level: "WARN",
|
|
1596
|
-
message: `Parameter Validation warrnings for application > Payment > getActiveUserCards \n ${warrning}`,
|
|
1597
|
-
});
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
800
|
const query_params = {};
|
|
1601
801
|
query_params["force_refresh"] = forceRefresh;
|
|
1602
802
|
|
|
@@ -1620,33 +820,13 @@ class Payment {
|
|
|
1620
820
|
responseData = response[0];
|
|
1621
821
|
}
|
|
1622
822
|
|
|
1623
|
-
const {
|
|
1624
|
-
error: res_error,
|
|
1625
|
-
} = PaymentApplicationModel.ListCardsDetails().validate(responseData, {
|
|
1626
|
-
abortEarly: false,
|
|
1627
|
-
allowUnknown: true,
|
|
1628
|
-
});
|
|
1629
|
-
|
|
1630
|
-
if (res_error) {
|
|
1631
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1632
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1633
|
-
} else {
|
|
1634
|
-
Logger({
|
|
1635
|
-
level: "WARN",
|
|
1636
|
-
message: `Response Validation Warnings for application > Payment > getActiveUserCards \n ${res_error}`,
|
|
1637
|
-
});
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
823
|
return response;
|
|
1642
824
|
}
|
|
1643
825
|
|
|
1644
826
|
/**
|
|
1645
|
-
* @param {PaymentApplicationValidator.GetAggregatorsConfigParam} arg - Arg object.
|
|
1646
827
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1647
828
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1648
|
-
* @returns {Promise<
|
|
1649
|
-
* Success response
|
|
829
|
+
* @returns {Promise<AggregatorsConfigDetailResponse>} - Success response
|
|
1650
830
|
* @name getAggregatorsConfig
|
|
1651
831
|
* @summary: Get payment aggregators
|
|
1652
832
|
* @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
|
|
@@ -1655,30 +835,6 @@ class Payment {
|
|
|
1655
835
|
{ xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
|
|
1656
836
|
{ responseHeaders } = { responseHeaders: false }
|
|
1657
837
|
) {
|
|
1658
|
-
const {
|
|
1659
|
-
error,
|
|
1660
|
-
} = PaymentApplicationValidator.getAggregatorsConfig().validate(
|
|
1661
|
-
{ xApiToken, refresh },
|
|
1662
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1663
|
-
);
|
|
1664
|
-
if (error) {
|
|
1665
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1669
|
-
const {
|
|
1670
|
-
error: warrning,
|
|
1671
|
-
} = PaymentApplicationValidator.getAggregatorsConfig().validate(
|
|
1672
|
-
{ xApiToken, refresh },
|
|
1673
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1674
|
-
);
|
|
1675
|
-
if (warrning) {
|
|
1676
|
-
Logger({
|
|
1677
|
-
level: "WARN",
|
|
1678
|
-
message: `Parameter Validation warrnings for application > Payment > getAggregatorsConfig \n ${warrning}`,
|
|
1679
|
-
});
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
838
|
const query_params = {};
|
|
1683
839
|
query_params["refresh"] = refresh;
|
|
1684
840
|
|
|
@@ -1703,35 +859,13 @@ class Payment {
|
|
|
1703
859
|
responseData = response[0];
|
|
1704
860
|
}
|
|
1705
861
|
|
|
1706
|
-
const {
|
|
1707
|
-
error: res_error,
|
|
1708
|
-
} = PaymentApplicationModel.AggregatorsConfigDetail().validate(
|
|
1709
|
-
responseData,
|
|
1710
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1711
|
-
);
|
|
1712
|
-
|
|
1713
|
-
if (res_error) {
|
|
1714
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1715
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1716
|
-
} else {
|
|
1717
|
-
Logger({
|
|
1718
|
-
level: "WARN",
|
|
1719
|
-
message: `Response Validation Warnings for application > Payment > getAggregatorsConfig \n ${res_error}`,
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
862
|
return response;
|
|
1725
863
|
}
|
|
1726
864
|
|
|
1727
865
|
/**
|
|
1728
|
-
* @param {PaymentApplicationValidator.GetEpaylaterBannerDetailsParam} arg
|
|
1729
|
-
* - Arg object.
|
|
1730
|
-
*
|
|
1731
866
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1732
867
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1733
|
-
* @returns {Promise<
|
|
1734
|
-
* Success response
|
|
868
|
+
* @returns {Promise<EpaylaterBannerResponse>} - Success response
|
|
1735
869
|
* @name getEpaylaterBannerDetails
|
|
1736
870
|
* @summary: Epaylater banner info
|
|
1737
871
|
* @description: Get Epaylater payment banner details. It provides information about the banner's display status, along with relevant messages and the user's registration status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/).
|
|
@@ -1740,30 +874,6 @@ class Payment {
|
|
|
1740
874
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1741
875
|
{ responseHeaders } = { responseHeaders: false }
|
|
1742
876
|
) {
|
|
1743
|
-
const {
|
|
1744
|
-
error,
|
|
1745
|
-
} = PaymentApplicationValidator.getEpaylaterBannerDetails().validate(
|
|
1746
|
-
{},
|
|
1747
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1748
|
-
);
|
|
1749
|
-
if (error) {
|
|
1750
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1754
|
-
const {
|
|
1755
|
-
error: warrning,
|
|
1756
|
-
} = PaymentApplicationValidator.getEpaylaterBannerDetails().validate(
|
|
1757
|
-
{},
|
|
1758
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1759
|
-
);
|
|
1760
|
-
if (warrning) {
|
|
1761
|
-
Logger({
|
|
1762
|
-
level: "WARN",
|
|
1763
|
-
message: `Parameter Validation warrnings for application > Payment > getEpaylaterBannerDetails \n ${warrning}`,
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
877
|
const query_params = {};
|
|
1768
878
|
|
|
1769
879
|
const xHeaders = {};
|
|
@@ -1786,36 +896,13 @@ class Payment {
|
|
|
1786
896
|
responseData = response[0];
|
|
1787
897
|
}
|
|
1788
898
|
|
|
1789
|
-
const {
|
|
1790
|
-
error: res_error,
|
|
1791
|
-
} = PaymentApplicationModel.EpaylaterBannerDetails().validate(
|
|
1792
|
-
responseData,
|
|
1793
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1794
|
-
);
|
|
1795
|
-
|
|
1796
|
-
if (res_error) {
|
|
1797
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1798
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1799
|
-
} else {
|
|
1800
|
-
Logger({
|
|
1801
|
-
level: "WARN",
|
|
1802
|
-
message: `Response Validation Warnings for application > Payment > getEpaylaterBannerDetails \n ${res_error}`,
|
|
1803
|
-
});
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
899
|
return response;
|
|
1808
900
|
}
|
|
1809
901
|
|
|
1810
902
|
/**
|
|
1811
|
-
* @param {PaymentApplicationValidator.GetOrderBeneficiariesDetailParam} arg
|
|
1812
|
-
* - Arg object.
|
|
1813
|
-
*
|
|
1814
903
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1815
904
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1816
|
-
* @returns {Promise<
|
|
1817
|
-
* - Success response
|
|
1818
|
-
*
|
|
905
|
+
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
1819
906
|
* @name getOrderBeneficiariesDetail
|
|
1820
907
|
* @summary: Retrieve beneficiary details
|
|
1821
908
|
* @description: Get beneficiary details like bank name , ifsc code , branch name associated with a specific order for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getOrderBeneficiariesDetail/).
|
|
@@ -1824,30 +911,6 @@ class Payment {
|
|
|
1824
911
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1825
912
|
{ responseHeaders } = { responseHeaders: false }
|
|
1826
913
|
) {
|
|
1827
|
-
const {
|
|
1828
|
-
error,
|
|
1829
|
-
} = PaymentApplicationValidator.getOrderBeneficiariesDetail().validate(
|
|
1830
|
-
{ orderId },
|
|
1831
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1832
|
-
);
|
|
1833
|
-
if (error) {
|
|
1834
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1838
|
-
const {
|
|
1839
|
-
error: warrning,
|
|
1840
|
-
} = PaymentApplicationValidator.getOrderBeneficiariesDetail().validate(
|
|
1841
|
-
{ orderId },
|
|
1842
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1843
|
-
);
|
|
1844
|
-
if (warrning) {
|
|
1845
|
-
Logger({
|
|
1846
|
-
level: "WARN",
|
|
1847
|
-
message: `Parameter Validation warrnings for application > Payment > getOrderBeneficiariesDetail \n ${warrning}`,
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
914
|
const query_params = {};
|
|
1852
915
|
query_params["order_id"] = orderId;
|
|
1853
916
|
|
|
@@ -1871,33 +934,13 @@ class Payment {
|
|
|
1871
934
|
responseData = response[0];
|
|
1872
935
|
}
|
|
1873
936
|
|
|
1874
|
-
const {
|
|
1875
|
-
error: res_error,
|
|
1876
|
-
} = PaymentApplicationModel.OrderBeneficiaryFetchDetails().validate(
|
|
1877
|
-
responseData,
|
|
1878
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1879
|
-
);
|
|
1880
|
-
|
|
1881
|
-
if (res_error) {
|
|
1882
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1883
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1884
|
-
} else {
|
|
1885
|
-
Logger({
|
|
1886
|
-
level: "WARN",
|
|
1887
|
-
message: `Response Validation Warnings for application > Payment > getOrderBeneficiariesDetail \n ${res_error}`,
|
|
1888
|
-
});
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
937
|
return response;
|
|
1893
938
|
}
|
|
1894
939
|
|
|
1895
940
|
/**
|
|
1896
|
-
* @param {PaymentApplicationValidator.GetPaymentLinkParam} arg - Arg object.
|
|
1897
941
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1898
942
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1899
|
-
* @returns {Promise<
|
|
1900
|
-
* Success response
|
|
943
|
+
* @returns {Promise<GetPaymentLinkResponse>} - Success response
|
|
1901
944
|
* @name getPaymentLink
|
|
1902
945
|
* @summary: Get payment link
|
|
1903
946
|
* @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
|
|
@@ -1906,30 +949,8 @@ class Payment {
|
|
|
1906
949
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1907
950
|
{ responseHeaders } = { responseHeaders: false }
|
|
1908
951
|
) {
|
|
1909
|
-
const
|
|
1910
|
-
|
|
1911
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1912
|
-
);
|
|
1913
|
-
if (error) {
|
|
1914
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1918
|
-
const {
|
|
1919
|
-
error: warrning,
|
|
1920
|
-
} = PaymentApplicationValidator.getPaymentLink().validate(
|
|
1921
|
-
{ paymentLinkId },
|
|
1922
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1923
|
-
);
|
|
1924
|
-
if (warrning) {
|
|
1925
|
-
Logger({
|
|
1926
|
-
level: "WARN",
|
|
1927
|
-
message: `Parameter Validation warrnings for application > Payment > getPaymentLink \n ${warrning}`,
|
|
1928
|
-
});
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
const query_params = {};
|
|
1932
|
-
query_params["payment_link_id"] = paymentLinkId;
|
|
952
|
+
const query_params = {};
|
|
953
|
+
query_params["payment_link_id"] = paymentLinkId;
|
|
1933
954
|
|
|
1934
955
|
const xHeaders = {};
|
|
1935
956
|
|
|
@@ -1951,33 +972,13 @@ class Payment {
|
|
|
1951
972
|
responseData = response[0];
|
|
1952
973
|
}
|
|
1953
974
|
|
|
1954
|
-
const {
|
|
1955
|
-
error: res_error,
|
|
1956
|
-
} = PaymentApplicationModel.GetPaymentLinkDetails().validate(responseData, {
|
|
1957
|
-
abortEarly: false,
|
|
1958
|
-
allowUnknown: true,
|
|
1959
|
-
});
|
|
1960
|
-
|
|
1961
|
-
if (res_error) {
|
|
1962
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1963
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1964
|
-
} else {
|
|
1965
|
-
Logger({
|
|
1966
|
-
level: "WARN",
|
|
1967
|
-
message: `Response Validation Warnings for application > Payment > getPaymentLink \n ${res_error}`,
|
|
1968
|
-
});
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
975
|
return response;
|
|
1973
976
|
}
|
|
1974
977
|
|
|
1975
978
|
/**
|
|
1976
|
-
* @param {PaymentApplicationValidator.GetPaymentModeRoutesParam} arg - Arg object.
|
|
1977
979
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1978
980
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1979
|
-
* @returns {Promise<
|
|
1980
|
-
* Success response
|
|
981
|
+
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
1981
982
|
* @name getPaymentModeRoutes
|
|
1982
983
|
* @summary: Get payment modes
|
|
1983
984
|
* @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/).
|
|
@@ -1998,52 +999,6 @@ class Payment {
|
|
|
1998
999
|
} = { requestHeaders: {} },
|
|
1999
1000
|
{ responseHeaders } = { responseHeaders: false }
|
|
2000
1001
|
) {
|
|
2001
|
-
const {
|
|
2002
|
-
error,
|
|
2003
|
-
} = PaymentApplicationValidator.getPaymentModeRoutes().validate(
|
|
2004
|
-
{
|
|
2005
|
-
amount,
|
|
2006
|
-
cartId,
|
|
2007
|
-
checkoutMode,
|
|
2008
|
-
refresh,
|
|
2009
|
-
orderId,
|
|
2010
|
-
cardReference,
|
|
2011
|
-
userDetails,
|
|
2012
|
-
displaySplit,
|
|
2013
|
-
advancePayment,
|
|
2014
|
-
shipmentId,
|
|
2015
|
-
},
|
|
2016
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2017
|
-
);
|
|
2018
|
-
if (error) {
|
|
2019
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2023
|
-
const {
|
|
2024
|
-
error: warrning,
|
|
2025
|
-
} = PaymentApplicationValidator.getPaymentModeRoutes().validate(
|
|
2026
|
-
{
|
|
2027
|
-
amount,
|
|
2028
|
-
cartId,
|
|
2029
|
-
checkoutMode,
|
|
2030
|
-
refresh,
|
|
2031
|
-
orderId,
|
|
2032
|
-
cardReference,
|
|
2033
|
-
userDetails,
|
|
2034
|
-
displaySplit,
|
|
2035
|
-
advancePayment,
|
|
2036
|
-
shipmentId,
|
|
2037
|
-
},
|
|
2038
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2039
|
-
);
|
|
2040
|
-
if (warrning) {
|
|
2041
|
-
Logger({
|
|
2042
|
-
level: "WARN",
|
|
2043
|
-
message: `Parameter Validation warrnings for application > Payment > getPaymentModeRoutes \n ${warrning}`,
|
|
2044
|
-
});
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
1002
|
const query_params = {};
|
|
2048
1003
|
query_params["amount"] = amount;
|
|
2049
1004
|
query_params["cart_id"] = cartId;
|
|
@@ -2076,35 +1031,13 @@ class Payment {
|
|
|
2076
1031
|
responseData = response[0];
|
|
2077
1032
|
}
|
|
2078
1033
|
|
|
2079
|
-
const {
|
|
2080
|
-
error: res_error,
|
|
2081
|
-
} = PaymentApplicationModel.PaymentModeRouteDetails().validate(
|
|
2082
|
-
responseData,
|
|
2083
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2084
|
-
);
|
|
2085
|
-
|
|
2086
|
-
if (res_error) {
|
|
2087
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2088
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2089
|
-
} else {
|
|
2090
|
-
Logger({
|
|
2091
|
-
level: "WARN",
|
|
2092
|
-
message: `Response Validation Warnings for application > Payment > getPaymentModeRoutes \n ${res_error}`,
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
1034
|
return response;
|
|
2098
1035
|
}
|
|
2099
1036
|
|
|
2100
1037
|
/**
|
|
2101
|
-
* @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg
|
|
2102
|
-
* - Arg object.
|
|
2103
|
-
*
|
|
2104
1038
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2105
1039
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2106
|
-
* @returns {Promise<
|
|
2107
|
-
* Success response
|
|
1040
|
+
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
2108
1041
|
* @name getPaymentModeRoutesPaymentLink
|
|
2109
1042
|
* @summary: Payment modes for payment link
|
|
2110
1043
|
* @description: List payment modes available for a given payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/).
|
|
@@ -2113,30 +1046,6 @@ class Payment {
|
|
|
2113
1046
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2114
1047
|
{ responseHeaders } = { responseHeaders: false }
|
|
2115
1048
|
) {
|
|
2116
|
-
const {
|
|
2117
|
-
error,
|
|
2118
|
-
} = PaymentApplicationValidator.getPaymentModeRoutesPaymentLink().validate(
|
|
2119
|
-
{ paymentLinkId },
|
|
2120
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2121
|
-
);
|
|
2122
|
-
if (error) {
|
|
2123
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2127
|
-
const {
|
|
2128
|
-
error: warrning,
|
|
2129
|
-
} = PaymentApplicationValidator.getPaymentModeRoutesPaymentLink().validate(
|
|
2130
|
-
{ paymentLinkId },
|
|
2131
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2132
|
-
);
|
|
2133
|
-
if (warrning) {
|
|
2134
|
-
Logger({
|
|
2135
|
-
level: "WARN",
|
|
2136
|
-
message: `Parameter Validation warrnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${warrning}`,
|
|
2137
|
-
});
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
1049
|
const query_params = {};
|
|
2141
1050
|
query_params["payment_link_id"] = paymentLinkId;
|
|
2142
1051
|
|
|
@@ -2160,33 +1069,13 @@ class Payment {
|
|
|
2160
1069
|
responseData = response[0];
|
|
2161
1070
|
}
|
|
2162
1071
|
|
|
2163
|
-
const {
|
|
2164
|
-
error: res_error,
|
|
2165
|
-
} = PaymentApplicationModel.PaymentModeRouteDetails().validate(
|
|
2166
|
-
responseData,
|
|
2167
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2168
|
-
);
|
|
2169
|
-
|
|
2170
|
-
if (res_error) {
|
|
2171
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2172
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2173
|
-
} else {
|
|
2174
|
-
Logger({
|
|
2175
|
-
level: "WARN",
|
|
2176
|
-
message: `Response Validation Warnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${res_error}`,
|
|
2177
|
-
});
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
1072
|
return response;
|
|
2182
1073
|
}
|
|
2183
1074
|
|
|
2184
1075
|
/**
|
|
2185
|
-
* @param {PaymentApplicationValidator.GetPosPaymentModeRoutesParam} arg - Arg object.
|
|
2186
1076
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2187
1077
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2188
|
-
* @returns {Promise<
|
|
2189
|
-
* Success response
|
|
1078
|
+
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
2190
1079
|
* @name getPosPaymentModeRoutes
|
|
2191
1080
|
* @summary: POS payment modes
|
|
2192
1081
|
* @description: Get available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/).
|
|
@@ -2205,48 +1094,6 @@ class Payment {
|
|
|
2205
1094
|
} = { requestHeaders: {} },
|
|
2206
1095
|
{ responseHeaders } = { responseHeaders: false }
|
|
2207
1096
|
) {
|
|
2208
|
-
const {
|
|
2209
|
-
error,
|
|
2210
|
-
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
2211
|
-
{
|
|
2212
|
-
amount,
|
|
2213
|
-
pincode,
|
|
2214
|
-
orderType,
|
|
2215
|
-
cartId,
|
|
2216
|
-
checkoutMode,
|
|
2217
|
-
refresh,
|
|
2218
|
-
cardReference,
|
|
2219
|
-
userDetails,
|
|
2220
|
-
},
|
|
2221
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2222
|
-
);
|
|
2223
|
-
if (error) {
|
|
2224
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2225
|
-
}
|
|
2226
|
-
|
|
2227
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2228
|
-
const {
|
|
2229
|
-
error: warrning,
|
|
2230
|
-
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
2231
|
-
{
|
|
2232
|
-
amount,
|
|
2233
|
-
pincode,
|
|
2234
|
-
orderType,
|
|
2235
|
-
cartId,
|
|
2236
|
-
checkoutMode,
|
|
2237
|
-
refresh,
|
|
2238
|
-
cardReference,
|
|
2239
|
-
userDetails,
|
|
2240
|
-
},
|
|
2241
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2242
|
-
);
|
|
2243
|
-
if (warrning) {
|
|
2244
|
-
Logger({
|
|
2245
|
-
level: "WARN",
|
|
2246
|
-
message: `Parameter Validation warrnings for application > Payment > getPosPaymentModeRoutes \n ${warrning}`,
|
|
2247
|
-
});
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
1097
|
const query_params = {};
|
|
2251
1098
|
query_params["amount"] = amount;
|
|
2252
1099
|
query_params["cart_id"] = cartId;
|
|
@@ -2277,32 +1124,13 @@ class Payment {
|
|
|
2277
1124
|
responseData = response[0];
|
|
2278
1125
|
}
|
|
2279
1126
|
|
|
2280
|
-
const {
|
|
2281
|
-
error: res_error,
|
|
2282
|
-
} = PaymentApplicationModel.PaymentModeRouteDetails().validate(
|
|
2283
|
-
responseData,
|
|
2284
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2285
|
-
);
|
|
2286
|
-
|
|
2287
|
-
if (res_error) {
|
|
2288
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2289
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2290
|
-
} else {
|
|
2291
|
-
Logger({
|
|
2292
|
-
level: "WARN",
|
|
2293
|
-
message: `Response Validation Warnings for application > Payment > getPosPaymentModeRoutes \n ${res_error}`,
|
|
2294
|
-
});
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
1127
|
return response;
|
|
2299
1128
|
}
|
|
2300
1129
|
|
|
2301
1130
|
/**
|
|
2302
|
-
* @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object.
|
|
2303
1131
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2304
1132
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2305
|
-
* @returns {Promise<
|
|
1133
|
+
* @returns {Promise<RupifiBannerResponse>} - Success response
|
|
2306
1134
|
* @name getRupifiBannerDetails
|
|
2307
1135
|
* @summary: Rupifi banner info
|
|
2308
1136
|
* @description: Get Rupifi payment banner details. It provides information such as the KYC URL and the current status of the Rupifi payment banner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/).
|
|
@@ -2311,30 +1139,6 @@ class Payment {
|
|
|
2311
1139
|
{ requestHeaders } = { requestHeaders: {} },
|
|
2312
1140
|
{ responseHeaders } = { responseHeaders: false }
|
|
2313
1141
|
) {
|
|
2314
|
-
const {
|
|
2315
|
-
error,
|
|
2316
|
-
} = PaymentApplicationValidator.getRupifiBannerDetails().validate(
|
|
2317
|
-
{},
|
|
2318
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2319
|
-
);
|
|
2320
|
-
if (error) {
|
|
2321
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2325
|
-
const {
|
|
2326
|
-
error: warrning,
|
|
2327
|
-
} = PaymentApplicationValidator.getRupifiBannerDetails().validate(
|
|
2328
|
-
{},
|
|
2329
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2330
|
-
);
|
|
2331
|
-
if (warrning) {
|
|
2332
|
-
Logger({
|
|
2333
|
-
level: "WARN",
|
|
2334
|
-
message: `Parameter Validation warrnings for application > Payment > getRupifiBannerDetails \n ${warrning}`,
|
|
2335
|
-
});
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
1142
|
const query_params = {};
|
|
2339
1143
|
|
|
2340
1144
|
const xHeaders = {};
|
|
@@ -2357,36 +1161,13 @@ class Payment {
|
|
|
2357
1161
|
responseData = response[0];
|
|
2358
1162
|
}
|
|
2359
1163
|
|
|
2360
|
-
const {
|
|
2361
|
-
error: res_error,
|
|
2362
|
-
} = PaymentApplicationModel.RupifiBannerDetails().validate(responseData, {
|
|
2363
|
-
abortEarly: false,
|
|
2364
|
-
allowUnknown: true,
|
|
2365
|
-
});
|
|
2366
|
-
|
|
2367
|
-
if (res_error) {
|
|
2368
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2369
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2370
|
-
} else {
|
|
2371
|
-
Logger({
|
|
2372
|
-
level: "WARN",
|
|
2373
|
-
message: `Response Validation Warnings for application > Payment > getRupifiBannerDetails \n ${res_error}`,
|
|
2374
|
-
});
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
1164
|
return response;
|
|
2379
1165
|
}
|
|
2380
1166
|
|
|
2381
1167
|
/**
|
|
2382
|
-
* @param {PaymentApplicationValidator.GetUserBeneficiariesDetailParam} arg
|
|
2383
|
-
* - Arg object.
|
|
2384
|
-
*
|
|
2385
1168
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2386
1169
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2387
|
-
* @returns {Promise<
|
|
2388
|
-
* - Success response
|
|
2389
|
-
*
|
|
1170
|
+
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
2390
1171
|
* @name getUserBeneficiariesDetail
|
|
2391
1172
|
* @summary: Retrieve beneficiary details
|
|
2392
1173
|
* @description: Get beneficiaries associated with the user for processing refunds, based on the provided order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getUserBeneficiariesDetail/).
|
|
@@ -2395,30 +1176,6 @@ class Payment {
|
|
|
2395
1176
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
2396
1177
|
{ responseHeaders } = { responseHeaders: false }
|
|
2397
1178
|
) {
|
|
2398
|
-
const {
|
|
2399
|
-
error,
|
|
2400
|
-
} = PaymentApplicationValidator.getUserBeneficiariesDetail().validate(
|
|
2401
|
-
{ orderId },
|
|
2402
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2403
|
-
);
|
|
2404
|
-
if (error) {
|
|
2405
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2409
|
-
const {
|
|
2410
|
-
error: warrning,
|
|
2411
|
-
} = PaymentApplicationValidator.getUserBeneficiariesDetail().validate(
|
|
2412
|
-
{ orderId },
|
|
2413
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2414
|
-
);
|
|
2415
|
-
if (warrning) {
|
|
2416
|
-
Logger({
|
|
2417
|
-
level: "WARN",
|
|
2418
|
-
message: `Parameter Validation warrnings for application > Payment > getUserBeneficiariesDetail \n ${warrning}`,
|
|
2419
|
-
});
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
1179
|
const query_params = {};
|
|
2423
1180
|
query_params["order_id"] = orderId;
|
|
2424
1181
|
|
|
@@ -2442,34 +1199,13 @@ class Payment {
|
|
|
2442
1199
|
responseData = response[0];
|
|
2443
1200
|
}
|
|
2444
1201
|
|
|
2445
|
-
const {
|
|
2446
|
-
error: res_error,
|
|
2447
|
-
} = PaymentApplicationModel.OrderBeneficiaryFetchDetails().validate(
|
|
2448
|
-
responseData,
|
|
2449
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2450
|
-
);
|
|
2451
|
-
|
|
2452
|
-
if (res_error) {
|
|
2453
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2454
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2455
|
-
} else {
|
|
2456
|
-
Logger({
|
|
2457
|
-
level: "WARN",
|
|
2458
|
-
message: `Response Validation Warnings for application > Payment > getUserBeneficiariesDetail \n ${res_error}`,
|
|
2459
|
-
});
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
1202
|
return response;
|
|
2464
1203
|
}
|
|
2465
1204
|
|
|
2466
1205
|
/**
|
|
2467
|
-
* @param {PaymentApplicationValidator.InitialisePaymentParam} arg - Arg object.
|
|
2468
1206
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2469
1207
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2470
|
-
* @returns {Promise<
|
|
2471
|
-
* - Success response
|
|
2472
|
-
*
|
|
1208
|
+
* @returns {Promise<PaymentInitializationResponse>} - Success response
|
|
2473
1209
|
* @name initialisePayment
|
|
2474
1210
|
* @summary: Start payment process
|
|
2475
1211
|
* @description: Initiate the payment procedure for an order. Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/).
|
|
@@ -2478,28 +1214,6 @@ class Payment {
|
|
|
2478
1214
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2479
1215
|
{ responseHeaders } = { responseHeaders: false }
|
|
2480
1216
|
) {
|
|
2481
|
-
const { error } = PaymentApplicationValidator.initialisePayment().validate(
|
|
2482
|
-
{ body },
|
|
2483
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2484
|
-
);
|
|
2485
|
-
if (error) {
|
|
2486
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2490
|
-
const {
|
|
2491
|
-
error: warrning,
|
|
2492
|
-
} = PaymentApplicationValidator.initialisePayment().validate(
|
|
2493
|
-
{ body },
|
|
2494
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2495
|
-
);
|
|
2496
|
-
if (warrning) {
|
|
2497
|
-
Logger({
|
|
2498
|
-
level: "WARN",
|
|
2499
|
-
message: `Parameter Validation warrnings for application > Payment > initialisePayment \n ${warrning}`,
|
|
2500
|
-
});
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
1217
|
const query_params = {};
|
|
2504
1218
|
|
|
2505
1219
|
const xHeaders = {};
|
|
@@ -2522,36 +1236,13 @@ class Payment {
|
|
|
2522
1236
|
responseData = response[0];
|
|
2523
1237
|
}
|
|
2524
1238
|
|
|
2525
|
-
const {
|
|
2526
|
-
error: res_error,
|
|
2527
|
-
} = PaymentApplicationModel.PaymentInitializationDetails().validate(
|
|
2528
|
-
responseData,
|
|
2529
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2530
|
-
);
|
|
2531
|
-
|
|
2532
|
-
if (res_error) {
|
|
2533
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2534
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2535
|
-
} else {
|
|
2536
|
-
Logger({
|
|
2537
|
-
level: "WARN",
|
|
2538
|
-
message: `Response Validation Warnings for application > Payment > initialisePayment \n ${res_error}`,
|
|
2539
|
-
});
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
1239
|
return response;
|
|
2544
1240
|
}
|
|
2545
1241
|
|
|
2546
1242
|
/**
|
|
2547
|
-
* @param {PaymentApplicationValidator.InitialisePaymentPaymentLinkParam} arg
|
|
2548
|
-
* - Arg object.
|
|
2549
|
-
*
|
|
2550
1243
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2551
1244
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2552
|
-
* @returns {Promise<
|
|
2553
|
-
* - Success response
|
|
2554
|
-
*
|
|
1245
|
+
* @returns {Promise<PaymentInitializationResponse>} - Success response
|
|
2555
1246
|
* @name initialisePaymentPaymentLink
|
|
2556
1247
|
* @summary: Initialize payment link
|
|
2557
1248
|
* @description: Begin payment process for an order by initializing it through a payment link.Upon successful initialization, the response includes details about the payment status, aggregator details, order IDs, polling URL for status updates, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/).
|
|
@@ -2560,30 +1251,6 @@ class Payment {
|
|
|
2560
1251
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2561
1252
|
{ responseHeaders } = { responseHeaders: false }
|
|
2562
1253
|
) {
|
|
2563
|
-
const {
|
|
2564
|
-
error,
|
|
2565
|
-
} = PaymentApplicationValidator.initialisePaymentPaymentLink().validate(
|
|
2566
|
-
{ body },
|
|
2567
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2568
|
-
);
|
|
2569
|
-
if (error) {
|
|
2570
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2571
|
-
}
|
|
2572
|
-
|
|
2573
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2574
|
-
const {
|
|
2575
|
-
error: warrning,
|
|
2576
|
-
} = PaymentApplicationValidator.initialisePaymentPaymentLink().validate(
|
|
2577
|
-
{ body },
|
|
2578
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2579
|
-
);
|
|
2580
|
-
if (warrning) {
|
|
2581
|
-
Logger({
|
|
2582
|
-
level: "WARN",
|
|
2583
|
-
message: `Parameter Validation warrnings for application > Payment > initialisePaymentPaymentLink \n ${warrning}`,
|
|
2584
|
-
});
|
|
2585
|
-
}
|
|
2586
|
-
|
|
2587
1254
|
const query_params = {};
|
|
2588
1255
|
|
|
2589
1256
|
const xHeaders = {};
|
|
@@ -2606,32 +1273,13 @@ class Payment {
|
|
|
2606
1273
|
responseData = response[0];
|
|
2607
1274
|
}
|
|
2608
1275
|
|
|
2609
|
-
const {
|
|
2610
|
-
error: res_error,
|
|
2611
|
-
} = PaymentApplicationModel.PaymentInitializationDetails().validate(
|
|
2612
|
-
responseData,
|
|
2613
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2614
|
-
);
|
|
2615
|
-
|
|
2616
|
-
if (res_error) {
|
|
2617
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2618
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2619
|
-
} else {
|
|
2620
|
-
Logger({
|
|
2621
|
-
level: "WARN",
|
|
2622
|
-
message: `Response Validation Warnings for application > Payment > initialisePaymentPaymentLink \n ${res_error}`,
|
|
2623
|
-
});
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
1276
|
return response;
|
|
2628
1277
|
}
|
|
2629
1278
|
|
|
2630
1279
|
/**
|
|
2631
|
-
* @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object.
|
|
2632
1280
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2633
1281
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2634
|
-
* @returns {Promise<
|
|
1282
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
2635
1283
|
* @name linkWallet
|
|
2636
1284
|
* @summary: OTP verification
|
|
2637
1285
|
* @description: Verify the linking of wallet using OTP for further processing of payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/).
|
|
@@ -2640,28 +1288,6 @@ class Payment {
|
|
|
2640
1288
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2641
1289
|
{ responseHeaders } = { responseHeaders: false }
|
|
2642
1290
|
) {
|
|
2643
|
-
const { error } = PaymentApplicationValidator.linkWallet().validate(
|
|
2644
|
-
{ body },
|
|
2645
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2646
|
-
);
|
|
2647
|
-
if (error) {
|
|
2648
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2652
|
-
const {
|
|
2653
|
-
error: warrning,
|
|
2654
|
-
} = PaymentApplicationValidator.linkWallet().validate(
|
|
2655
|
-
{ body },
|
|
2656
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2657
|
-
);
|
|
2658
|
-
if (warrning) {
|
|
2659
|
-
Logger({
|
|
2660
|
-
level: "WARN",
|
|
2661
|
-
message: `Parameter Validation warrnings for application > Payment > linkWallet \n ${warrning}`,
|
|
2662
|
-
});
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
1291
|
const query_params = {};
|
|
2666
1292
|
|
|
2667
1293
|
const xHeaders = {};
|
|
@@ -2684,33 +1310,13 @@ class Payment {
|
|
|
2684
1310
|
responseData = response[0];
|
|
2685
1311
|
}
|
|
2686
1312
|
|
|
2687
|
-
const {
|
|
2688
|
-
error: res_error,
|
|
2689
|
-
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
2690
|
-
abortEarly: false,
|
|
2691
|
-
allowUnknown: true,
|
|
2692
|
-
});
|
|
2693
|
-
|
|
2694
|
-
if (res_error) {
|
|
2695
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2696
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2697
|
-
} else {
|
|
2698
|
-
Logger({
|
|
2699
|
-
level: "WARN",
|
|
2700
|
-
message: `Response Validation Warnings for application > Payment > linkWallet \n ${res_error}`,
|
|
2701
|
-
});
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
1313
|
return response;
|
|
2706
1314
|
}
|
|
2707
1315
|
|
|
2708
1316
|
/**
|
|
2709
|
-
* @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
|
|
2710
1317
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2711
1318
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2712
|
-
* @returns {Promise<
|
|
2713
|
-
* Success response
|
|
1319
|
+
* @returns {Promise<OutstandingOrderDetailsResponse>} - Success response
|
|
2714
1320
|
* @name outstandingOrderDetails
|
|
2715
1321
|
* @summary: Outstanding orders
|
|
2716
1322
|
* @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
|
|
@@ -2719,30 +1325,6 @@ class Payment {
|
|
|
2719
1325
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2720
1326
|
{ responseHeaders } = { responseHeaders: false }
|
|
2721
1327
|
) {
|
|
2722
|
-
const {
|
|
2723
|
-
error,
|
|
2724
|
-
} = PaymentApplicationValidator.outstandingOrderDetails().validate(
|
|
2725
|
-
{ aggregator },
|
|
2726
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2727
|
-
);
|
|
2728
|
-
if (error) {
|
|
2729
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2733
|
-
const {
|
|
2734
|
-
error: warrning,
|
|
2735
|
-
} = PaymentApplicationValidator.outstandingOrderDetails().validate(
|
|
2736
|
-
{ aggregator },
|
|
2737
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2738
|
-
);
|
|
2739
|
-
if (warrning) {
|
|
2740
|
-
Logger({
|
|
2741
|
-
level: "WARN",
|
|
2742
|
-
message: `Parameter Validation warrnings for application > Payment > outstandingOrderDetails \n ${warrning}`,
|
|
2743
|
-
});
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
1328
|
const query_params = {};
|
|
2747
1329
|
query_params["aggregator"] = aggregator;
|
|
2748
1330
|
|
|
@@ -2766,32 +1348,13 @@ class Payment {
|
|
|
2766
1348
|
responseData = response[0];
|
|
2767
1349
|
}
|
|
2768
1350
|
|
|
2769
|
-
const {
|
|
2770
|
-
error: res_error,
|
|
2771
|
-
} = PaymentApplicationModel.OutstandingOrderDetails().validate(
|
|
2772
|
-
responseData,
|
|
2773
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2774
|
-
);
|
|
2775
|
-
|
|
2776
|
-
if (res_error) {
|
|
2777
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2778
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2779
|
-
} else {
|
|
2780
|
-
Logger({
|
|
2781
|
-
level: "WARN",
|
|
2782
|
-
message: `Response Validation Warnings for application > Payment > outstandingOrderDetails \n ${res_error}`,
|
|
2783
|
-
});
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
1351
|
return response;
|
|
2788
1352
|
}
|
|
2789
1353
|
|
|
2790
1354
|
/**
|
|
2791
|
-
* @param {PaymentApplicationValidator.PaidOrderDetailsParam} arg - Arg object.
|
|
2792
1355
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2793
1356
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2794
|
-
* @returns {Promise<
|
|
1357
|
+
* @returns {Promise<PaidOrderDetailsResponse>} - Success response
|
|
2795
1358
|
* @name paidOrderDetails
|
|
2796
1359
|
* @summary: Retrieve details of paid orders
|
|
2797
1360
|
* @description: Get details of orders that have been paid for, including shipment ID, order ID, due date, payment date, amount, and transaction ID, based on the aggregator merchant user ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/).
|
|
@@ -2800,28 +1363,6 @@ class Payment {
|
|
|
2800
1363
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2801
1364
|
{ responseHeaders } = { responseHeaders: false }
|
|
2802
1365
|
) {
|
|
2803
|
-
const { error } = PaymentApplicationValidator.paidOrderDetails().validate(
|
|
2804
|
-
{ aggregator },
|
|
2805
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2806
|
-
);
|
|
2807
|
-
if (error) {
|
|
2808
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2812
|
-
const {
|
|
2813
|
-
error: warrning,
|
|
2814
|
-
} = PaymentApplicationValidator.paidOrderDetails().validate(
|
|
2815
|
-
{ aggregator },
|
|
2816
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2817
|
-
);
|
|
2818
|
-
if (warrning) {
|
|
2819
|
-
Logger({
|
|
2820
|
-
level: "WARN",
|
|
2821
|
-
message: `Parameter Validation warrnings for application > Payment > paidOrderDetails \n ${warrning}`,
|
|
2822
|
-
});
|
|
2823
|
-
}
|
|
2824
|
-
|
|
2825
1366
|
const query_params = {};
|
|
2826
1367
|
query_params["aggregator"] = aggregator;
|
|
2827
1368
|
|
|
@@ -2845,33 +1386,13 @@ class Payment {
|
|
|
2845
1386
|
responseData = response[0];
|
|
2846
1387
|
}
|
|
2847
1388
|
|
|
2848
|
-
const {
|
|
2849
|
-
error: res_error,
|
|
2850
|
-
} = PaymentApplicationModel.PaidOrderDetails().validate(responseData, {
|
|
2851
|
-
abortEarly: false,
|
|
2852
|
-
allowUnknown: true,
|
|
2853
|
-
});
|
|
2854
|
-
|
|
2855
|
-
if (res_error) {
|
|
2856
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2857
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2858
|
-
} else {
|
|
2859
|
-
Logger({
|
|
2860
|
-
level: "WARN",
|
|
2861
|
-
message: `Response Validation Warnings for application > Payment > paidOrderDetails \n ${res_error}`,
|
|
2862
|
-
});
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
|
|
2866
1389
|
return response;
|
|
2867
1390
|
}
|
|
2868
1391
|
|
|
2869
1392
|
/**
|
|
2870
|
-
* @param {PaymentApplicationValidator.PollingPaymentLinkParam} arg - Arg object.
|
|
2871
1393
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2872
1394
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2873
|
-
* @returns {Promise<
|
|
2874
|
-
* Success response
|
|
1395
|
+
* @returns {Promise<PollingPaymentLinkResponse>} - Success response
|
|
2875
1396
|
* @name pollingPaymentLink
|
|
2876
1397
|
* @summary: Poll status of payment link
|
|
2877
1398
|
* @description: Get real-time information about the payment link's current status, such as whether it has been processed, cancelled, or expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/).
|
|
@@ -2880,28 +1401,6 @@ class Payment {
|
|
|
2880
1401
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2881
1402
|
{ responseHeaders } = { responseHeaders: false }
|
|
2882
1403
|
) {
|
|
2883
|
-
const { error } = PaymentApplicationValidator.pollingPaymentLink().validate(
|
|
2884
|
-
{ paymentLinkId },
|
|
2885
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2886
|
-
);
|
|
2887
|
-
if (error) {
|
|
2888
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2892
|
-
const {
|
|
2893
|
-
error: warrning,
|
|
2894
|
-
} = PaymentApplicationValidator.pollingPaymentLink().validate(
|
|
2895
|
-
{ paymentLinkId },
|
|
2896
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2897
|
-
);
|
|
2898
|
-
if (warrning) {
|
|
2899
|
-
Logger({
|
|
2900
|
-
level: "WARN",
|
|
2901
|
-
message: `Parameter Validation warrnings for application > Payment > pollingPaymentLink \n ${warrning}`,
|
|
2902
|
-
});
|
|
2903
|
-
}
|
|
2904
|
-
|
|
2905
1404
|
const query_params = {};
|
|
2906
1405
|
query_params["payment_link_id"] = paymentLinkId;
|
|
2907
1406
|
|
|
@@ -2925,34 +1424,13 @@ class Payment {
|
|
|
2925
1424
|
responseData = response[0];
|
|
2926
1425
|
}
|
|
2927
1426
|
|
|
2928
|
-
const {
|
|
2929
|
-
error: res_error,
|
|
2930
|
-
} = PaymentApplicationModel.PollingPaymentLinkDetails().validate(
|
|
2931
|
-
responseData,
|
|
2932
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2933
|
-
);
|
|
2934
|
-
|
|
2935
|
-
if (res_error) {
|
|
2936
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
2937
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2938
|
-
} else {
|
|
2939
|
-
Logger({
|
|
2940
|
-
level: "WARN",
|
|
2941
|
-
message: `Response Validation Warnings for application > Payment > pollingPaymentLink \n ${res_error}`,
|
|
2942
|
-
});
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
|
|
2946
1427
|
return response;
|
|
2947
1428
|
}
|
|
2948
1429
|
|
|
2949
1430
|
/**
|
|
2950
|
-
* @param {PaymentApplicationValidator.RedirectToAggregatorParam} arg - Arg object.
|
|
2951
1431
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2952
1432
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2953
|
-
* @returns {Promise<
|
|
2954
|
-
* - Success response
|
|
2955
|
-
*
|
|
1433
|
+
* @returns {Promise<RedirectToAggregatorResponse>} - Success response
|
|
2956
1434
|
* @name redirectToAggregator
|
|
2957
1435
|
* @summary: Redirects users to the payment aggregator's interface
|
|
2958
1436
|
* @description: Get details about the active card aggregator used by the user, including the aggregator's name. You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/).
|
|
@@ -2961,30 +1439,6 @@ class Payment {
|
|
|
2961
1439
|
{ source, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2962
1440
|
{ responseHeaders } = { responseHeaders: false }
|
|
2963
1441
|
) {
|
|
2964
|
-
const {
|
|
2965
|
-
error,
|
|
2966
|
-
} = PaymentApplicationValidator.redirectToAggregator().validate(
|
|
2967
|
-
{ source, aggregator },
|
|
2968
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2969
|
-
);
|
|
2970
|
-
if (error) {
|
|
2971
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2975
|
-
const {
|
|
2976
|
-
error: warrning,
|
|
2977
|
-
} = PaymentApplicationValidator.redirectToAggregator().validate(
|
|
2978
|
-
{ source, aggregator },
|
|
2979
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2980
|
-
);
|
|
2981
|
-
if (warrning) {
|
|
2982
|
-
Logger({
|
|
2983
|
-
level: "WARN",
|
|
2984
|
-
message: `Parameter Validation warrnings for application > Payment > redirectToAggregator \n ${warrning}`,
|
|
2985
|
-
});
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
1442
|
const query_params = {};
|
|
2989
1443
|
query_params["source"] = source;
|
|
2990
1444
|
query_params["aggregator"] = aggregator;
|
|
@@ -3009,32 +1463,13 @@ class Payment {
|
|
|
3009
1463
|
responseData = response[0];
|
|
3010
1464
|
}
|
|
3011
1465
|
|
|
3012
|
-
const {
|
|
3013
|
-
error: res_error,
|
|
3014
|
-
} = PaymentApplicationModel.RedirectToAggregatorDetails().validate(
|
|
3015
|
-
responseData,
|
|
3016
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3017
|
-
);
|
|
3018
|
-
|
|
3019
|
-
if (res_error) {
|
|
3020
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3021
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3022
|
-
} else {
|
|
3023
|
-
Logger({
|
|
3024
|
-
level: "WARN",
|
|
3025
|
-
message: `Response Validation Warnings for application > Payment > redirectToAggregator \n ${res_error}`,
|
|
3026
|
-
});
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
1466
|
return response;
|
|
3031
1467
|
}
|
|
3032
1468
|
|
|
3033
1469
|
/**
|
|
3034
|
-
* @param {PaymentApplicationValidator.RenderHTMLParam} arg - Arg object.
|
|
3035
1470
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3036
1471
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3037
|
-
* @returns {Promise<
|
|
1472
|
+
* @returns {Promise<renderHTMLResponse>} - Success response
|
|
3038
1473
|
* @name renderHTML
|
|
3039
1474
|
* @summary: Render HTML
|
|
3040
1475
|
* @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
|
|
@@ -3043,28 +1478,6 @@ class Payment {
|
|
|
3043
1478
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3044
1479
|
{ responseHeaders } = { responseHeaders: false }
|
|
3045
1480
|
) {
|
|
3046
|
-
const { error } = PaymentApplicationValidator.renderHTML().validate(
|
|
3047
|
-
{ body },
|
|
3048
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3049
|
-
);
|
|
3050
|
-
if (error) {
|
|
3051
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3055
|
-
const {
|
|
3056
|
-
error: warrning,
|
|
3057
|
-
} = PaymentApplicationValidator.renderHTML().validate(
|
|
3058
|
-
{ body },
|
|
3059
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3060
|
-
);
|
|
3061
|
-
if (warrning) {
|
|
3062
|
-
Logger({
|
|
3063
|
-
level: "WARN",
|
|
3064
|
-
message: `Parameter Validation warrnings for application > Payment > renderHTML \n ${warrning}`,
|
|
3065
|
-
});
|
|
3066
|
-
}
|
|
3067
|
-
|
|
3068
1481
|
const query_params = {};
|
|
3069
1482
|
|
|
3070
1483
|
const xHeaders = {};
|
|
@@ -3087,34 +1500,13 @@ class Payment {
|
|
|
3087
1500
|
responseData = response[0];
|
|
3088
1501
|
}
|
|
3089
1502
|
|
|
3090
|
-
const {
|
|
3091
|
-
error: res_error,
|
|
3092
|
-
} = PaymentApplicationModel.RenderHTMLDetails().validate(responseData, {
|
|
3093
|
-
abortEarly: false,
|
|
3094
|
-
allowUnknown: true,
|
|
3095
|
-
});
|
|
3096
|
-
|
|
3097
|
-
if (res_error) {
|
|
3098
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3099
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3100
|
-
} else {
|
|
3101
|
-
Logger({
|
|
3102
|
-
level: "WARN",
|
|
3103
|
-
message: `Response Validation Warnings for application > Payment > renderHTML \n ${res_error}`,
|
|
3104
|
-
});
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
1503
|
return response;
|
|
3109
1504
|
}
|
|
3110
1505
|
|
|
3111
1506
|
/**
|
|
3112
|
-
* @param {PaymentApplicationValidator.ResendOrCancelPaymentParam} arg - Arg object.
|
|
3113
1507
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3114
1508
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3115
|
-
* @returns {Promise<
|
|
3116
|
-
* - Success response
|
|
3117
|
-
*
|
|
1509
|
+
* @returns {Promise<ResendOrCancelPaymentResponse>} - Success response
|
|
3118
1510
|
* @name resendOrCancelPayment
|
|
3119
1511
|
* @summary: Resend or cancel a pending payment transaction
|
|
3120
1512
|
* @description: Resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/).
|
|
@@ -3123,30 +1515,6 @@ class Payment {
|
|
|
3123
1515
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3124
1516
|
{ responseHeaders } = { responseHeaders: false }
|
|
3125
1517
|
) {
|
|
3126
|
-
const {
|
|
3127
|
-
error,
|
|
3128
|
-
} = PaymentApplicationValidator.resendOrCancelPayment().validate(
|
|
3129
|
-
{ body },
|
|
3130
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3131
|
-
);
|
|
3132
|
-
if (error) {
|
|
3133
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3137
|
-
const {
|
|
3138
|
-
error: warrning,
|
|
3139
|
-
} = PaymentApplicationValidator.resendOrCancelPayment().validate(
|
|
3140
|
-
{ body },
|
|
3141
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3142
|
-
);
|
|
3143
|
-
if (warrning) {
|
|
3144
|
-
Logger({
|
|
3145
|
-
level: "WARN",
|
|
3146
|
-
message: `Parameter Validation warrnings for application > Payment > resendOrCancelPayment \n ${warrning}`,
|
|
3147
|
-
});
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
1518
|
const query_params = {};
|
|
3151
1519
|
|
|
3152
1520
|
const xHeaders = {};
|
|
@@ -3169,33 +1537,13 @@ class Payment {
|
|
|
3169
1537
|
responseData = response[0];
|
|
3170
1538
|
}
|
|
3171
1539
|
|
|
3172
|
-
const {
|
|
3173
|
-
error: res_error,
|
|
3174
|
-
} = PaymentApplicationModel.ResendOrCancelPaymentDetails().validate(
|
|
3175
|
-
responseData,
|
|
3176
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3177
|
-
);
|
|
3178
|
-
|
|
3179
|
-
if (res_error) {
|
|
3180
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3181
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3182
|
-
} else {
|
|
3183
|
-
Logger({
|
|
3184
|
-
level: "WARN",
|
|
3185
|
-
message: `Response Validation Warnings for application > Payment > resendOrCancelPayment \n ${res_error}`,
|
|
3186
|
-
});
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
1540
|
return response;
|
|
3191
1541
|
}
|
|
3192
1542
|
|
|
3193
1543
|
/**
|
|
3194
|
-
* @param {PaymentApplicationValidator.ResendPaymentLinkParam} arg - Arg object.
|
|
3195
1544
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3196
1545
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3197
|
-
* @returns {Promise<
|
|
3198
|
-
* Success response
|
|
1546
|
+
* @returns {Promise<ResendPaymentLinkResponse>} - Success response
|
|
3199
1547
|
* @name resendPaymentLink
|
|
3200
1548
|
* @summary: Resend payment link
|
|
3201
1549
|
* @description: Resend an existing payment link to the user to complete the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/).
|
|
@@ -3204,28 +1552,6 @@ class Payment {
|
|
|
3204
1552
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3205
1553
|
{ responseHeaders } = { responseHeaders: false }
|
|
3206
1554
|
) {
|
|
3207
|
-
const { error } = PaymentApplicationValidator.resendPaymentLink().validate(
|
|
3208
|
-
{ body },
|
|
3209
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3210
|
-
);
|
|
3211
|
-
if (error) {
|
|
3212
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3213
|
-
}
|
|
3214
|
-
|
|
3215
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3216
|
-
const {
|
|
3217
|
-
error: warrning,
|
|
3218
|
-
} = PaymentApplicationValidator.resendPaymentLink().validate(
|
|
3219
|
-
{ body },
|
|
3220
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3221
|
-
);
|
|
3222
|
-
if (warrning) {
|
|
3223
|
-
Logger({
|
|
3224
|
-
level: "WARN",
|
|
3225
|
-
message: `Parameter Validation warrnings for application > Payment > resendPaymentLink \n ${warrning}`,
|
|
3226
|
-
});
|
|
3227
|
-
}
|
|
3228
|
-
|
|
3229
1555
|
const query_params = {};
|
|
3230
1556
|
|
|
3231
1557
|
const xHeaders = {};
|
|
@@ -3248,35 +1574,13 @@ class Payment {
|
|
|
3248
1574
|
responseData = response[0];
|
|
3249
1575
|
}
|
|
3250
1576
|
|
|
3251
|
-
const {
|
|
3252
|
-
error: res_error,
|
|
3253
|
-
} = PaymentApplicationModel.ResendPaymentLinkDetails().validate(
|
|
3254
|
-
responseData,
|
|
3255
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3256
|
-
);
|
|
3257
|
-
|
|
3258
|
-
if (res_error) {
|
|
3259
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3260
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3261
|
-
} else {
|
|
3262
|
-
Logger({
|
|
3263
|
-
level: "WARN",
|
|
3264
|
-
message: `Response Validation Warnings for application > Payment > resendPaymentLink \n ${res_error}`,
|
|
3265
|
-
});
|
|
3266
|
-
}
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
1577
|
return response;
|
|
3270
1578
|
}
|
|
3271
1579
|
|
|
3272
1580
|
/**
|
|
3273
|
-
* @param {PaymentApplicationValidator.UpdateDefaultBeneficiaryParam} arg -
|
|
3274
|
-
* Arg object.
|
|
3275
1581
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3276
1582
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3277
|
-
* @returns {Promise<
|
|
3278
|
-
* - Success response
|
|
3279
|
-
*
|
|
1583
|
+
* @returns {Promise<SetDefaultBeneficiaryResponse>} - Success response
|
|
3280
1584
|
* @name updateDefaultBeneficiary
|
|
3281
1585
|
* @summary: Set default beneficiary for refund
|
|
3282
1586
|
* @description: Update default beneficiary for the order refund of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/).
|
|
@@ -3285,30 +1589,6 @@ class Payment {
|
|
|
3285
1589
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3286
1590
|
{ responseHeaders } = { responseHeaders: false }
|
|
3287
1591
|
) {
|
|
3288
|
-
const {
|
|
3289
|
-
error,
|
|
3290
|
-
} = PaymentApplicationValidator.updateDefaultBeneficiary().validate(
|
|
3291
|
-
{ body },
|
|
3292
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3293
|
-
);
|
|
3294
|
-
if (error) {
|
|
3295
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3296
|
-
}
|
|
3297
|
-
|
|
3298
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3299
|
-
const {
|
|
3300
|
-
error: warrning,
|
|
3301
|
-
} = PaymentApplicationValidator.updateDefaultBeneficiary().validate(
|
|
3302
|
-
{ body },
|
|
3303
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3304
|
-
);
|
|
3305
|
-
if (warrning) {
|
|
3306
|
-
Logger({
|
|
3307
|
-
level: "WARN",
|
|
3308
|
-
message: `Parameter Validation warrnings for application > Payment > updateDefaultBeneficiary \n ${warrning}`,
|
|
3309
|
-
});
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
1592
|
const query_params = {};
|
|
3313
1593
|
|
|
3314
1594
|
const xHeaders = {};
|
|
@@ -3331,32 +1611,13 @@ class Payment {
|
|
|
3331
1611
|
responseData = response[0];
|
|
3332
1612
|
}
|
|
3333
1613
|
|
|
3334
|
-
const {
|
|
3335
|
-
error: res_error,
|
|
3336
|
-
} = PaymentApplicationModel.SetDefaultBeneficiaryDetails().validate(
|
|
3337
|
-
responseData,
|
|
3338
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3339
|
-
);
|
|
3340
|
-
|
|
3341
|
-
if (res_error) {
|
|
3342
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3343
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3344
|
-
} else {
|
|
3345
|
-
Logger({
|
|
3346
|
-
level: "WARN",
|
|
3347
|
-
message: `Response Validation Warnings for application > Payment > updateDefaultBeneficiary \n ${res_error}`,
|
|
3348
|
-
});
|
|
3349
|
-
}
|
|
3350
|
-
}
|
|
3351
|
-
|
|
3352
1614
|
return response;
|
|
3353
1615
|
}
|
|
3354
1616
|
|
|
3355
1617
|
/**
|
|
3356
|
-
* @param {PaymentApplicationValidator.ValidateVPAParam} arg - Arg object.
|
|
3357
1618
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3358
1619
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3359
|
-
* @returns {Promise<
|
|
1620
|
+
* @returns {Promise<ValidateVPAResponse>} - Success response
|
|
3360
1621
|
* @name validateVPA
|
|
3361
1622
|
* @summary: Validate VPA
|
|
3362
1623
|
* @description: Validate if a Virtual Payment Address (VPA) is valid for processing payments and returns the validation result.is_valid boolean value indicating whether the VPA is valid for payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/).
|
|
@@ -3365,28 +1626,6 @@ class Payment {
|
|
|
3365
1626
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3366
1627
|
{ responseHeaders } = { responseHeaders: false }
|
|
3367
1628
|
) {
|
|
3368
|
-
const { error } = PaymentApplicationValidator.validateVPA().validate(
|
|
3369
|
-
{ body },
|
|
3370
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3371
|
-
);
|
|
3372
|
-
if (error) {
|
|
3373
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3377
|
-
const {
|
|
3378
|
-
error: warrning,
|
|
3379
|
-
} = PaymentApplicationValidator.validateVPA().validate(
|
|
3380
|
-
{ body },
|
|
3381
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3382
|
-
);
|
|
3383
|
-
if (warrning) {
|
|
3384
|
-
Logger({
|
|
3385
|
-
level: "WARN",
|
|
3386
|
-
message: `Parameter Validation warrnings for application > Payment > validateVPA \n ${warrning}`,
|
|
3387
|
-
});
|
|
3388
|
-
}
|
|
3389
|
-
|
|
3390
1629
|
const query_params = {};
|
|
3391
1630
|
|
|
3392
1631
|
const xHeaders = {};
|
|
@@ -3409,33 +1648,13 @@ class Payment {
|
|
|
3409
1648
|
responseData = response[0];
|
|
3410
1649
|
}
|
|
3411
1650
|
|
|
3412
|
-
const {
|
|
3413
|
-
error: res_error,
|
|
3414
|
-
} = PaymentApplicationModel.ValidateVPADetails().validate(responseData, {
|
|
3415
|
-
abortEarly: false,
|
|
3416
|
-
allowUnknown: true,
|
|
3417
|
-
});
|
|
3418
|
-
|
|
3419
|
-
if (res_error) {
|
|
3420
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3421
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3422
|
-
} else {
|
|
3423
|
-
Logger({
|
|
3424
|
-
level: "WARN",
|
|
3425
|
-
message: `Response Validation Warnings for application > Payment > validateVPA \n ${res_error}`,
|
|
3426
|
-
});
|
|
3427
|
-
}
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
1651
|
return response;
|
|
3431
1652
|
}
|
|
3432
1653
|
|
|
3433
1654
|
/**
|
|
3434
|
-
* @param {PaymentApplicationValidator.VerifyAndChargePaymentParam} arg - Arg object.
|
|
3435
1655
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3436
1656
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3437
|
-
* @returns {Promise<
|
|
3438
|
-
* Success response
|
|
1657
|
+
* @returns {Promise<ChargeCustomerResponse>} - Success response
|
|
3439
1658
|
* @name verifyAndChargePayment
|
|
3440
1659
|
* @summary: Verify order confirmation and charge
|
|
3441
1660
|
* @description: Verify the payment status and charge from the customer's BNPL (Buy Now, Pay Later) account after order confirmation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/).
|
|
@@ -3444,30 +1663,6 @@ class Payment {
|
|
|
3444
1663
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3445
1664
|
{ responseHeaders } = { responseHeaders: false }
|
|
3446
1665
|
) {
|
|
3447
|
-
const {
|
|
3448
|
-
error,
|
|
3449
|
-
} = PaymentApplicationValidator.verifyAndChargePayment().validate(
|
|
3450
|
-
{ body },
|
|
3451
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3452
|
-
);
|
|
3453
|
-
if (error) {
|
|
3454
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3458
|
-
const {
|
|
3459
|
-
error: warrning,
|
|
3460
|
-
} = PaymentApplicationValidator.verifyAndChargePayment().validate(
|
|
3461
|
-
{ body },
|
|
3462
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3463
|
-
);
|
|
3464
|
-
if (warrning) {
|
|
3465
|
-
Logger({
|
|
3466
|
-
level: "WARN",
|
|
3467
|
-
message: `Parameter Validation warrnings for application > Payment > verifyAndChargePayment \n ${warrning}`,
|
|
3468
|
-
});
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
1666
|
const query_params = {};
|
|
3472
1667
|
|
|
3473
1668
|
const xHeaders = {};
|
|
@@ -3490,34 +1685,13 @@ class Payment {
|
|
|
3490
1685
|
responseData = response[0];
|
|
3491
1686
|
}
|
|
3492
1687
|
|
|
3493
|
-
const {
|
|
3494
|
-
error: res_error,
|
|
3495
|
-
} = PaymentApplicationModel.ChargeCustomerDetails().validate(responseData, {
|
|
3496
|
-
abortEarly: false,
|
|
3497
|
-
allowUnknown: true,
|
|
3498
|
-
});
|
|
3499
|
-
|
|
3500
|
-
if (res_error) {
|
|
3501
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3502
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3503
|
-
} else {
|
|
3504
|
-
Logger({
|
|
3505
|
-
level: "WARN",
|
|
3506
|
-
message: `Response Validation Warnings for application > Payment > verifyAndChargePayment \n ${res_error}`,
|
|
3507
|
-
});
|
|
3508
|
-
}
|
|
3509
|
-
}
|
|
3510
|
-
|
|
3511
1688
|
return response;
|
|
3512
1689
|
}
|
|
3513
1690
|
|
|
3514
1691
|
/**
|
|
3515
|
-
* @param {PaymentApplicationValidator.VerifyCustomerForPaymentParam} arg -
|
|
3516
|
-
* Arg object.
|
|
3517
1692
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3518
1693
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3519
|
-
* @returns {Promise<
|
|
3520
|
-
* Success response
|
|
1694
|
+
* @returns {Promise<ValidateCustomerResponse>} - Success response
|
|
3521
1695
|
* @name verifyCustomerForPayment
|
|
3522
1696
|
* @summary: Verify payment customer
|
|
3523
1697
|
* @description: Verify if the user is eligible for pay-later payment from the payment aggregator side using the customer's phone number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/).
|
|
@@ -3526,30 +1700,6 @@ class Payment {
|
|
|
3526
1700
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3527
1701
|
{ responseHeaders } = { responseHeaders: false }
|
|
3528
1702
|
) {
|
|
3529
|
-
const {
|
|
3530
|
-
error,
|
|
3531
|
-
} = PaymentApplicationValidator.verifyCustomerForPayment().validate(
|
|
3532
|
-
{ body },
|
|
3533
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3534
|
-
);
|
|
3535
|
-
if (error) {
|
|
3536
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3537
|
-
}
|
|
3538
|
-
|
|
3539
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3540
|
-
const {
|
|
3541
|
-
error: warrning,
|
|
3542
|
-
} = PaymentApplicationValidator.verifyCustomerForPayment().validate(
|
|
3543
|
-
{ body },
|
|
3544
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3545
|
-
);
|
|
3546
|
-
if (warrning) {
|
|
3547
|
-
Logger({
|
|
3548
|
-
level: "WARN",
|
|
3549
|
-
message: `Parameter Validation warrnings for application > Payment > verifyCustomerForPayment \n ${warrning}`,
|
|
3550
|
-
});
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
1703
|
const query_params = {};
|
|
3554
1704
|
|
|
3555
1705
|
const xHeaders = {};
|
|
@@ -3572,32 +1722,13 @@ class Payment {
|
|
|
3572
1722
|
responseData = response[0];
|
|
3573
1723
|
}
|
|
3574
1724
|
|
|
3575
|
-
const {
|
|
3576
|
-
error: res_error,
|
|
3577
|
-
} = PaymentApplicationModel.ValidateCustomerDetails().validate(
|
|
3578
|
-
responseData,
|
|
3579
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3580
|
-
);
|
|
3581
|
-
|
|
3582
|
-
if (res_error) {
|
|
3583
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3584
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3585
|
-
} else {
|
|
3586
|
-
Logger({
|
|
3587
|
-
level: "WARN",
|
|
3588
|
-
message: `Response Validation Warnings for application > Payment > verifyCustomerForPayment \n ${res_error}`,
|
|
3589
|
-
});
|
|
3590
|
-
}
|
|
3591
|
-
}
|
|
3592
|
-
|
|
3593
1725
|
return response;
|
|
3594
1726
|
}
|
|
3595
1727
|
|
|
3596
1728
|
/**
|
|
3597
|
-
* @param {PaymentApplicationValidator.VerifyIfscCodeParam} arg - Arg object.
|
|
3598
1729
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3599
1730
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3600
|
-
* @returns {Promise<
|
|
1731
|
+
* @returns {Promise<IfscCodeResponse>} - Success response
|
|
3601
1732
|
* @name verifyIfscCode
|
|
3602
1733
|
* @summary: Verify IFSC
|
|
3603
1734
|
* @description: Validate IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/).
|
|
@@ -3606,28 +1737,6 @@ class Payment {
|
|
|
3606
1737
|
{ ifscCode, requestHeaders } = { requestHeaders: {} },
|
|
3607
1738
|
{ responseHeaders } = { responseHeaders: false }
|
|
3608
1739
|
) {
|
|
3609
|
-
const { error } = PaymentApplicationValidator.verifyIfscCode().validate(
|
|
3610
|
-
{ ifscCode },
|
|
3611
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3612
|
-
);
|
|
3613
|
-
if (error) {
|
|
3614
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3618
|
-
const {
|
|
3619
|
-
error: warrning,
|
|
3620
|
-
} = PaymentApplicationValidator.verifyIfscCode().validate(
|
|
3621
|
-
{ ifscCode },
|
|
3622
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3623
|
-
);
|
|
3624
|
-
if (warrning) {
|
|
3625
|
-
Logger({
|
|
3626
|
-
level: "WARN",
|
|
3627
|
-
message: `Parameter Validation warrnings for application > Payment > verifyIfscCode \n ${warrning}`,
|
|
3628
|
-
});
|
|
3629
|
-
}
|
|
3630
|
-
|
|
3631
1740
|
const query_params = {};
|
|
3632
1741
|
query_params["ifsc_code"] = ifscCode;
|
|
3633
1742
|
|
|
@@ -3651,36 +1760,13 @@ class Payment {
|
|
|
3651
1760
|
responseData = response[0];
|
|
3652
1761
|
}
|
|
3653
1762
|
|
|
3654
|
-
const {
|
|
3655
|
-
error: res_error,
|
|
3656
|
-
} = PaymentApplicationModel.IfscCodeDetails().validate(responseData, {
|
|
3657
|
-
abortEarly: false,
|
|
3658
|
-
allowUnknown: true,
|
|
3659
|
-
});
|
|
3660
|
-
|
|
3661
|
-
if (res_error) {
|
|
3662
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3663
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3664
|
-
} else {
|
|
3665
|
-
Logger({
|
|
3666
|
-
level: "WARN",
|
|
3667
|
-
message: `Response Validation Warnings for application > Payment > verifyIfscCode \n ${res_error}`,
|
|
3668
|
-
});
|
|
3669
|
-
}
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
1763
|
return response;
|
|
3673
1764
|
}
|
|
3674
1765
|
|
|
3675
1766
|
/**
|
|
3676
|
-
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForBankParam} arg
|
|
3677
|
-
* - Arg object.
|
|
3678
|
-
*
|
|
3679
1767
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3680
1768
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3681
|
-
* @returns {Promise<
|
|
3682
|
-
* - Success response
|
|
3683
|
-
*
|
|
1769
|
+
* @returns {Promise<AddBeneficiaryViaOtpVerificationResponse>} - Success response
|
|
3684
1770
|
* @name verifyOtpAndAddBeneficiaryForBank
|
|
3685
1771
|
* @summary: Verify OTP for bank and add beneficiary
|
|
3686
1772
|
* @description: Verify the OTP provided by the user and adds a bank beneficiary for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/).
|
|
@@ -3689,30 +1775,6 @@ class Payment {
|
|
|
3689
1775
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3690
1776
|
{ responseHeaders } = { responseHeaders: false }
|
|
3691
1777
|
) {
|
|
3692
|
-
const {
|
|
3693
|
-
error,
|
|
3694
|
-
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForBank().validate(
|
|
3695
|
-
{ body },
|
|
3696
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3697
|
-
);
|
|
3698
|
-
if (error) {
|
|
3699
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3700
|
-
}
|
|
3701
|
-
|
|
3702
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3703
|
-
const {
|
|
3704
|
-
error: warrning,
|
|
3705
|
-
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForBank().validate(
|
|
3706
|
-
{ body },
|
|
3707
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3708
|
-
);
|
|
3709
|
-
if (warrning) {
|
|
3710
|
-
Logger({
|
|
3711
|
-
level: "WARN",
|
|
3712
|
-
message: `Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${warrning}`,
|
|
3713
|
-
});
|
|
3714
|
-
}
|
|
3715
|
-
|
|
3716
1778
|
const query_params = {};
|
|
3717
1779
|
|
|
3718
1780
|
const xHeaders = {};
|
|
@@ -3735,34 +1797,13 @@ class Payment {
|
|
|
3735
1797
|
responseData = response[0];
|
|
3736
1798
|
}
|
|
3737
1799
|
|
|
3738
|
-
const {
|
|
3739
|
-
error: res_error,
|
|
3740
|
-
} = PaymentApplicationModel.AddBeneficiaryViaOtpVerificationDetails().validate(
|
|
3741
|
-
responseData,
|
|
3742
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3743
|
-
);
|
|
3744
|
-
|
|
3745
|
-
if (res_error) {
|
|
3746
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3747
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3748
|
-
} else {
|
|
3749
|
-
Logger({
|
|
3750
|
-
level: "WARN",
|
|
3751
|
-
message: `Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${res_error}`,
|
|
3752
|
-
});
|
|
3753
|
-
}
|
|
3754
|
-
}
|
|
3755
|
-
|
|
3756
1800
|
return response;
|
|
3757
1801
|
}
|
|
3758
1802
|
|
|
3759
1803
|
/**
|
|
3760
|
-
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam} arg
|
|
3761
|
-
* - Arg object.
|
|
3762
|
-
*
|
|
3763
1804
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3764
1805
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3765
|
-
* @returns {Promise<
|
|
1806
|
+
* @returns {Promise<WalletOtpResponse>} - Success response
|
|
3766
1807
|
* @name verifyOtpAndAddBeneficiaryForWallet
|
|
3767
1808
|
* @summary: Verify OTP for wallet
|
|
3768
1809
|
* @description: Verify OTP provided by the user and adds a wallet beneficiary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/).
|
|
@@ -3771,30 +1812,6 @@ class Payment {
|
|
|
3771
1812
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3772
1813
|
{ responseHeaders } = { responseHeaders: false }
|
|
3773
1814
|
) {
|
|
3774
|
-
const {
|
|
3775
|
-
error,
|
|
3776
|
-
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForWallet().validate(
|
|
3777
|
-
{ body },
|
|
3778
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3779
|
-
);
|
|
3780
|
-
if (error) {
|
|
3781
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3782
|
-
}
|
|
3783
|
-
|
|
3784
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3785
|
-
const {
|
|
3786
|
-
error: warrning,
|
|
3787
|
-
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForWallet().validate(
|
|
3788
|
-
{ body },
|
|
3789
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3790
|
-
);
|
|
3791
|
-
if (warrning) {
|
|
3792
|
-
Logger({
|
|
3793
|
-
level: "WARN",
|
|
3794
|
-
message: `Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${warrning}`,
|
|
3795
|
-
});
|
|
3796
|
-
}
|
|
3797
|
-
|
|
3798
1815
|
const query_params = {};
|
|
3799
1816
|
|
|
3800
1817
|
const xHeaders = {};
|
|
@@ -3817,32 +1834,13 @@ class Payment {
|
|
|
3817
1834
|
responseData = response[0];
|
|
3818
1835
|
}
|
|
3819
1836
|
|
|
3820
|
-
const {
|
|
3821
|
-
error: res_error,
|
|
3822
|
-
} = PaymentApplicationModel.WalletOtpDetails().validate(responseData, {
|
|
3823
|
-
abortEarly: false,
|
|
3824
|
-
allowUnknown: true,
|
|
3825
|
-
});
|
|
3826
|
-
|
|
3827
|
-
if (res_error) {
|
|
3828
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3829
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3830
|
-
} else {
|
|
3831
|
-
Logger({
|
|
3832
|
-
level: "WARN",
|
|
3833
|
-
message: `Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${res_error}`,
|
|
3834
|
-
});
|
|
3835
|
-
}
|
|
3836
|
-
}
|
|
3837
|
-
|
|
3838
1837
|
return response;
|
|
3839
1838
|
}
|
|
3840
1839
|
|
|
3841
1840
|
/**
|
|
3842
|
-
* @param {PaymentApplicationValidator.WalletLinkInitiateParam} arg - Arg object.
|
|
3843
1841
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3844
1842
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3845
|
-
* @returns {Promise<
|
|
1843
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
3846
1844
|
* @name walletLinkInitiate
|
|
3847
1845
|
* @summary: Initiate linking of wallet
|
|
3848
1846
|
* @description: Link wallet for the aggregator for processing of payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/walletLinkInitiate/).
|
|
@@ -3851,28 +1849,6 @@ class Payment {
|
|
|
3851
1849
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3852
1850
|
{ responseHeaders } = { responseHeaders: false }
|
|
3853
1851
|
) {
|
|
3854
|
-
const { error } = PaymentApplicationValidator.walletLinkInitiate().validate(
|
|
3855
|
-
{ body },
|
|
3856
|
-
{ abortEarly: false, allowUnknown: true }
|
|
3857
|
-
);
|
|
3858
|
-
if (error) {
|
|
3859
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
3860
|
-
}
|
|
3861
|
-
|
|
3862
|
-
// Showing warrnings if extra unknown parameters are found
|
|
3863
|
-
const {
|
|
3864
|
-
error: warrning,
|
|
3865
|
-
} = PaymentApplicationValidator.walletLinkInitiate().validate(
|
|
3866
|
-
{ body },
|
|
3867
|
-
{ abortEarly: false, allowUnknown: false }
|
|
3868
|
-
);
|
|
3869
|
-
if (warrning) {
|
|
3870
|
-
Logger({
|
|
3871
|
-
level: "WARN",
|
|
3872
|
-
message: `Parameter Validation warrnings for application > Payment > walletLinkInitiate \n ${warrning}`,
|
|
3873
|
-
});
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
1852
|
const query_params = {};
|
|
3877
1853
|
|
|
3878
1854
|
const xHeaders = {};
|
|
@@ -3895,24 +1871,6 @@ class Payment {
|
|
|
3895
1871
|
responseData = response[0];
|
|
3896
1872
|
}
|
|
3897
1873
|
|
|
3898
|
-
const {
|
|
3899
|
-
error: res_error,
|
|
3900
|
-
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
3901
|
-
abortEarly: false,
|
|
3902
|
-
allowUnknown: true,
|
|
3903
|
-
});
|
|
3904
|
-
|
|
3905
|
-
if (res_error) {
|
|
3906
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
3907
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3908
|
-
} else {
|
|
3909
|
-
Logger({
|
|
3910
|
-
level: "WARN",
|
|
3911
|
-
message: `Response Validation Warnings for application > Payment > walletLinkInitiate \n ${res_error}`,
|
|
3912
|
-
});
|
|
3913
|
-
}
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
1874
|
return response;
|
|
3917
1875
|
}
|
|
3918
1876
|
}
|