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