@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15
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 +108 -1199
- 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 +48 -111
- package/sdk/application/Content/ContentApplicationClient.js +43 -1065
- 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 +91 -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 +103 -213
- package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
- 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 +157 -30
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
- 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 +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
- package/sdk/platform/Cart/CartPlatformModel.js +1985 -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 +178 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -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 +122 -191
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
- package/sdk/platform/Content/ContentPlatformModel.js +514 -487
- 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 +424 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
- package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +145 -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 +132 -44
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -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) {
|
|
@@ -79,6 +71,8 @@ class Payment {
|
|
|
79
71
|
"/service/application/payment/v1.0/resend-payment-link/",
|
|
80
72
|
updateDefaultBeneficiary:
|
|
81
73
|
"/service/application/payment/v1.0/refund/beneficiary/default",
|
|
74
|
+
validateCustomerAndCreditSummary:
|
|
75
|
+
"/service/application/payment/v1.0/payment/validate/customer-credits-v2",
|
|
82
76
|
validateVPA: "/service/application/payment/v1.0/validate-vpa",
|
|
83
77
|
verifyAndChargePayment:
|
|
84
78
|
"/service/application/payment/v1.0/payment/confirm/charge",
|
|
@@ -109,11 +103,9 @@ class Payment {
|
|
|
109
103
|
}
|
|
110
104
|
|
|
111
105
|
/**
|
|
112
|
-
* @param {PaymentApplicationValidator.AddBeneficiaryDetailsParam} arg - Arg object.
|
|
113
106
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
114
107
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
115
|
-
* @returns {Promise<
|
|
116
|
-
* Success response
|
|
108
|
+
* @returns {Promise<RefundAccountDetails>} - Success response
|
|
117
109
|
* @name addBeneficiaryDetails
|
|
118
110
|
* @summary: Add beneficiary for refund
|
|
119
111
|
* @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 +114,6 @@ class Payment {
|
|
|
122
114
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
123
115
|
{ responseHeaders } = { responseHeaders: false }
|
|
124
116
|
) {
|
|
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
117
|
const query_params = {};
|
|
150
118
|
|
|
151
119
|
const xHeaders = {};
|
|
@@ -168,35 +136,13 @@ class Payment {
|
|
|
168
136
|
responseData = response[0];
|
|
169
137
|
}
|
|
170
138
|
|
|
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
139
|
return response;
|
|
190
140
|
}
|
|
191
141
|
|
|
192
142
|
/**
|
|
193
|
-
* @param {PaymentApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
|
|
194
|
-
* - Arg object.
|
|
195
|
-
*
|
|
196
143
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
197
144
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
198
|
-
* @returns {Promise<
|
|
199
|
-
* Success response
|
|
145
|
+
* @returns {Promise<RefundAccountDetails>} - Success response
|
|
200
146
|
* @name addRefundBankAccountUsingOTP
|
|
201
147
|
* @summary: Add refund account using OTP verification
|
|
202
148
|
* @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 +151,6 @@ class Payment {
|
|
|
205
151
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
206
152
|
{ responseHeaders } = { responseHeaders: false }
|
|
207
153
|
) {
|
|
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
154
|
const query_params = {};
|
|
233
155
|
|
|
234
156
|
const xHeaders = {};
|
|
@@ -251,32 +173,13 @@ class Payment {
|
|
|
251
173
|
responseData = response[0];
|
|
252
174
|
}
|
|
253
175
|
|
|
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
176
|
return response;
|
|
273
177
|
}
|
|
274
178
|
|
|
275
179
|
/**
|
|
276
|
-
* @param {PaymentApplicationValidator.AttachCardToCustomerParam} arg - Arg object.
|
|
277
180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
278
181
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
279
|
-
* @returns {Promise<
|
|
182
|
+
* @returns {Promise<AttachCardsDetails>} - Success response
|
|
280
183
|
* @name attachCardToCustomer
|
|
281
184
|
* @summary: Link payment card to customer
|
|
282
185
|
* @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 +188,6 @@ class Payment {
|
|
|
285
188
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
286
189
|
{ responseHeaders } = { responseHeaders: false }
|
|
287
190
|
) {
|
|
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
191
|
const query_params = {};
|
|
313
192
|
|
|
314
193
|
const xHeaders = {};
|
|
@@ -331,33 +210,13 @@ class Payment {
|
|
|
331
210
|
responseData = response[0];
|
|
332
211
|
}
|
|
333
212
|
|
|
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
213
|
return response;
|
|
353
214
|
}
|
|
354
215
|
|
|
355
216
|
/**
|
|
356
|
-
* @param {PaymentApplicationValidator.CancelPaymentLinkParam} arg - Arg object.
|
|
357
217
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
358
218
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
359
|
-
* @returns {Promise<
|
|
360
|
-
* Success response
|
|
219
|
+
* @returns {Promise<CancelPaymentLinkDetails>} - Success response
|
|
361
220
|
* @name cancelPaymentLink
|
|
362
221
|
* @summary: Cancel payment link
|
|
363
222
|
* @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
|
|
@@ -366,28 +225,6 @@ class Payment {
|
|
|
366
225
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
367
226
|
{ responseHeaders } = { responseHeaders: false }
|
|
368
227
|
) {
|
|
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
228
|
const query_params = {};
|
|
392
229
|
|
|
393
230
|
const xHeaders = {};
|
|
@@ -410,32 +247,13 @@ class Payment {
|
|
|
410
247
|
responseData = response[0];
|
|
411
248
|
}
|
|
412
249
|
|
|
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
250
|
return response;
|
|
432
251
|
}
|
|
433
252
|
|
|
434
253
|
/**
|
|
435
|
-
* @param {PaymentApplicationValidator.CardDetailsParam} arg - Arg object.
|
|
436
254
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
437
255
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
438
|
-
* @returns {Promise<
|
|
256
|
+
* @returns {Promise<CardDetailsFetchedDetails>} - Success response
|
|
439
257
|
* @name cardDetails
|
|
440
258
|
* @summary: Get card details
|
|
441
259
|
* @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 +262,6 @@ class Payment {
|
|
|
444
262
|
{ cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
445
263
|
{ responseHeaders } = { responseHeaders: false }
|
|
446
264
|
) {
|
|
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
265
|
const query_params = {};
|
|
470
266
|
query_params["aggregator"] = aggregator;
|
|
471
267
|
|
|
@@ -489,36 +285,13 @@ class Payment {
|
|
|
489
285
|
responseData = response[0];
|
|
490
286
|
}
|
|
491
287
|
|
|
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
288
|
return response;
|
|
511
289
|
}
|
|
512
290
|
|
|
513
291
|
/**
|
|
514
|
-
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
|
|
515
|
-
* - Arg object.
|
|
516
|
-
*
|
|
517
292
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
518
293
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
519
|
-
* @returns {Promise<
|
|
520
|
-
* - Success response
|
|
521
|
-
*
|
|
294
|
+
* @returns {Promise<PaymentStatusUpdateDetails>} - Success response
|
|
522
295
|
* @name checkAndUpdatePaymentStatus
|
|
523
296
|
* @summary: Update payment status
|
|
524
297
|
* @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 +300,6 @@ class Payment {
|
|
|
527
300
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
528
301
|
{ responseHeaders } = { responseHeaders: false }
|
|
529
302
|
) {
|
|
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
303
|
const query_params = {};
|
|
555
304
|
|
|
556
305
|
const xHeaders = {};
|
|
@@ -573,36 +322,13 @@ class Payment {
|
|
|
573
322
|
responseData = response[0];
|
|
574
323
|
}
|
|
575
324
|
|
|
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
325
|
return response;
|
|
595
326
|
}
|
|
596
327
|
|
|
597
328
|
/**
|
|
598
|
-
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusPaymentLinkParam} arg
|
|
599
|
-
* - Arg object.
|
|
600
|
-
*
|
|
601
329
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
602
330
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
603
|
-
* @returns {Promise<
|
|
604
|
-
* - Success response
|
|
605
|
-
*
|
|
331
|
+
* @returns {Promise<PaymentStatusUpdateDetails>} - Success response
|
|
606
332
|
* @name checkAndUpdatePaymentStatusPaymentLink
|
|
607
333
|
* @summary: Update payment link status
|
|
608
334
|
* @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 +337,6 @@ class Payment {
|
|
|
611
337
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
612
338
|
{ responseHeaders } = { responseHeaders: false }
|
|
613
339
|
) {
|
|
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
340
|
const query_params = {};
|
|
639
341
|
|
|
640
342
|
const xHeaders = {};
|
|
@@ -657,32 +359,13 @@ class Payment {
|
|
|
657
359
|
responseData = response[0];
|
|
658
360
|
}
|
|
659
361
|
|
|
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
362
|
return response;
|
|
679
363
|
}
|
|
680
364
|
|
|
681
365
|
/**
|
|
682
|
-
* @param {PaymentApplicationValidator.CheckCreditParam} arg - Arg object.
|
|
683
366
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
684
367
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
685
|
-
* @returns {Promise<
|
|
368
|
+
* @returns {Promise<CheckCreditDetails>} - Success response
|
|
686
369
|
* @name checkCredit
|
|
687
370
|
* @summary: Verify credit availability and status
|
|
688
371
|
* @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 +374,6 @@ class Payment {
|
|
|
691
374
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
692
375
|
{ responseHeaders } = { responseHeaders: false }
|
|
693
376
|
) {
|
|
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
377
|
const query_params = {};
|
|
717
378
|
query_params["aggregator"] = aggregator;
|
|
718
379
|
|
|
@@ -736,35 +397,13 @@ class Payment {
|
|
|
736
397
|
responseData = response[0];
|
|
737
398
|
}
|
|
738
399
|
|
|
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
400
|
return response;
|
|
758
401
|
}
|
|
759
402
|
|
|
760
403
|
/**
|
|
761
|
-
* @param {PaymentApplicationValidator.CreateOrderHandlerPaymentLinkParam} arg
|
|
762
|
-
* - Arg object.
|
|
763
|
-
*
|
|
764
404
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
765
405
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
766
|
-
* @returns {Promise<
|
|
767
|
-
* Success response
|
|
406
|
+
* @returns {Promise<CreateOrderUserDetails>} - Success response
|
|
768
407
|
* @name createOrderHandlerPaymentLink
|
|
769
408
|
* @summary: Create order for payment via link
|
|
770
409
|
* @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 +412,6 @@ class Payment {
|
|
|
773
412
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
774
413
|
{ responseHeaders } = { responseHeaders: false }
|
|
775
414
|
) {
|
|
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
415
|
const query_params = {};
|
|
801
416
|
|
|
802
417
|
const xHeaders = {};
|
|
@@ -819,33 +434,13 @@ class Payment {
|
|
|
819
434
|
responseData = response[0];
|
|
820
435
|
}
|
|
821
436
|
|
|
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
437
|
return response;
|
|
841
438
|
}
|
|
842
439
|
|
|
843
440
|
/**
|
|
844
|
-
* @param {PaymentApplicationValidator.CreatePaymentLinkParam} arg - Arg object.
|
|
845
441
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
846
442
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
847
|
-
* @returns {Promise<
|
|
848
|
-
* Success response
|
|
443
|
+
* @returns {Promise<CreatePaymentLinkDetails>} - Success response
|
|
849
444
|
* @name createPaymentLink
|
|
850
445
|
* @summary: Create payment link
|
|
851
446
|
* @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
|
|
@@ -854,28 +449,6 @@ class Payment {
|
|
|
854
449
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
855
450
|
{ responseHeaders } = { responseHeaders: false }
|
|
856
451
|
) {
|
|
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
452
|
const query_params = {};
|
|
880
453
|
|
|
881
454
|
const xHeaders = {};
|
|
@@ -898,32 +471,13 @@ class Payment {
|
|
|
898
471
|
responseData = response[0];
|
|
899
472
|
}
|
|
900
473
|
|
|
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
474
|
return response;
|
|
920
475
|
}
|
|
921
476
|
|
|
922
477
|
/**
|
|
923
|
-
* @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object.
|
|
924
478
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
925
479
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
926
|
-
* @returns {Promise<
|
|
480
|
+
* @returns {Promise<PaymentOrderDetails>} - Success response
|
|
927
481
|
* @name createPaymentOrder
|
|
928
482
|
* @summary: Create Order
|
|
929
483
|
* @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 +486,6 @@ class Payment {
|
|
|
932
486
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
933
487
|
{ responseHeaders } = { responseHeaders: false }
|
|
934
488
|
) {
|
|
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
489
|
const query_params = {};
|
|
958
490
|
|
|
959
491
|
const xHeaders = {};
|
|
@@ -976,34 +508,13 @@ class Payment {
|
|
|
976
508
|
responseData = response[0];
|
|
977
509
|
}
|
|
978
510
|
|
|
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
511
|
return response;
|
|
998
512
|
}
|
|
999
513
|
|
|
1000
514
|
/**
|
|
1001
|
-
* @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
|
|
1002
515
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1003
516
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1004
|
-
* @returns {Promise<
|
|
1005
|
-
* - Success response
|
|
1006
|
-
*
|
|
517
|
+
* @returns {Promise<CustomerCreditSummaryDetails>} - Success response
|
|
1007
518
|
* @name customerCreditSummary
|
|
1008
519
|
* @summary: Credit summary
|
|
1009
520
|
* @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 +523,6 @@ class Payment {
|
|
|
1012
523
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
1013
524
|
{ responseHeaders } = { responseHeaders: false }
|
|
1014
525
|
) {
|
|
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
526
|
const query_params = {};
|
|
1040
527
|
query_params["aggregator"] = aggregator;
|
|
1041
528
|
|
|
@@ -1059,33 +546,13 @@ class Payment {
|
|
|
1059
546
|
responseData = response[0];
|
|
1060
547
|
}
|
|
1061
548
|
|
|
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
549
|
return response;
|
|
1081
550
|
}
|
|
1082
551
|
|
|
1083
552
|
/**
|
|
1084
|
-
* @param {PaymentApplicationValidator.CustomerOnboardParam} arg - Arg object.
|
|
1085
553
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1086
554
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1087
|
-
* @returns {Promise<
|
|
1088
|
-
* Success response
|
|
555
|
+
* @returns {Promise<CustomerOnboardingDetails>} - Success response
|
|
1089
556
|
* @name customerOnboard
|
|
1090
557
|
* @summary: Onboard customer for payment
|
|
1091
558
|
* @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 +561,6 @@ class Payment {
|
|
|
1094
561
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1095
562
|
{ responseHeaders } = { responseHeaders: false }
|
|
1096
563
|
) {
|
|
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
564
|
const query_params = {};
|
|
1120
565
|
|
|
1121
566
|
const xHeaders = {};
|
|
@@ -1138,32 +583,13 @@ class Payment {
|
|
|
1138
583
|
responseData = response[0];
|
|
1139
584
|
}
|
|
1140
585
|
|
|
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
586
|
return response;
|
|
1160
587
|
}
|
|
1161
588
|
|
|
1162
589
|
/**
|
|
1163
|
-
* @param {PaymentApplicationValidator.DeleteUserCardParam} arg - Arg object.
|
|
1164
590
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1165
591
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1166
|
-
* @returns {Promise<
|
|
592
|
+
* @returns {Promise<DeleteCardsDetails>} - Success response
|
|
1167
593
|
* @name deleteUserCard
|
|
1168
594
|
* @summary: Delete customer card
|
|
1169
595
|
* @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 +598,6 @@ class Payment {
|
|
|
1172
598
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1173
599
|
{ responseHeaders } = { responseHeaders: false }
|
|
1174
600
|
) {
|
|
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
601
|
const query_params = {};
|
|
1198
602
|
|
|
1199
603
|
const xHeaders = {};
|
|
@@ -1216,32 +620,13 @@ class Payment {
|
|
|
1216
620
|
responseData = response[0];
|
|
1217
621
|
}
|
|
1218
622
|
|
|
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
623
|
return response;
|
|
1238
624
|
}
|
|
1239
625
|
|
|
1240
626
|
/**
|
|
1241
|
-
* @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object.
|
|
1242
627
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1243
628
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1244
|
-
* @returns {Promise<
|
|
629
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
1245
630
|
* @name delinkWallet
|
|
1246
631
|
* @summary: Delink the wallet
|
|
1247
632
|
* @description: Delink the wallet. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/).
|
|
@@ -1250,28 +635,6 @@ class Payment {
|
|
|
1250
635
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1251
636
|
{ responseHeaders } = { responseHeaders: false }
|
|
1252
637
|
) {
|
|
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
638
|
const query_params = {};
|
|
1276
639
|
|
|
1277
640
|
const xHeaders = {};
|
|
@@ -1294,36 +657,13 @@ class Payment {
|
|
|
1294
657
|
responseData = response[0];
|
|
1295
658
|
}
|
|
1296
659
|
|
|
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
660
|
return response;
|
|
1316
661
|
}
|
|
1317
662
|
|
|
1318
663
|
/**
|
|
1319
|
-
* @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
|
|
1320
|
-
* - Arg object.
|
|
1321
|
-
*
|
|
1322
664
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1323
665
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1324
|
-
* @returns {Promise<
|
|
1325
|
-
* - Success response
|
|
1326
|
-
*
|
|
666
|
+
* @returns {Promise<RefundTransferModeUpdateDetails>} - Success response
|
|
1327
667
|
* @name enableOrDisableRefundTransferMode
|
|
1328
668
|
* @summary: Toggle refund mode
|
|
1329
669
|
* @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 +672,6 @@ class Payment {
|
|
|
1332
672
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1333
673
|
{ responseHeaders } = { responseHeaders: false }
|
|
1334
674
|
) {
|
|
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
675
|
const query_params = {};
|
|
1360
676
|
|
|
1361
677
|
const xHeaders = {};
|
|
@@ -1378,34 +694,13 @@ class Payment {
|
|
|
1378
694
|
responseData = response[0];
|
|
1379
695
|
}
|
|
1380
696
|
|
|
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
697
|
return response;
|
|
1400
698
|
}
|
|
1401
699
|
|
|
1402
700
|
/**
|
|
1403
|
-
* @param {PaymentApplicationValidator.GetActiveCardAggregatorParam} arg - Arg object.
|
|
1404
701
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1405
702
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1406
|
-
* @returns {Promise<
|
|
1407
|
-
* - Success response
|
|
1408
|
-
*
|
|
703
|
+
* @returns {Promise<ActiveCardPaymentGatewayDetails>} - Success response
|
|
1409
704
|
* @name getActiveCardAggregator
|
|
1410
705
|
* @summary: Retrieve active card aggregator
|
|
1411
706
|
* @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 +709,6 @@ class Payment {
|
|
|
1414
709
|
{ refresh, requestHeaders } = { requestHeaders: {} },
|
|
1415
710
|
{ responseHeaders } = { responseHeaders: false }
|
|
1416
711
|
) {
|
|
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
712
|
const query_params = {};
|
|
1442
713
|
query_params["refresh"] = refresh;
|
|
1443
714
|
|
|
@@ -1461,34 +732,13 @@ class Payment {
|
|
|
1461
732
|
responseData = response[0];
|
|
1462
733
|
}
|
|
1463
734
|
|
|
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
735
|
return response;
|
|
1483
736
|
}
|
|
1484
737
|
|
|
1485
738
|
/**
|
|
1486
|
-
* @param {PaymentApplicationValidator.GetActiveRefundTransferModesParam} arg
|
|
1487
|
-
* - Arg object.
|
|
1488
|
-
*
|
|
1489
739
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1490
740
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1491
|
-
* @returns {Promise<
|
|
741
|
+
* @returns {Promise<TransferModeFetchDetails>} - Success response
|
|
1492
742
|
* @name getActiveRefundTransferModes
|
|
1493
743
|
* @summary: Get refund transfer modes
|
|
1494
744
|
* @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 +747,6 @@ class Payment {
|
|
|
1497
747
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1498
748
|
{ responseHeaders } = { responseHeaders: false }
|
|
1499
749
|
) {
|
|
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
750
|
const query_params = {};
|
|
1525
751
|
|
|
1526
752
|
const xHeaders = {};
|
|
@@ -1543,32 +769,13 @@ class Payment {
|
|
|
1543
769
|
responseData = response[0];
|
|
1544
770
|
}
|
|
1545
771
|
|
|
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
772
|
return response;
|
|
1565
773
|
}
|
|
1566
774
|
|
|
1567
775
|
/**
|
|
1568
|
-
* @param {PaymentApplicationValidator.GetActiveUserCardsParam} arg - Arg object.
|
|
1569
776
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1570
777
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1571
|
-
* @returns {Promise<
|
|
778
|
+
* @returns {Promise<ListCardsDetails>} - Success response
|
|
1572
779
|
* @name getActiveUserCards
|
|
1573
780
|
* @summary: Get customer cards
|
|
1574
781
|
* @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 +784,6 @@ class Payment {
|
|
|
1577
784
|
{ forceRefresh, requestHeaders } = { requestHeaders: {} },
|
|
1578
785
|
{ responseHeaders } = { responseHeaders: false }
|
|
1579
786
|
) {
|
|
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
787
|
const query_params = {};
|
|
1603
788
|
query_params["force_refresh"] = forceRefresh;
|
|
1604
789
|
|
|
@@ -1622,34 +807,13 @@ class Payment {
|
|
|
1622
807
|
responseData = response[0];
|
|
1623
808
|
}
|
|
1624
809
|
|
|
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
810
|
return response;
|
|
1644
811
|
}
|
|
1645
812
|
|
|
1646
813
|
/**
|
|
1647
|
-
* @param {PaymentApplicationValidator.GetAggregatorsConfigParam} arg - Arg object.
|
|
1648
814
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1649
815
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1650
|
-
* @returns {Promise<
|
|
1651
|
-
* - Success response
|
|
1652
|
-
*
|
|
816
|
+
* @returns {Promise<AggregatorsConfigDetail>} - Success response
|
|
1653
817
|
* @name getAggregatorsConfig
|
|
1654
818
|
* @summary: Get payment aggregators
|
|
1655
819
|
* @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 +822,6 @@ class Payment {
|
|
|
1658
822
|
{ xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
|
|
1659
823
|
{ responseHeaders } = { responseHeaders: false }
|
|
1660
824
|
) {
|
|
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
825
|
const query_params = {};
|
|
1686
826
|
query_params["refresh"] = refresh;
|
|
1687
827
|
|
|
@@ -1706,35 +846,13 @@ class Payment {
|
|
|
1706
846
|
responseData = response[0];
|
|
1707
847
|
}
|
|
1708
848
|
|
|
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
849
|
return response;
|
|
1728
850
|
}
|
|
1729
851
|
|
|
1730
852
|
/**
|
|
1731
|
-
* @param {PaymentApplicationValidator.GetEpaylaterBannerDetailsParam} arg
|
|
1732
|
-
* - Arg object.
|
|
1733
|
-
*
|
|
1734
853
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1735
854
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1736
|
-
* @returns {Promise<
|
|
1737
|
-
* Success response
|
|
855
|
+
* @returns {Promise<EpaylaterBannerDetails>} - Success response
|
|
1738
856
|
* @name getEpaylaterBannerDetails
|
|
1739
857
|
* @summary: Epaylater banner info
|
|
1740
858
|
* @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 +861,6 @@ class Payment {
|
|
|
1743
861
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1744
862
|
{ responseHeaders } = { responseHeaders: false }
|
|
1745
863
|
) {
|
|
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
864
|
const query_params = {};
|
|
1771
865
|
|
|
1772
866
|
const xHeaders = {};
|
|
@@ -1789,35 +883,13 @@ class Payment {
|
|
|
1789
883
|
responseData = response[0];
|
|
1790
884
|
}
|
|
1791
885
|
|
|
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
886
|
return response;
|
|
1811
887
|
}
|
|
1812
888
|
|
|
1813
889
|
/**
|
|
1814
|
-
* @param {PaymentApplicationValidator.GetOrderBeneficiariesDetailParam} arg
|
|
1815
|
-
* - Arg object.
|
|
1816
|
-
*
|
|
1817
890
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1818
891
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1819
|
-
* @returns {Promise<
|
|
1820
|
-
* Success response
|
|
892
|
+
* @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
|
|
1821
893
|
* @name getOrderBeneficiariesDetail
|
|
1822
894
|
* @summary: Retrieve beneficiary details
|
|
1823
895
|
* @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 +898,6 @@ class Payment {
|
|
|
1826
898
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1827
899
|
{ responseHeaders } = { responseHeaders: false }
|
|
1828
900
|
) {
|
|
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
901
|
const query_params = {};
|
|
1854
902
|
query_params["order_id"] = orderId;
|
|
1855
903
|
|
|
@@ -1873,33 +921,13 @@ class Payment {
|
|
|
1873
921
|
responseData = response[0];
|
|
1874
922
|
}
|
|
1875
923
|
|
|
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
924
|
return response;
|
|
1895
925
|
}
|
|
1896
926
|
|
|
1897
927
|
/**
|
|
1898
|
-
* @param {PaymentApplicationValidator.GetPaymentLinkParam} arg - Arg object.
|
|
1899
928
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1900
929
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1901
|
-
* @returns {Promise<
|
|
1902
|
-
* Success response
|
|
930
|
+
* @returns {Promise<GetPaymentLinkDetails>} - Success response
|
|
1903
931
|
* @name getPaymentLink
|
|
1904
932
|
* @summary: Get payment link
|
|
1905
933
|
* @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
|
|
@@ -1908,28 +936,6 @@ class Payment {
|
|
|
1908
936
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1909
937
|
{ responseHeaders } = { responseHeaders: false }
|
|
1910
938
|
) {
|
|
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
939
|
const query_params = {};
|
|
1934
940
|
query_params["payment_link_id"] = paymentLinkId;
|
|
1935
941
|
|
|
@@ -1953,33 +959,13 @@ class Payment {
|
|
|
1953
959
|
responseData = response[0];
|
|
1954
960
|
}
|
|
1955
961
|
|
|
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
962
|
return response;
|
|
1975
963
|
}
|
|
1976
964
|
|
|
1977
965
|
/**
|
|
1978
|
-
* @param {PaymentApplicationValidator.GetPaymentModeRoutesParam} arg - Arg object.
|
|
1979
966
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1980
967
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1981
|
-
* @returns {Promise<
|
|
1982
|
-
* Success response
|
|
968
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
1983
969
|
* @name getPaymentModeRoutes
|
|
1984
970
|
* @summary: Get payment modes
|
|
1985
971
|
* @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 +986,6 @@ class Payment {
|
|
|
2000
986
|
} = { requestHeaders: {} },
|
|
2001
987
|
{ responseHeaders } = { responseHeaders: false }
|
|
2002
988
|
) {
|
|
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
989
|
const query_params = {};
|
|
2050
990
|
query_params["amount"] = amount;
|
|
2051
991
|
query_params["cart_id"] = cartId;
|
|
@@ -2078,35 +1018,13 @@ class Payment {
|
|
|
2078
1018
|
responseData = response[0];
|
|
2079
1019
|
}
|
|
2080
1020
|
|
|
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
1021
|
return response;
|
|
2100
1022
|
}
|
|
2101
1023
|
|
|
2102
1024
|
/**
|
|
2103
|
-
* @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg
|
|
2104
|
-
* - Arg object.
|
|
2105
|
-
*
|
|
2106
1025
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2107
1026
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2108
|
-
* @returns {Promise<
|
|
2109
|
-
* Success response
|
|
1027
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
2110
1028
|
* @name getPaymentModeRoutesPaymentLink
|
|
2111
1029
|
* @summary: Payment modes for payment link
|
|
2112
1030
|
* @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 +1033,6 @@ class Payment {
|
|
|
2115
1033
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2116
1034
|
{ responseHeaders } = { responseHeaders: false }
|
|
2117
1035
|
) {
|
|
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
1036
|
const query_params = {};
|
|
2143
1037
|
query_params["payment_link_id"] = paymentLinkId;
|
|
2144
1038
|
|
|
@@ -2162,33 +1056,13 @@ class Payment {
|
|
|
2162
1056
|
responseData = response[0];
|
|
2163
1057
|
}
|
|
2164
1058
|
|
|
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
1059
|
return response;
|
|
2184
1060
|
}
|
|
2185
1061
|
|
|
2186
1062
|
/**
|
|
2187
|
-
* @param {PaymentApplicationValidator.GetPosPaymentModeRoutesParam} arg - Arg object.
|
|
2188
1063
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2189
1064
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2190
|
-
* @returns {Promise<
|
|
2191
|
-
* Success response
|
|
1065
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
2192
1066
|
* @name getPosPaymentModeRoutes
|
|
2193
1067
|
* @summary: POS payment modes
|
|
2194
1068
|
* @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 +1070,9 @@ class Payment {
|
|
|
2196
1070
|
async getPosPaymentModeRoutes(
|
|
2197
1071
|
{
|
|
2198
1072
|
amount,
|
|
1073
|
+
cartId,
|
|
2199
1074
|
pincode,
|
|
2200
1075
|
orderType,
|
|
2201
|
-
cartId,
|
|
2202
1076
|
checkoutMode,
|
|
2203
1077
|
refresh,
|
|
2204
1078
|
cardReference,
|
|
@@ -2207,48 +1081,6 @@ class Payment {
|
|
|
2207
1081
|
} = { requestHeaders: {} },
|
|
2208
1082
|
{ responseHeaders } = { responseHeaders: false }
|
|
2209
1083
|
) {
|
|
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
1084
|
const query_params = {};
|
|
2253
1085
|
query_params["amount"] = amount;
|
|
2254
1086
|
query_params["cart_id"] = cartId;
|
|
@@ -2279,32 +1111,13 @@ class Payment {
|
|
|
2279
1111
|
responseData = response[0];
|
|
2280
1112
|
}
|
|
2281
1113
|
|
|
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
1114
|
return response;
|
|
2301
1115
|
}
|
|
2302
1116
|
|
|
2303
1117
|
/**
|
|
2304
|
-
* @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object.
|
|
2305
1118
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2306
1119
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2307
|
-
* @returns {Promise<
|
|
1120
|
+
* @returns {Promise<RupifiBannerDetails>} - Success response
|
|
2308
1121
|
* @name getRupifiBannerDetails
|
|
2309
1122
|
* @summary: Rupifi banner info
|
|
2310
1123
|
* @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 +1126,6 @@ class Payment {
|
|
|
2313
1126
|
{ requestHeaders } = { requestHeaders: {} },
|
|
2314
1127
|
{ responseHeaders } = { responseHeaders: false }
|
|
2315
1128
|
) {
|
|
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
1129
|
const query_params = {};
|
|
2341
1130
|
|
|
2342
1131
|
const xHeaders = {};
|
|
@@ -2359,35 +1148,13 @@ class Payment {
|
|
|
2359
1148
|
responseData = response[0];
|
|
2360
1149
|
}
|
|
2361
1150
|
|
|
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
1151
|
return response;
|
|
2381
1152
|
}
|
|
2382
1153
|
|
|
2383
1154
|
/**
|
|
2384
|
-
* @param {PaymentApplicationValidator.GetUserBeneficiariesDetailParam} arg
|
|
2385
|
-
* - Arg object.
|
|
2386
|
-
*
|
|
2387
1155
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2388
1156
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2389
|
-
* @returns {Promise<
|
|
2390
|
-
* Success response
|
|
1157
|
+
* @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
|
|
2391
1158
|
* @name getUserBeneficiariesDetail
|
|
2392
1159
|
* @summary: Retrieve beneficiary details
|
|
2393
1160
|
* @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 +1163,6 @@ class Payment {
|
|
|
2396
1163
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
2397
1164
|
{ responseHeaders } = { responseHeaders: false }
|
|
2398
1165
|
) {
|
|
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
1166
|
const query_params = {};
|
|
2424
1167
|
query_params["order_id"] = orderId;
|
|
2425
1168
|
|
|
@@ -2443,34 +1186,13 @@ class Payment {
|
|
|
2443
1186
|
responseData = response[0];
|
|
2444
1187
|
}
|
|
2445
1188
|
|
|
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
1189
|
return response;
|
|
2465
1190
|
}
|
|
2466
1191
|
|
|
2467
1192
|
/**
|
|
2468
|
-
* @param {PaymentApplicationValidator.InitialisePaymentParam} arg - Arg object.
|
|
2469
1193
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2470
1194
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2471
|
-
* @returns {Promise<
|
|
2472
|
-
* - Success response
|
|
2473
|
-
*
|
|
1195
|
+
* @returns {Promise<PaymentInitializationDetails>} - Success response
|
|
2474
1196
|
* @name initialisePayment
|
|
2475
1197
|
* @summary: Start payment process
|
|
2476
1198
|
* @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 +1201,6 @@ class Payment {
|
|
|
2479
1201
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2480
1202
|
{ responseHeaders } = { responseHeaders: false }
|
|
2481
1203
|
) {
|
|
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
1204
|
const query_params = {};
|
|
2505
1205
|
|
|
2506
1206
|
const xHeaders = {};
|
|
@@ -2523,36 +1223,13 @@ class Payment {
|
|
|
2523
1223
|
responseData = response[0];
|
|
2524
1224
|
}
|
|
2525
1225
|
|
|
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
1226
|
return response;
|
|
2545
1227
|
}
|
|
2546
1228
|
|
|
2547
1229
|
/**
|
|
2548
|
-
* @param {PaymentApplicationValidator.InitialisePaymentPaymentLinkParam} arg
|
|
2549
|
-
* - Arg object.
|
|
2550
|
-
*
|
|
2551
1230
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2552
1231
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2553
|
-
* @returns {Promise<
|
|
2554
|
-
* - Success response
|
|
2555
|
-
*
|
|
1232
|
+
* @returns {Promise<PaymentInitializationDetails>} - Success response
|
|
2556
1233
|
* @name initialisePaymentPaymentLink
|
|
2557
1234
|
* @summary: Initialize payment link
|
|
2558
1235
|
* @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 +1238,6 @@ class Payment {
|
|
|
2561
1238
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2562
1239
|
{ responseHeaders } = { responseHeaders: false }
|
|
2563
1240
|
) {
|
|
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
1241
|
const query_params = {};
|
|
2589
1242
|
|
|
2590
1243
|
const xHeaders = {};
|
|
@@ -2607,32 +1260,13 @@ class Payment {
|
|
|
2607
1260
|
responseData = response[0];
|
|
2608
1261
|
}
|
|
2609
1262
|
|
|
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
1263
|
return response;
|
|
2629
1264
|
}
|
|
2630
1265
|
|
|
2631
1266
|
/**
|
|
2632
|
-
* @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object.
|
|
2633
1267
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2634
1268
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2635
|
-
* @returns {Promise<
|
|
1269
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
2636
1270
|
* @name linkWallet
|
|
2637
1271
|
* @summary: OTP verification
|
|
2638
1272
|
* @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 +1275,6 @@ class Payment {
|
|
|
2641
1275
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2642
1276
|
{ responseHeaders } = { responseHeaders: false }
|
|
2643
1277
|
) {
|
|
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
1278
|
const query_params = {};
|
|
2667
1279
|
|
|
2668
1280
|
const xHeaders = {};
|
|
@@ -2685,34 +1297,13 @@ class Payment {
|
|
|
2685
1297
|
responseData = response[0];
|
|
2686
1298
|
}
|
|
2687
1299
|
|
|
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
1300
|
return response;
|
|
2707
1301
|
}
|
|
2708
1302
|
|
|
2709
1303
|
/**
|
|
2710
|
-
* @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
|
|
2711
1304
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2712
1305
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2713
|
-
* @returns {Promise<
|
|
2714
|
-
* - Success response
|
|
2715
|
-
*
|
|
1306
|
+
* @returns {Promise<OutstandingOrderDetails>} - Success response
|
|
2716
1307
|
* @name outstandingOrderDetails
|
|
2717
1308
|
* @summary: Outstanding orders
|
|
2718
1309
|
* @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
|
|
@@ -2721,30 +1312,6 @@ class Payment {
|
|
|
2721
1312
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2722
1313
|
{ responseHeaders } = { responseHeaders: false }
|
|
2723
1314
|
) {
|
|
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
1315
|
const query_params = {};
|
|
2749
1316
|
query_params["aggregator"] = aggregator;
|
|
2750
1317
|
|
|
@@ -2768,33 +1335,13 @@ class Payment {
|
|
|
2768
1335
|
responseData = response[0];
|
|
2769
1336
|
}
|
|
2770
1337
|
|
|
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
1338
|
return response;
|
|
2790
1339
|
}
|
|
2791
1340
|
|
|
2792
1341
|
/**
|
|
2793
|
-
* @param {PaymentApplicationValidator.PaidOrderDetailsParam} arg - Arg object.
|
|
2794
1342
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2795
1343
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2796
|
-
* @returns {Promise<
|
|
2797
|
-
* Success response
|
|
1344
|
+
* @returns {Promise<PaidOrderDetails>} - Success response
|
|
2798
1345
|
* @name paidOrderDetails
|
|
2799
1346
|
* @summary: Retrieve details of paid orders
|
|
2800
1347
|
* @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 +1350,6 @@ class Payment {
|
|
|
2803
1350
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2804
1351
|
{ responseHeaders } = { responseHeaders: false }
|
|
2805
1352
|
) {
|
|
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
1353
|
const query_params = {};
|
|
2829
1354
|
query_params["aggregator"] = aggregator;
|
|
2830
1355
|
|
|
@@ -2848,33 +1373,13 @@ class Payment {
|
|
|
2848
1373
|
responseData = response[0];
|
|
2849
1374
|
}
|
|
2850
1375
|
|
|
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
1376
|
return response;
|
|
2870
1377
|
}
|
|
2871
1378
|
|
|
2872
1379
|
/**
|
|
2873
|
-
* @param {PaymentApplicationValidator.PollingPaymentLinkParam} arg - Arg object.
|
|
2874
1380
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2875
1381
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2876
|
-
* @returns {Promise<
|
|
2877
|
-
* Success response
|
|
1382
|
+
* @returns {Promise<PollingPaymentLinkDetails>} - Success response
|
|
2878
1383
|
* @name pollingPaymentLink
|
|
2879
1384
|
* @summary: Poll status of payment link
|
|
2880
1385
|
* @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 +1388,6 @@ class Payment {
|
|
|
2883
1388
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2884
1389
|
{ responseHeaders } = { responseHeaders: false }
|
|
2885
1390
|
) {
|
|
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
1391
|
const query_params = {};
|
|
2909
1392
|
query_params["payment_link_id"] = paymentLinkId;
|
|
2910
1393
|
|
|
@@ -2928,66 +1411,21 @@ class Payment {
|
|
|
2928
1411
|
responseData = response[0];
|
|
2929
1412
|
}
|
|
2930
1413
|
|
|
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
1414
|
return response;
|
|
2950
1415
|
}
|
|
2951
1416
|
|
|
2952
1417
|
/**
|
|
2953
|
-
* @param {PaymentApplicationValidator.RedirectToAggregatorParam} arg - Arg object.
|
|
2954
1418
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2955
1419
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2956
|
-
* @returns {Promise<
|
|
2957
|
-
* - Success response
|
|
2958
|
-
*
|
|
1420
|
+
* @returns {Promise<RedirectToAggregatorDetails>} - Success response
|
|
2959
1421
|
* @name redirectToAggregator
|
|
2960
1422
|
* @summary: Redirects users to the payment aggregator's interface
|
|
2961
|
-
* @description:
|
|
1423
|
+
* @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
1424
|
*/
|
|
2963
1425
|
async redirectToAggregator(
|
|
2964
|
-
{
|
|
1426
|
+
{ aggregator, source, requestHeaders } = { requestHeaders: {} },
|
|
2965
1427
|
{ responseHeaders } = { responseHeaders: false }
|
|
2966
1428
|
) {
|
|
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
1429
|
const query_params = {};
|
|
2992
1430
|
query_params["source"] = source;
|
|
2993
1431
|
query_params["aggregator"] = aggregator;
|
|
@@ -3012,32 +1450,13 @@ class Payment {
|
|
|
3012
1450
|
responseData = response[0];
|
|
3013
1451
|
}
|
|
3014
1452
|
|
|
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
1453
|
return response;
|
|
3034
1454
|
}
|
|
3035
1455
|
|
|
3036
1456
|
/**
|
|
3037
|
-
* @param {PaymentApplicationValidator.RenderHTMLParam} arg - Arg object.
|
|
3038
1457
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3039
1458
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3040
|
-
* @returns {Promise<
|
|
1459
|
+
* @returns {Promise<RenderHTMLDetails>} - Success response
|
|
3041
1460
|
* @name renderHTML
|
|
3042
1461
|
* @summary: Render HTML
|
|
3043
1462
|
* @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
|
|
@@ -3046,28 +1465,6 @@ class Payment {
|
|
|
3046
1465
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3047
1466
|
{ responseHeaders } = { responseHeaders: false }
|
|
3048
1467
|
) {
|
|
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
1468
|
const query_params = {};
|
|
3072
1469
|
|
|
3073
1470
|
const xHeaders = {};
|
|
@@ -3090,34 +1487,13 @@ class Payment {
|
|
|
3090
1487
|
responseData = response[0];
|
|
3091
1488
|
}
|
|
3092
1489
|
|
|
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
1490
|
return response;
|
|
3112
1491
|
}
|
|
3113
1492
|
|
|
3114
1493
|
/**
|
|
3115
|
-
* @param {PaymentApplicationValidator.ResendOrCancelPaymentParam} arg - Arg object.
|
|
3116
1494
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3117
1495
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3118
|
-
* @returns {Promise<
|
|
3119
|
-
* - Success response
|
|
3120
|
-
*
|
|
1496
|
+
* @returns {Promise<ResendOrCancelPaymentDetails>} - Success response
|
|
3121
1497
|
* @name resendOrCancelPayment
|
|
3122
1498
|
* @summary: Resend or cancel a pending payment transaction
|
|
3123
1499
|
* @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 +1502,6 @@ class Payment {
|
|
|
3126
1502
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3127
1503
|
{ responseHeaders } = { responseHeaders: false }
|
|
3128
1504
|
) {
|
|
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
1505
|
const query_params = {};
|
|
3154
1506
|
|
|
3155
1507
|
const xHeaders = {};
|
|
@@ -3172,33 +1524,13 @@ class Payment {
|
|
|
3172
1524
|
responseData = response[0];
|
|
3173
1525
|
}
|
|
3174
1526
|
|
|
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
1527
|
return response;
|
|
3194
1528
|
}
|
|
3195
1529
|
|
|
3196
1530
|
/**
|
|
3197
|
-
* @param {PaymentApplicationValidator.ResendPaymentLinkParam} arg - Arg object.
|
|
3198
1531
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3199
1532
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3200
|
-
* @returns {Promise<
|
|
3201
|
-
* Success response
|
|
1533
|
+
* @returns {Promise<ResendPaymentLinkDetails>} - Success response
|
|
3202
1534
|
* @name resendPaymentLink
|
|
3203
1535
|
* @summary: Resend payment link
|
|
3204
1536
|
* @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 +1539,6 @@ class Payment {
|
|
|
3207
1539
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3208
1540
|
{ responseHeaders } = { responseHeaders: false }
|
|
3209
1541
|
) {
|
|
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
1542
|
const query_params = {};
|
|
3233
1543
|
|
|
3234
1544
|
const xHeaders = {};
|
|
@@ -3251,35 +1561,13 @@ class Payment {
|
|
|
3251
1561
|
responseData = response[0];
|
|
3252
1562
|
}
|
|
3253
1563
|
|
|
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
1564
|
return response;
|
|
3273
1565
|
}
|
|
3274
1566
|
|
|
3275
1567
|
/**
|
|
3276
|
-
* @param {PaymentApplicationValidator.UpdateDefaultBeneficiaryParam} arg -
|
|
3277
|
-
* Arg object.
|
|
3278
1568
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3279
1569
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3280
|
-
* @returns {Promise<
|
|
3281
|
-
* - Success response
|
|
3282
|
-
*
|
|
1570
|
+
* @returns {Promise<SetDefaultBeneficiaryDetails>} - Success response
|
|
3283
1571
|
* @name updateDefaultBeneficiary
|
|
3284
1572
|
* @summary: Set default beneficiary for refund
|
|
3285
1573
|
* @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 +1576,6 @@ class Payment {
|
|
|
3288
1576
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3289
1577
|
{ responseHeaders } = { responseHeaders: false }
|
|
3290
1578
|
) {
|
|
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
1579
|
const query_params = {};
|
|
3316
1580
|
|
|
3317
1581
|
const xHeaders = {};
|
|
@@ -3334,32 +1598,50 @@ class Payment {
|
|
|
3334
1598
|
responseData = response[0];
|
|
3335
1599
|
}
|
|
3336
1600
|
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
1601
|
+
return response;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1606
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1607
|
+
* @returns {Promise<ValidateCustomerCreditSchema>} - Success response
|
|
1608
|
+
* @name validateCustomerAndCreditSummary
|
|
1609
|
+
* @summary: Verify payment customer and show credit summary
|
|
1610
|
+
* @description: Verify if the user is eligible for payment and also show credit summary if activated. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateCustomerAndCreditSummary/).
|
|
1611
|
+
*/
|
|
1612
|
+
async validateCustomerAndCreditSummary(
|
|
1613
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1614
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1615
|
+
) {
|
|
1616
|
+
const query_params = {};
|
|
1617
|
+
|
|
1618
|
+
const xHeaders = {};
|
|
1619
|
+
|
|
1620
|
+
const response = await ApplicationAPIClient.execute(
|
|
1621
|
+
this._conf,
|
|
1622
|
+
"post",
|
|
1623
|
+
constructUrl({
|
|
1624
|
+
url: this._urls["validateCustomerAndCreditSummary"],
|
|
1625
|
+
params: {},
|
|
1626
|
+
}),
|
|
1627
|
+
query_params,
|
|
1628
|
+
body,
|
|
1629
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1630
|
+
{ responseHeaders }
|
|
3342
1631
|
);
|
|
3343
1632
|
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
} else {
|
|
3348
|
-
Logger({
|
|
3349
|
-
level: "WARN",
|
|
3350
|
-
message: `Response Validation Warnings for application > Payment > updateDefaultBeneficiary \n ${res_error}`,
|
|
3351
|
-
});
|
|
3352
|
-
}
|
|
1633
|
+
let responseData = response;
|
|
1634
|
+
if (responseHeaders) {
|
|
1635
|
+
responseData = response[0];
|
|
3353
1636
|
}
|
|
3354
1637
|
|
|
3355
1638
|
return response;
|
|
3356
1639
|
}
|
|
3357
1640
|
|
|
3358
1641
|
/**
|
|
3359
|
-
* @param {PaymentApplicationValidator.ValidateVPAParam} arg - Arg object.
|
|
3360
1642
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3361
1643
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3362
|
-
* @returns {Promise<
|
|
1644
|
+
* @returns {Promise<ValidateVPADetails>} - Success response
|
|
3363
1645
|
* @name validateVPA
|
|
3364
1646
|
* @summary: Validate VPA
|
|
3365
1647
|
* @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 +1650,6 @@ class Payment {
|
|
|
3368
1650
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3369
1651
|
{ responseHeaders } = { responseHeaders: false }
|
|
3370
1652
|
) {
|
|
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
1653
|
const query_params = {};
|
|
3394
1654
|
|
|
3395
1655
|
const xHeaders = {};
|
|
@@ -3412,33 +1672,13 @@ class Payment {
|
|
|
3412
1672
|
responseData = response[0];
|
|
3413
1673
|
}
|
|
3414
1674
|
|
|
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
1675
|
return response;
|
|
3434
1676
|
}
|
|
3435
1677
|
|
|
3436
1678
|
/**
|
|
3437
|
-
* @param {PaymentApplicationValidator.VerifyAndChargePaymentParam} arg - Arg object.
|
|
3438
1679
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3439
1680
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3440
|
-
* @returns {Promise<
|
|
3441
|
-
* Success response
|
|
1681
|
+
* @returns {Promise<ChargeCustomerDetails>} - Success response
|
|
3442
1682
|
* @name verifyAndChargePayment
|
|
3443
1683
|
* @summary: Verify order confirmation and charge
|
|
3444
1684
|
* @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 +1687,6 @@ class Payment {
|
|
|
3447
1687
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3448
1688
|
{ responseHeaders } = { responseHeaders: false }
|
|
3449
1689
|
) {
|
|
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
1690
|
const query_params = {};
|
|
3475
1691
|
|
|
3476
1692
|
const xHeaders = {};
|
|
@@ -3493,34 +1709,13 @@ class Payment {
|
|
|
3493
1709
|
responseData = response[0];
|
|
3494
1710
|
}
|
|
3495
1711
|
|
|
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
1712
|
return response;
|
|
3515
1713
|
}
|
|
3516
1714
|
|
|
3517
1715
|
/**
|
|
3518
|
-
* @param {PaymentApplicationValidator.VerifyCustomerForPaymentParam} arg -
|
|
3519
|
-
* Arg object.
|
|
3520
1716
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3521
1717
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3522
|
-
* @returns {Promise<
|
|
3523
|
-
* Success response
|
|
1718
|
+
* @returns {Promise<ValidateCustomerDetails>} - Success response
|
|
3524
1719
|
* @name verifyCustomerForPayment
|
|
3525
1720
|
* @summary: Verify payment customer
|
|
3526
1721
|
* @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 +1724,6 @@ class Payment {
|
|
|
3529
1724
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3530
1725
|
{ responseHeaders } = { responseHeaders: false }
|
|
3531
1726
|
) {
|
|
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
1727
|
const query_params = {};
|
|
3557
1728
|
|
|
3558
1729
|
const xHeaders = {};
|
|
@@ -3575,32 +1746,13 @@ class Payment {
|
|
|
3575
1746
|
responseData = response[0];
|
|
3576
1747
|
}
|
|
3577
1748
|
|
|
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
1749
|
return response;
|
|
3597
1750
|
}
|
|
3598
1751
|
|
|
3599
1752
|
/**
|
|
3600
|
-
* @param {PaymentApplicationValidator.VerifyIfscCodeParam} arg - Arg object.
|
|
3601
1753
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3602
1754
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3603
|
-
* @returns {Promise<
|
|
1755
|
+
* @returns {Promise<IfscCodeDetails>} - Success response
|
|
3604
1756
|
* @name verifyIfscCode
|
|
3605
1757
|
* @summary: Verify IFSC
|
|
3606
1758
|
* @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 +1761,6 @@ class Payment {
|
|
|
3609
1761
|
{ ifscCode, requestHeaders } = { requestHeaders: {} },
|
|
3610
1762
|
{ responseHeaders } = { responseHeaders: false }
|
|
3611
1763
|
) {
|
|
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
1764
|
const query_params = {};
|
|
3635
1765
|
query_params["ifsc_code"] = ifscCode;
|
|
3636
1766
|
|
|
@@ -3654,36 +1784,13 @@ class Payment {
|
|
|
3654
1784
|
responseData = response[0];
|
|
3655
1785
|
}
|
|
3656
1786
|
|
|
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
1787
|
return response;
|
|
3676
1788
|
}
|
|
3677
1789
|
|
|
3678
1790
|
/**
|
|
3679
|
-
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForBankParam} arg
|
|
3680
|
-
* - Arg object.
|
|
3681
|
-
*
|
|
3682
1791
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3683
1792
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3684
|
-
* @returns {Promise<
|
|
3685
|
-
* - Success response
|
|
3686
|
-
*
|
|
1793
|
+
* @returns {Promise<AddBeneficiaryViaOtpVerificationDetails>} - Success response
|
|
3687
1794
|
* @name verifyOtpAndAddBeneficiaryForBank
|
|
3688
1795
|
* @summary: Verify OTP for bank and add beneficiary
|
|
3689
1796
|
* @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 +1799,6 @@ class Payment {
|
|
|
3692
1799
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3693
1800
|
{ responseHeaders } = { responseHeaders: false }
|
|
3694
1801
|
) {
|
|
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
1802
|
const query_params = {};
|
|
3720
1803
|
|
|
3721
1804
|
const xHeaders = {};
|
|
@@ -3738,34 +1821,13 @@ class Payment {
|
|
|
3738
1821
|
responseData = response[0];
|
|
3739
1822
|
}
|
|
3740
1823
|
|
|
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
1824
|
return response;
|
|
3760
1825
|
}
|
|
3761
1826
|
|
|
3762
1827
|
/**
|
|
3763
|
-
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam} arg
|
|
3764
|
-
* - Arg object.
|
|
3765
|
-
*
|
|
3766
1828
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3767
1829
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3768
|
-
* @returns {Promise<
|
|
1830
|
+
* @returns {Promise<WalletOtpDetails>} - Success response
|
|
3769
1831
|
* @name verifyOtpAndAddBeneficiaryForWallet
|
|
3770
1832
|
* @summary: Verify OTP for wallet
|
|
3771
1833
|
* @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 +1836,6 @@ class Payment {
|
|
|
3774
1836
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3775
1837
|
{ responseHeaders } = { responseHeaders: false }
|
|
3776
1838
|
) {
|
|
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
1839
|
const query_params = {};
|
|
3802
1840
|
|
|
3803
1841
|
const xHeaders = {};
|
|
@@ -3820,32 +1858,13 @@ class Payment {
|
|
|
3820
1858
|
responseData = response[0];
|
|
3821
1859
|
}
|
|
3822
1860
|
|
|
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
1861
|
return response;
|
|
3842
1862
|
}
|
|
3843
1863
|
|
|
3844
1864
|
/**
|
|
3845
|
-
* @param {PaymentApplicationValidator.WalletLinkInitiateParam} arg - Arg object.
|
|
3846
1865
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3847
1866
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3848
|
-
* @returns {Promise<
|
|
1867
|
+
* @returns {Promise<WalletResponseSchema>} - Success response
|
|
3849
1868
|
* @name walletLinkInitiate
|
|
3850
1869
|
* @summary: Initiate linking of wallet
|
|
3851
1870
|
* @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 +1873,6 @@ class Payment {
|
|
|
3854
1873
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3855
1874
|
{ responseHeaders } = { responseHeaders: false }
|
|
3856
1875
|
) {
|
|
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
1876
|
const query_params = {};
|
|
3880
1877
|
|
|
3881
1878
|
const xHeaders = {};
|
|
@@ -3898,24 +1895,6 @@ class Payment {
|
|
|
3898
1895
|
responseData = response[0];
|
|
3899
1896
|
}
|
|
3900
1897
|
|
|
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
1898
|
return response;
|
|
3920
1899
|
}
|
|
3921
1900
|
}
|