@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- 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 +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- 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/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- 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 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Payment {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -16,24 +17,21 @@ class Payment {
|
|
|
16
17
|
"/service/application/payment/v1.0/refund/account/otp",
|
|
17
18
|
attachCardToCustomer: "/service/application/payment/v1.0/card/attach",
|
|
18
19
|
cancelPaymentLink:
|
|
19
|
-
"/service/application/payment/v1.0/cancel-payment-link",
|
|
20
|
+
"/service/application/payment/v1.0/cancel-payment-link/",
|
|
20
21
|
cardDetails: "/service/application/payment/v1.0/cards/info/{card_info}",
|
|
21
22
|
checkAndUpdatePaymentStatus:
|
|
22
23
|
"/service/application/payment/v1.0/payment/confirm/polling",
|
|
23
24
|
checkAndUpdatePaymentStatusPaymentLink:
|
|
24
|
-
"/service/application/payment/v1.0/payment/confirm/polling/link",
|
|
25
|
-
checkCredit: "/service/application/payment/v1.0/check-credits",
|
|
26
|
-
confirmPayment: "/service/application/payment/v1.0/payment/confirm",
|
|
25
|
+
"/service/application/payment/v1.0/payment/confirm/polling/link/",
|
|
26
|
+
checkCredit: "/service/application/payment/v1.0/check-credits/",
|
|
27
27
|
createOrderHandlerPaymentLink:
|
|
28
|
-
"/service/application/payment/v1.0/create-order/link",
|
|
28
|
+
"/service/application/payment/v1.0/create-order/link/",
|
|
29
29
|
createPaymentLink:
|
|
30
|
-
"/service/application/payment/v1.0/create-payment-link",
|
|
31
|
-
createPaymentOrder: "/service/application/payment/v1.0/payment-orders",
|
|
30
|
+
"/service/application/payment/v1.0/create-payment-link/",
|
|
31
|
+
createPaymentOrder: "/service/application/payment/v1.0/payment-orders/",
|
|
32
32
|
customerCreditSummary:
|
|
33
|
-
"/service/application/payment/v1.0/payment/credit-summary",
|
|
34
|
-
customerOnboard: "/service/application/payment/v1.0/credit-onboard",
|
|
35
|
-
deleteBeneficiaryDetails:
|
|
36
|
-
"/service/application/payment/v1.0/refund/account",
|
|
33
|
+
"/service/application/payment/v1.0/payment/credit-summary/",
|
|
34
|
+
customerOnboard: "/service/application/payment/v1.0/credit-onboard/",
|
|
37
35
|
deleteUserCard: "/service/application/payment/v1.0/card/remove",
|
|
38
36
|
delinkWallet:
|
|
39
37
|
"/service/application/payment/v1.0/payment/options/wallet/delink",
|
|
@@ -46,54 +44,39 @@ class Payment {
|
|
|
46
44
|
getActiveUserCards: "/service/application/payment/v1.0/cards",
|
|
47
45
|
getAggregatorsConfig:
|
|
48
46
|
"/service/application/payment/v1.0/config/aggregators/key",
|
|
49
|
-
getBenficiaryOrder:
|
|
50
|
-
"/service/application/payment/v1.0/refund/beneficiaries/orders",
|
|
51
47
|
getEpaylaterBannerDetails:
|
|
52
48
|
"/service/application/payment/v1.0/epaylater/banner",
|
|
53
49
|
getOrderBeneficiariesDetail:
|
|
54
50
|
"/service/application/payment/v1.0/refund/order/beneficiaries",
|
|
55
|
-
getPaymentLink: "/service/application/payment/v1.0/create-payment-link",
|
|
56
|
-
getPaymentLinkId:
|
|
57
|
-
"/service/application/payment/v1.0/create-payment-link/{id}",
|
|
51
|
+
getPaymentLink: "/service/application/payment/v1.0/create-payment-link/",
|
|
58
52
|
getPaymentModeRoutes: "/service/application/payment/v1.0/payment/options",
|
|
59
53
|
getPaymentModeRoutesPaymentLink:
|
|
60
|
-
"/service/application/payment/v1.0/payment/options/link",
|
|
54
|
+
"/service/application/payment/v1.0/payment/options/link/",
|
|
61
55
|
getPosPaymentModeRoutes:
|
|
62
56
|
"/service/application/payment/v1.0/payment/options/pos",
|
|
63
57
|
getRupifiBannerDetails: "/service/application/payment/v1.0/rupifi/banner",
|
|
64
|
-
getSelectedRefundOption:
|
|
65
|
-
"/service/application/payment/v1.0/payment/selected_refund_options",
|
|
66
58
|
getUserBeneficiariesDetail:
|
|
67
59
|
"/service/application/payment/v1.0/refund/user/beneficiary",
|
|
68
|
-
getUserBeneficiariesDetailV2:
|
|
69
|
-
"/service/application/payment/v2.0/refund/user/beneficiary",
|
|
70
|
-
getotpOrderBeneficiariesDetail:
|
|
71
|
-
"/service/application/payment/v1.0/refund/account/otp",
|
|
72
60
|
initialisePayment: "/service/application/payment/v1.0/payment/request",
|
|
73
61
|
initialisePaymentPaymentLink:
|
|
74
|
-
"/service/application/payment/v1.0/payment/request/link",
|
|
62
|
+
"/service/application/payment/v1.0/payment/request/link/",
|
|
75
63
|
linkWallet:
|
|
76
64
|
"/service/application/payment/v1.0/payment/options/wallet/verify",
|
|
77
|
-
|
|
78
|
-
"/service/application/payment/v1.0/payment/
|
|
79
|
-
paidOrderDetails: "/service/application/payment/v1.0/payment/paid-orders",
|
|
65
|
+
paidOrderDetails:
|
|
66
|
+
"/service/application/payment/v1.0/payment/paid-orders/",
|
|
80
67
|
pollingPaymentLink:
|
|
81
|
-
"/service/application/payment/v1.0/polling-payment-link",
|
|
68
|
+
"/service/application/payment/v1.0/polling-payment-link/",
|
|
82
69
|
redirectToAggregator:
|
|
83
|
-
"/service/application/payment/v1.0/payment/redirect-to-aggregator",
|
|
84
|
-
renderHTML: "/service/application/payment/v1.0/payment/html/render",
|
|
70
|
+
"/service/application/payment/v1.0/payment/redirect-to-aggregator/",
|
|
71
|
+
renderHTML: "/service/application/payment/v1.0/payment/html/render/",
|
|
85
72
|
resendOrCancelPayment:
|
|
86
73
|
"/service/application/payment/v1.0/payment/resend_or_cancel",
|
|
87
74
|
resendPaymentLink:
|
|
88
|
-
"/service/application/payment/v1.0/resend-payment-link",
|
|
89
|
-
setRefundOptionforShipment:
|
|
90
|
-
"/service/application/payment/v1.0/payment/refundoptions",
|
|
91
|
-
updateActiveCards: "/service/application/payment/v1.0/cards",
|
|
75
|
+
"/service/application/payment/v1.0/resend-payment-link/",
|
|
92
76
|
updateDefaultBeneficiary:
|
|
93
77
|
"/service/application/payment/v1.0/refund/beneficiary/default",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"/service/application/payment/v1.0/validate/beneficiary-address",
|
|
78
|
+
validateCustomerAndCreditSummary:
|
|
79
|
+
"/service/application/payment/v1.0/payment/validate/customer-credits-v2",
|
|
97
80
|
validateVPA: "/service/application/payment/v1.0/validate-vpa",
|
|
98
81
|
verifyAndChargePayment:
|
|
99
82
|
"/service/application/payment/v1.0/payment/confirm/charge",
|
|
@@ -126,7 +109,7 @@ class Payment {
|
|
|
126
109
|
/**
|
|
127
110
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
128
111
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
129
|
-
* @returns {Promise<
|
|
112
|
+
* @returns {Promise<RefundAccountDetails>} - Success response
|
|
130
113
|
* @name addBeneficiaryDetails
|
|
131
114
|
* @summary: Add beneficiary for refund
|
|
132
115
|
* @description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/).
|
|
@@ -135,14 +118,6 @@ class Payment {
|
|
|
135
118
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
136
119
|
{ responseHeaders } = { responseHeaders: false }
|
|
137
120
|
) {
|
|
138
|
-
let invalidInput = [];
|
|
139
|
-
if (invalidInput.length) {
|
|
140
|
-
const error = new Error();
|
|
141
|
-
error.message = "Missing required field";
|
|
142
|
-
error.details = invalidInput;
|
|
143
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
121
|
const query_params = {};
|
|
147
122
|
|
|
148
123
|
const xHeaders = {};
|
|
@@ -171,23 +146,15 @@ class Payment {
|
|
|
171
146
|
/**
|
|
172
147
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
173
148
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
174
|
-
* @returns {Promise<
|
|
149
|
+
* @returns {Promise<RefundAccountDetails>} - Success response
|
|
175
150
|
* @name addRefundBankAccountUsingOTP
|
|
176
|
-
* @summary:
|
|
151
|
+
* @summary: Add refund account using OTP verification
|
|
177
152
|
* @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/).
|
|
178
153
|
*/
|
|
179
154
|
async addRefundBankAccountUsingOTP(
|
|
180
155
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
181
156
|
{ responseHeaders } = { responseHeaders: false }
|
|
182
157
|
) {
|
|
183
|
-
let invalidInput = [];
|
|
184
|
-
if (invalidInput.length) {
|
|
185
|
-
const error = new Error();
|
|
186
|
-
error.message = "Missing required field";
|
|
187
|
-
error.details = invalidInput;
|
|
188
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
189
|
-
}
|
|
190
|
-
|
|
191
158
|
const query_params = {};
|
|
192
159
|
|
|
193
160
|
const xHeaders = {};
|
|
@@ -216,7 +183,7 @@ class Payment {
|
|
|
216
183
|
/**
|
|
217
184
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
218
185
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
219
|
-
* @returns {Promise<
|
|
186
|
+
* @returns {Promise<AttachCardsDetails>} - Success response
|
|
220
187
|
* @name attachCardToCustomer
|
|
221
188
|
* @summary: Link payment card to customer
|
|
222
189
|
* @description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/).
|
|
@@ -225,14 +192,6 @@ class Payment {
|
|
|
225
192
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
226
193
|
{ responseHeaders } = { responseHeaders: false }
|
|
227
194
|
) {
|
|
228
|
-
let invalidInput = [];
|
|
229
|
-
if (invalidInput.length) {
|
|
230
|
-
const error = new Error();
|
|
231
|
-
error.message = "Missing required field";
|
|
232
|
-
error.details = invalidInput;
|
|
233
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
234
|
-
}
|
|
235
|
-
|
|
236
195
|
const query_params = {};
|
|
237
196
|
|
|
238
197
|
const xHeaders = {};
|
|
@@ -261,7 +220,7 @@ class Payment {
|
|
|
261
220
|
/**
|
|
262
221
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
263
222
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
264
|
-
* @returns {Promise<
|
|
223
|
+
* @returns {Promise<CancelPaymentLinkDetails>} - Success response
|
|
265
224
|
* @name cancelPaymentLink
|
|
266
225
|
* @summary: Cancel payment link
|
|
267
226
|
* @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
|
|
@@ -270,14 +229,6 @@ class Payment {
|
|
|
270
229
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
271
230
|
{ responseHeaders } = { responseHeaders: false }
|
|
272
231
|
) {
|
|
273
|
-
let invalidInput = [];
|
|
274
|
-
if (invalidInput.length) {
|
|
275
|
-
const error = new Error();
|
|
276
|
-
error.message = "Missing required field";
|
|
277
|
-
error.details = invalidInput;
|
|
278
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
279
|
-
}
|
|
280
|
-
|
|
281
232
|
const query_params = {};
|
|
282
233
|
|
|
283
234
|
const xHeaders = {};
|
|
@@ -306,7 +257,7 @@ class Payment {
|
|
|
306
257
|
/**
|
|
307
258
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
308
259
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
309
|
-
* @returns {Promise<
|
|
260
|
+
* @returns {Promise<CardDetailsFetchedDetails>} - Success response
|
|
310
261
|
* @name cardDetails
|
|
311
262
|
* @summary: Get card details
|
|
312
263
|
* @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
|
|
@@ -315,18 +266,12 @@ class Payment {
|
|
|
315
266
|
{ cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
316
267
|
{ responseHeaders } = { responseHeaders: false }
|
|
317
268
|
) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
path: ["cardInfo"],
|
|
269
|
+
const errors = validateRequiredParams(arguments[0], ["cardInfo"]);
|
|
270
|
+
if (errors.length > 0) {
|
|
271
|
+
const error = new FDKClientValidationError({
|
|
272
|
+
message: "Missing required field",
|
|
273
|
+
details: errors,
|
|
324
274
|
});
|
|
325
|
-
}
|
|
326
|
-
if (invalidInput.length) {
|
|
327
|
-
const error = new Error();
|
|
328
|
-
error.message = "Missing required field";
|
|
329
|
-
error.details = invalidInput;
|
|
330
275
|
return Promise.reject(new FDKClientValidationError(error));
|
|
331
276
|
}
|
|
332
277
|
|
|
@@ -359,7 +304,7 @@ class Payment {
|
|
|
359
304
|
/**
|
|
360
305
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
361
306
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
362
|
-
* @returns {Promise<
|
|
307
|
+
* @returns {Promise<PaymentStatusUpdateDetails>} - Success response
|
|
363
308
|
* @name checkAndUpdatePaymentStatus
|
|
364
309
|
* @summary: Update payment status
|
|
365
310
|
* @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/).
|
|
@@ -368,14 +313,6 @@ class Payment {
|
|
|
368
313
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
369
314
|
{ responseHeaders } = { responseHeaders: false }
|
|
370
315
|
) {
|
|
371
|
-
let invalidInput = [];
|
|
372
|
-
if (invalidInput.length) {
|
|
373
|
-
const error = new Error();
|
|
374
|
-
error.message = "Missing required field";
|
|
375
|
-
error.details = invalidInput;
|
|
376
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
377
|
-
}
|
|
378
|
-
|
|
379
316
|
const query_params = {};
|
|
380
317
|
|
|
381
318
|
const xHeaders = {};
|
|
@@ -404,23 +341,15 @@ class Payment {
|
|
|
404
341
|
/**
|
|
405
342
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
406
343
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
407
|
-
* @returns {Promise<
|
|
344
|
+
* @returns {Promise<PaymentStatusUpdateDetails>} - Success response
|
|
408
345
|
* @name checkAndUpdatePaymentStatusPaymentLink
|
|
409
|
-
* @summary:
|
|
346
|
+
* @summary: Update payment link status
|
|
410
347
|
* @description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/).
|
|
411
348
|
*/
|
|
412
349
|
async checkAndUpdatePaymentStatusPaymentLink(
|
|
413
350
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
414
351
|
{ responseHeaders } = { responseHeaders: false }
|
|
415
352
|
) {
|
|
416
|
-
let invalidInput = [];
|
|
417
|
-
if (invalidInput.length) {
|
|
418
|
-
const error = new Error();
|
|
419
|
-
error.message = "Missing required field";
|
|
420
|
-
error.details = invalidInput;
|
|
421
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
422
|
-
}
|
|
423
|
-
|
|
424
353
|
const query_params = {};
|
|
425
354
|
|
|
426
355
|
const xHeaders = {};
|
|
@@ -449,7 +378,7 @@ class Payment {
|
|
|
449
378
|
/**
|
|
450
379
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
451
380
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
452
|
-
* @returns {Promise<
|
|
381
|
+
* @returns {Promise<CheckCreditDetails>} - Success response
|
|
453
382
|
* @name checkCredit
|
|
454
383
|
* @summary: Verify credit availability and status
|
|
455
384
|
* @description: Check the availability and status of customer credit, providing the status of payment along with registration information and signup URL if the customer is not registered. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/).
|
|
@@ -458,14 +387,6 @@ class Payment {
|
|
|
458
387
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
459
388
|
{ responseHeaders } = { responseHeaders: false }
|
|
460
389
|
) {
|
|
461
|
-
let invalidInput = [];
|
|
462
|
-
if (invalidInput.length) {
|
|
463
|
-
const error = new Error();
|
|
464
|
-
error.message = "Missing required field";
|
|
465
|
-
error.details = invalidInput;
|
|
466
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
467
|
-
}
|
|
468
|
-
|
|
469
390
|
const query_params = {};
|
|
470
391
|
query_params["aggregator"] = aggregator;
|
|
471
392
|
|
|
@@ -495,68 +416,15 @@ class Payment {
|
|
|
495
416
|
/**
|
|
496
417
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
497
418
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
498
|
-
* @returns {Promise<
|
|
499
|
-
* @name confirmPayment
|
|
500
|
-
* @summary: Confirm payment after successful payment from payment gateway
|
|
501
|
-
* @description: confirm payment after payment gateway accepted payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/confirmPayment/).
|
|
502
|
-
*/
|
|
503
|
-
async confirmPayment(
|
|
504
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
505
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
506
|
-
) {
|
|
507
|
-
let invalidInput = [];
|
|
508
|
-
if (invalidInput.length) {
|
|
509
|
-
const error = new Error();
|
|
510
|
-
error.message = "Missing required field";
|
|
511
|
-
error.details = invalidInput;
|
|
512
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
const query_params = {};
|
|
516
|
-
|
|
517
|
-
const xHeaders = {};
|
|
518
|
-
|
|
519
|
-
const response = await ApplicationAPIClient.execute(
|
|
520
|
-
this._conf,
|
|
521
|
-
"post",
|
|
522
|
-
constructUrl({
|
|
523
|
-
url: this._urls["confirmPayment"],
|
|
524
|
-
params: {},
|
|
525
|
-
}),
|
|
526
|
-
query_params,
|
|
527
|
-
body,
|
|
528
|
-
{ ...xHeaders, ...requestHeaders },
|
|
529
|
-
{ responseHeaders }
|
|
530
|
-
);
|
|
531
|
-
|
|
532
|
-
let responseData = response;
|
|
533
|
-
if (responseHeaders) {
|
|
534
|
-
responseData = response[0];
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
return response;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
542
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
543
|
-
* @returns {Promise<CreateOrderUserResponse>} - Success response
|
|
419
|
+
* @returns {Promise<CreateOrderUserDetails>} - Success response
|
|
544
420
|
* @name createOrderHandlerPaymentLink
|
|
545
|
-
* @summary:
|
|
421
|
+
* @summary: Create order for payment via link
|
|
546
422
|
* @description: Initiate the creation of an order handler for processing payments through a link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/).
|
|
547
423
|
*/
|
|
548
424
|
async createOrderHandlerPaymentLink(
|
|
549
425
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
550
426
|
{ responseHeaders } = { responseHeaders: false }
|
|
551
427
|
) {
|
|
552
|
-
let invalidInput = [];
|
|
553
|
-
if (invalidInput.length) {
|
|
554
|
-
const error = new Error();
|
|
555
|
-
error.message = "Missing required field";
|
|
556
|
-
error.details = invalidInput;
|
|
557
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
558
|
-
}
|
|
559
|
-
|
|
560
428
|
const query_params = {};
|
|
561
429
|
|
|
562
430
|
const xHeaders = {};
|
|
@@ -585,23 +453,15 @@ class Payment {
|
|
|
585
453
|
/**
|
|
586
454
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
587
455
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
588
|
-
* @returns {Promise<
|
|
456
|
+
* @returns {Promise<CreatePaymentLinkDetails>} - Success response
|
|
589
457
|
* @name createPaymentLink
|
|
590
|
-
* @summary: Create payment link
|
|
458
|
+
* @summary: Create payment link
|
|
591
459
|
* @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
|
|
592
460
|
*/
|
|
593
461
|
async createPaymentLink(
|
|
594
462
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
595
463
|
{ responseHeaders } = { responseHeaders: false }
|
|
596
464
|
) {
|
|
597
|
-
let invalidInput = [];
|
|
598
|
-
if (invalidInput.length) {
|
|
599
|
-
const error = new Error();
|
|
600
|
-
error.message = "Missing required field";
|
|
601
|
-
error.details = invalidInput;
|
|
602
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
603
|
-
}
|
|
604
|
-
|
|
605
465
|
const query_params = {};
|
|
606
466
|
|
|
607
467
|
const xHeaders = {};
|
|
@@ -630,7 +490,7 @@ class Payment {
|
|
|
630
490
|
/**
|
|
631
491
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
632
492
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
633
|
-
* @returns {Promise<
|
|
493
|
+
* @returns {Promise<PaymentOrderDetails>} - Success response
|
|
634
494
|
* @name createPaymentOrder
|
|
635
495
|
* @summary: Create Order
|
|
636
496
|
* @description: Create an order and payment on the aggregator side. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/).
|
|
@@ -639,14 +499,6 @@ class Payment {
|
|
|
639
499
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
640
500
|
{ responseHeaders } = { responseHeaders: false }
|
|
641
501
|
) {
|
|
642
|
-
let invalidInput = [];
|
|
643
|
-
if (invalidInput.length) {
|
|
644
|
-
const error = new Error();
|
|
645
|
-
error.message = "Missing required field";
|
|
646
|
-
error.details = invalidInput;
|
|
647
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
648
|
-
}
|
|
649
|
-
|
|
650
502
|
const query_params = {};
|
|
651
503
|
|
|
652
504
|
const xHeaders = {};
|
|
@@ -675,23 +527,15 @@ class Payment {
|
|
|
675
527
|
/**
|
|
676
528
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
677
529
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
678
|
-
* @returns {Promise<
|
|
530
|
+
* @returns {Promise<CustomerCreditSummaryDetails>} - Success response
|
|
679
531
|
* @name customerCreditSummary
|
|
680
|
-
* @summary: Credit summary
|
|
532
|
+
* @summary: Credit summary
|
|
681
533
|
* @description: Get summary of the customer's credit information, including details such as merchant customer reference ID, status, balance, limit, due amount, used amount, due date, days overdue, total due amount, and a repayment URL. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/).
|
|
682
534
|
*/
|
|
683
535
|
async customerCreditSummary(
|
|
684
536
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
685
537
|
{ responseHeaders } = { responseHeaders: false }
|
|
686
538
|
) {
|
|
687
|
-
let invalidInput = [];
|
|
688
|
-
if (invalidInput.length) {
|
|
689
|
-
const error = new Error();
|
|
690
|
-
error.message = "Missing required field";
|
|
691
|
-
error.details = invalidInput;
|
|
692
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
693
|
-
}
|
|
694
|
-
|
|
695
539
|
const query_params = {};
|
|
696
540
|
query_params["aggregator"] = aggregator;
|
|
697
541
|
|
|
@@ -721,7 +565,7 @@ class Payment {
|
|
|
721
565
|
/**
|
|
722
566
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
723
567
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
724
|
-
* @returns {Promise<
|
|
568
|
+
* @returns {Promise<CustomerOnboardingDetails>} - Success response
|
|
725
569
|
* @name customerOnboard
|
|
726
570
|
* @summary: Onboard customer for payment
|
|
727
571
|
* @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/).
|
|
@@ -730,14 +574,6 @@ class Payment {
|
|
|
730
574
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
731
575
|
{ responseHeaders } = { responseHeaders: false }
|
|
732
576
|
) {
|
|
733
|
-
let invalidInput = [];
|
|
734
|
-
if (invalidInput.length) {
|
|
735
|
-
const error = new Error();
|
|
736
|
-
error.message = "Missing required field";
|
|
737
|
-
error.details = invalidInput;
|
|
738
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
739
|
-
}
|
|
740
|
-
|
|
741
577
|
const query_params = {};
|
|
742
578
|
|
|
743
579
|
const xHeaders = {};
|
|
@@ -766,52 +602,7 @@ class Payment {
|
|
|
766
602
|
/**
|
|
767
603
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
768
604
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
769
|
-
* @returns {Promise<
|
|
770
|
-
* @name deleteBeneficiaryDetails
|
|
771
|
-
* @summary: Delete saved beneficiary details of customers
|
|
772
|
-
* @description: Use this API to delete the saved beneficiary details provided beneficiary Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteBeneficiaryDetails/).
|
|
773
|
-
*/
|
|
774
|
-
async deleteBeneficiaryDetails(
|
|
775
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
776
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
777
|
-
) {
|
|
778
|
-
let invalidInput = [];
|
|
779
|
-
if (invalidInput.length) {
|
|
780
|
-
const error = new Error();
|
|
781
|
-
error.message = "Missing required field";
|
|
782
|
-
error.details = invalidInput;
|
|
783
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
const query_params = {};
|
|
787
|
-
|
|
788
|
-
const xHeaders = {};
|
|
789
|
-
|
|
790
|
-
const response = await ApplicationAPIClient.execute(
|
|
791
|
-
this._conf,
|
|
792
|
-
"patch",
|
|
793
|
-
constructUrl({
|
|
794
|
-
url: this._urls["deleteBeneficiaryDetails"],
|
|
795
|
-
params: {},
|
|
796
|
-
}),
|
|
797
|
-
query_params,
|
|
798
|
-
body,
|
|
799
|
-
{ ...xHeaders, ...requestHeaders },
|
|
800
|
-
{ responseHeaders }
|
|
801
|
-
);
|
|
802
|
-
|
|
803
|
-
let responseData = response;
|
|
804
|
-
if (responseHeaders) {
|
|
805
|
-
responseData = response[0];
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
return response;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
813
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
814
|
-
* @returns {Promise<DeleteCardsResponse>} - Success response
|
|
605
|
+
* @returns {Promise<DeleteCardsDetails>} - Success response
|
|
815
606
|
* @name deleteUserCard
|
|
816
607
|
* @summary: Delete customer card
|
|
817
608
|
* @description: Delete payment card from the user's account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
|
|
@@ -820,14 +611,6 @@ class Payment {
|
|
|
820
611
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
821
612
|
{ responseHeaders } = { responseHeaders: false }
|
|
822
613
|
) {
|
|
823
|
-
let invalidInput = [];
|
|
824
|
-
if (invalidInput.length) {
|
|
825
|
-
const error = new Error();
|
|
826
|
-
error.message = "Missing required field";
|
|
827
|
-
error.details = invalidInput;
|
|
828
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
829
|
-
}
|
|
830
|
-
|
|
831
614
|
const query_params = {};
|
|
832
615
|
|
|
833
616
|
const xHeaders = {};
|
|
@@ -865,14 +648,6 @@ class Payment {
|
|
|
865
648
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
866
649
|
{ responseHeaders } = { responseHeaders: false }
|
|
867
650
|
) {
|
|
868
|
-
let invalidInput = [];
|
|
869
|
-
if (invalidInput.length) {
|
|
870
|
-
const error = new Error();
|
|
871
|
-
error.message = "Missing required field";
|
|
872
|
-
error.details = invalidInput;
|
|
873
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
874
|
-
}
|
|
875
|
-
|
|
876
651
|
const query_params = {};
|
|
877
652
|
|
|
878
653
|
const xHeaders = {};
|
|
@@ -901,7 +676,7 @@ class Payment {
|
|
|
901
676
|
/**
|
|
902
677
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
903
678
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
904
|
-
* @returns {Promise<
|
|
679
|
+
* @returns {Promise<RefundTransferModeUpdateDetails>} - Success response
|
|
905
680
|
* @name enableOrDisableRefundTransferMode
|
|
906
681
|
* @summary: Toggle refund mode
|
|
907
682
|
* @description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/).
|
|
@@ -910,14 +685,6 @@ class Payment {
|
|
|
910
685
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
911
686
|
{ responseHeaders } = { responseHeaders: false }
|
|
912
687
|
) {
|
|
913
|
-
let invalidInput = [];
|
|
914
|
-
if (invalidInput.length) {
|
|
915
|
-
const error = new Error();
|
|
916
|
-
error.message = "Missing required field";
|
|
917
|
-
error.details = invalidInput;
|
|
918
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
919
|
-
}
|
|
920
|
-
|
|
921
688
|
const query_params = {};
|
|
922
689
|
|
|
923
690
|
const xHeaders = {};
|
|
@@ -946,7 +713,7 @@ class Payment {
|
|
|
946
713
|
/**
|
|
947
714
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
948
715
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
949
|
-
* @returns {Promise<
|
|
716
|
+
* @returns {Promise<ActiveCardPaymentGatewayDetails>} - Success response
|
|
950
717
|
* @name getActiveCardAggregator
|
|
951
718
|
* @summary: Retrieve active card aggregator
|
|
952
719
|
* @description: Get details about the active card aggregator used by the user, including the aggregator name.You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/).
|
|
@@ -955,14 +722,6 @@ class Payment {
|
|
|
955
722
|
{ refresh, requestHeaders } = { requestHeaders: {} },
|
|
956
723
|
{ responseHeaders } = { responseHeaders: false }
|
|
957
724
|
) {
|
|
958
|
-
let invalidInput = [];
|
|
959
|
-
if (invalidInput.length) {
|
|
960
|
-
const error = new Error();
|
|
961
|
-
error.message = "Missing required field";
|
|
962
|
-
error.details = invalidInput;
|
|
963
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
964
|
-
}
|
|
965
|
-
|
|
966
725
|
const query_params = {};
|
|
967
726
|
query_params["refresh"] = refresh;
|
|
968
727
|
|
|
@@ -992,7 +751,7 @@ class Payment {
|
|
|
992
751
|
/**
|
|
993
752
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
994
753
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
995
|
-
* @returns {Promise<
|
|
754
|
+
* @returns {Promise<TransferModeFetchDetails>} - Success response
|
|
996
755
|
* @name getActiveRefundTransferModes
|
|
997
756
|
* @summary: Get refund transfer modes
|
|
998
757
|
* @description: Lists available refund modes, such as UPI, providing details like display name, logo, and ID for each mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/).
|
|
@@ -1001,14 +760,6 @@ class Payment {
|
|
|
1001
760
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1002
761
|
{ responseHeaders } = { responseHeaders: false }
|
|
1003
762
|
) {
|
|
1004
|
-
let invalidInput = [];
|
|
1005
|
-
if (invalidInput.length) {
|
|
1006
|
-
const error = new Error();
|
|
1007
|
-
error.message = "Missing required field";
|
|
1008
|
-
error.details = invalidInput;
|
|
1009
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
763
|
const query_params = {};
|
|
1013
764
|
|
|
1014
765
|
const xHeaders = {};
|
|
@@ -1037,23 +788,15 @@ class Payment {
|
|
|
1037
788
|
/**
|
|
1038
789
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1039
790
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1040
|
-
* @returns {Promise<
|
|
791
|
+
* @returns {Promise<ListCardsDetails>} - Success response
|
|
1041
792
|
* @name getActiveUserCards
|
|
1042
|
-
* @summary:
|
|
793
|
+
* @summary: Get customer cards
|
|
1043
794
|
* @description: List all active cards saved by the user.Includes details such as the card's aggregator name, card ID, token, reference, number, expiration date, type, issuer, brand, nickname, and whether it has expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/).
|
|
1044
795
|
*/
|
|
1045
796
|
async getActiveUserCards(
|
|
1046
797
|
{ forceRefresh, requestHeaders } = { requestHeaders: {} },
|
|
1047
798
|
{ responseHeaders } = { responseHeaders: false }
|
|
1048
799
|
) {
|
|
1049
|
-
let invalidInput = [];
|
|
1050
|
-
if (invalidInput.length) {
|
|
1051
|
-
const error = new Error();
|
|
1052
|
-
error.message = "Missing required field";
|
|
1053
|
-
error.details = invalidInput;
|
|
1054
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
800
|
const query_params = {};
|
|
1058
801
|
query_params["force_refresh"] = forceRefresh;
|
|
1059
802
|
|
|
@@ -1083,28 +826,19 @@ class Payment {
|
|
|
1083
826
|
/**
|
|
1084
827
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1085
828
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1086
|
-
* @returns {Promise<
|
|
829
|
+
* @returns {Promise<AggregatorsConfigDetail>} - Success response
|
|
1087
830
|
* @name getAggregatorsConfig
|
|
1088
831
|
* @summary: Get payment aggregators
|
|
1089
832
|
* @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
|
|
1090
833
|
*/
|
|
1091
834
|
async getAggregatorsConfig(
|
|
1092
|
-
{
|
|
835
|
+
{ refresh, requestHeaders } = { requestHeaders: {} },
|
|
1093
836
|
{ responseHeaders } = { responseHeaders: false }
|
|
1094
837
|
) {
|
|
1095
|
-
let invalidInput = [];
|
|
1096
|
-
if (invalidInput.length) {
|
|
1097
|
-
const error = new Error();
|
|
1098
|
-
error.message = "Missing required field";
|
|
1099
|
-
error.details = invalidInput;
|
|
1100
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
838
|
const query_params = {};
|
|
1104
839
|
query_params["refresh"] = refresh;
|
|
1105
840
|
|
|
1106
841
|
const xHeaders = {};
|
|
1107
|
-
xHeaders["x-api-token"] = xApiToken;
|
|
1108
842
|
|
|
1109
843
|
const response = await ApplicationAPIClient.execute(
|
|
1110
844
|
this._conf,
|
|
@@ -1130,52 +864,7 @@ class Payment {
|
|
|
1130
864
|
/**
|
|
1131
865
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1132
866
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1133
|
-
* @returns {Promise<
|
|
1134
|
-
* @name getBenficiaryOrder
|
|
1135
|
-
* @summary: Get Payment status and information for a list of order_ids
|
|
1136
|
-
* @description: Use this API to get Payment status and information for a list of order_ids. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getBenficiaryOrder/).
|
|
1137
|
-
*/
|
|
1138
|
-
async getBenficiaryOrder(
|
|
1139
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1140
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1141
|
-
) {
|
|
1142
|
-
let invalidInput = [];
|
|
1143
|
-
if (invalidInput.length) {
|
|
1144
|
-
const error = new Error();
|
|
1145
|
-
error.message = "Missing required field";
|
|
1146
|
-
error.details = invalidInput;
|
|
1147
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
const query_params = {};
|
|
1151
|
-
|
|
1152
|
-
const xHeaders = {};
|
|
1153
|
-
|
|
1154
|
-
const response = await ApplicationAPIClient.execute(
|
|
1155
|
-
this._conf,
|
|
1156
|
-
"post",
|
|
1157
|
-
constructUrl({
|
|
1158
|
-
url: this._urls["getBenficiaryOrder"],
|
|
1159
|
-
params: {},
|
|
1160
|
-
}),
|
|
1161
|
-
query_params,
|
|
1162
|
-
body,
|
|
1163
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1164
|
-
{ responseHeaders }
|
|
1165
|
-
);
|
|
1166
|
-
|
|
1167
|
-
let responseData = response;
|
|
1168
|
-
if (responseHeaders) {
|
|
1169
|
-
responseData = response[0];
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
return response;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1177
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1178
|
-
* @returns {Promise<EpaylaterBannerResponse>} - Success response
|
|
867
|
+
* @returns {Promise<EpaylaterBannerDetails>} - Success response
|
|
1179
868
|
* @name getEpaylaterBannerDetails
|
|
1180
869
|
* @summary: Epaylater banner info
|
|
1181
870
|
* @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/).
|
|
@@ -1184,14 +873,6 @@ class Payment {
|
|
|
1184
873
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1185
874
|
{ responseHeaders } = { responseHeaders: false }
|
|
1186
875
|
) {
|
|
1187
|
-
let invalidInput = [];
|
|
1188
|
-
if (invalidInput.length) {
|
|
1189
|
-
const error = new Error();
|
|
1190
|
-
error.message = "Missing required field";
|
|
1191
|
-
error.details = invalidInput;
|
|
1192
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
876
|
const query_params = {};
|
|
1196
877
|
|
|
1197
878
|
const xHeaders = {};
|
|
@@ -1220,7 +901,7 @@ class Payment {
|
|
|
1220
901
|
/**
|
|
1221
902
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1222
903
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1223
|
-
* @returns {Promise<
|
|
904
|
+
* @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
|
|
1224
905
|
* @name getOrderBeneficiariesDetail
|
|
1225
906
|
* @summary: Retrieve beneficiary details
|
|
1226
907
|
* @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/).
|
|
@@ -1229,21 +910,6 @@ class Payment {
|
|
|
1229
910
|
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1230
911
|
{ responseHeaders } = { responseHeaders: false }
|
|
1231
912
|
) {
|
|
1232
|
-
let invalidInput = [];
|
|
1233
|
-
|
|
1234
|
-
if (!orderId) {
|
|
1235
|
-
invalidInput.push({
|
|
1236
|
-
message: `The 'orderId' field is required.`,
|
|
1237
|
-
path: ["orderId"],
|
|
1238
|
-
});
|
|
1239
|
-
}
|
|
1240
|
-
if (invalidInput.length) {
|
|
1241
|
-
const error = new Error();
|
|
1242
|
-
error.message = "Missing required field";
|
|
1243
|
-
error.details = invalidInput;
|
|
1244
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
913
|
const query_params = {};
|
|
1248
914
|
query_params["order_id"] = orderId;
|
|
1249
915
|
|
|
@@ -1273,23 +939,15 @@ class Payment {
|
|
|
1273
939
|
/**
|
|
1274
940
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1275
941
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1276
|
-
* @returns {Promise<
|
|
942
|
+
* @returns {Promise<GetPaymentLinkDetails>} - Success response
|
|
1277
943
|
* @name getPaymentLink
|
|
1278
|
-
* @summary:
|
|
944
|
+
* @summary: Get payment link
|
|
1279
945
|
* @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
|
|
1280
946
|
*/
|
|
1281
947
|
async getPaymentLink(
|
|
1282
948
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1283
949
|
{ responseHeaders } = { responseHeaders: false }
|
|
1284
950
|
) {
|
|
1285
|
-
let invalidInput = [];
|
|
1286
|
-
if (invalidInput.length) {
|
|
1287
|
-
const error = new Error();
|
|
1288
|
-
error.message = "Missing required field";
|
|
1289
|
-
error.details = invalidInput;
|
|
1290
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
951
|
const query_params = {};
|
|
1294
952
|
query_params["payment_link_id"] = paymentLinkId;
|
|
1295
953
|
|
|
@@ -1319,66 +977,7 @@ class Payment {
|
|
|
1319
977
|
/**
|
|
1320
978
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1321
979
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1322
|
-
* @returns {Promise<
|
|
1323
|
-
* @name getPaymentLinkId
|
|
1324
|
-
* @summary: Get payment link
|
|
1325
|
-
* @description: get a payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLinkId/).
|
|
1326
|
-
*/
|
|
1327
|
-
async getPaymentLinkId(
|
|
1328
|
-
{ id, paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1329
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1330
|
-
) {
|
|
1331
|
-
let invalidInput = [];
|
|
1332
|
-
|
|
1333
|
-
if (!id) {
|
|
1334
|
-
invalidInput.push({
|
|
1335
|
-
message: `The 'id' field is required.`,
|
|
1336
|
-
path: ["id"],
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
if (!paymentLinkId) {
|
|
1340
|
-
invalidInput.push({
|
|
1341
|
-
message: `The 'paymentLinkId' field is required.`,
|
|
1342
|
-
path: ["paymentLinkId"],
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
if (invalidInput.length) {
|
|
1346
|
-
const error = new Error();
|
|
1347
|
-
error.message = "Missing required field";
|
|
1348
|
-
error.details = invalidInput;
|
|
1349
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
const query_params = {};
|
|
1353
|
-
query_params["payment_link_id"] = paymentLinkId;
|
|
1354
|
-
|
|
1355
|
-
const xHeaders = {};
|
|
1356
|
-
|
|
1357
|
-
const response = await ApplicationAPIClient.execute(
|
|
1358
|
-
this._conf,
|
|
1359
|
-
"get",
|
|
1360
|
-
constructUrl({
|
|
1361
|
-
url: this._urls["getPaymentLinkId"],
|
|
1362
|
-
params: { id },
|
|
1363
|
-
}),
|
|
1364
|
-
query_params,
|
|
1365
|
-
undefined,
|
|
1366
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1367
|
-
{ responseHeaders }
|
|
1368
|
-
);
|
|
1369
|
-
|
|
1370
|
-
let responseData = response;
|
|
1371
|
-
if (responseHeaders) {
|
|
1372
|
-
responseData = response[0];
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
return response;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1380
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1381
|
-
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
980
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
1382
981
|
* @name getPaymentModeRoutes
|
|
1383
982
|
* @summary: Get payment modes
|
|
1384
983
|
* @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/).
|
|
@@ -1399,21 +998,6 @@ class Payment {
|
|
|
1399
998
|
} = { requestHeaders: {} },
|
|
1400
999
|
{ responseHeaders } = { responseHeaders: false }
|
|
1401
1000
|
) {
|
|
1402
|
-
let invalidInput = [];
|
|
1403
|
-
|
|
1404
|
-
if (!amount) {
|
|
1405
|
-
invalidInput.push({
|
|
1406
|
-
message: `The 'amount' field is required.`,
|
|
1407
|
-
path: ["amount"],
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
if (invalidInput.length) {
|
|
1411
|
-
const error = new Error();
|
|
1412
|
-
error.message = "Missing required field";
|
|
1413
|
-
error.details = invalidInput;
|
|
1414
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
1001
|
const query_params = {};
|
|
1418
1002
|
query_params["amount"] = amount;
|
|
1419
1003
|
query_params["cart_id"] = cartId;
|
|
@@ -1452,30 +1036,15 @@ class Payment {
|
|
|
1452
1036
|
/**
|
|
1453
1037
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1454
1038
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1455
|
-
* @returns {Promise<
|
|
1039
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
1456
1040
|
* @name getPaymentModeRoutesPaymentLink
|
|
1457
|
-
* @summary: Payment link
|
|
1041
|
+
* @summary: Payment modes for payment link
|
|
1458
1042
|
* @description: List payment modes available for a given payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/).
|
|
1459
1043
|
*/
|
|
1460
1044
|
async getPaymentModeRoutesPaymentLink(
|
|
1461
1045
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1462
1046
|
{ responseHeaders } = { responseHeaders: false }
|
|
1463
1047
|
) {
|
|
1464
|
-
let invalidInput = [];
|
|
1465
|
-
|
|
1466
|
-
if (!paymentLinkId) {
|
|
1467
|
-
invalidInput.push({
|
|
1468
|
-
message: `The 'paymentLinkId' field is required.`,
|
|
1469
|
-
path: ["paymentLinkId"],
|
|
1470
|
-
});
|
|
1471
|
-
}
|
|
1472
|
-
if (invalidInput.length) {
|
|
1473
|
-
const error = new Error();
|
|
1474
|
-
error.message = "Missing required field";
|
|
1475
|
-
error.details = invalidInput;
|
|
1476
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
1048
|
const query_params = {};
|
|
1480
1049
|
query_params["payment_link_id"] = paymentLinkId;
|
|
1481
1050
|
|
|
@@ -1505,7 +1074,7 @@ class Payment {
|
|
|
1505
1074
|
/**
|
|
1506
1075
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1507
1076
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1508
|
-
* @returns {Promise<
|
|
1077
|
+
* @returns {Promise<PaymentModeRouteDetails>} - Success response
|
|
1509
1078
|
* @name getPosPaymentModeRoutes
|
|
1510
1079
|
* @summary: POS payment modes
|
|
1511
1080
|
* @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/).
|
|
@@ -1513,9 +1082,9 @@ class Payment {
|
|
|
1513
1082
|
async getPosPaymentModeRoutes(
|
|
1514
1083
|
{
|
|
1515
1084
|
amount,
|
|
1085
|
+
cartId,
|
|
1516
1086
|
pincode,
|
|
1517
1087
|
orderType,
|
|
1518
|
-
cartId,
|
|
1519
1088
|
checkoutMode,
|
|
1520
1089
|
refresh,
|
|
1521
1090
|
cardReference,
|
|
@@ -1524,33 +1093,6 @@ class Payment {
|
|
|
1524
1093
|
} = { requestHeaders: {} },
|
|
1525
1094
|
{ responseHeaders } = { responseHeaders: false }
|
|
1526
1095
|
) {
|
|
1527
|
-
let invalidInput = [];
|
|
1528
|
-
|
|
1529
|
-
if (!amount) {
|
|
1530
|
-
invalidInput.push({
|
|
1531
|
-
message: `The 'amount' field is required.`,
|
|
1532
|
-
path: ["amount"],
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
if (!pincode) {
|
|
1536
|
-
invalidInput.push({
|
|
1537
|
-
message: `The 'pincode' field is required.`,
|
|
1538
|
-
path: ["pincode"],
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
if (!orderType) {
|
|
1542
|
-
invalidInput.push({
|
|
1543
|
-
message: `The 'orderType' field is required.`,
|
|
1544
|
-
path: ["orderType"],
|
|
1545
|
-
});
|
|
1546
|
-
}
|
|
1547
|
-
if (invalidInput.length) {
|
|
1548
|
-
const error = new Error();
|
|
1549
|
-
error.message = "Missing required field";
|
|
1550
|
-
error.details = invalidInput;
|
|
1551
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
1096
|
const query_params = {};
|
|
1555
1097
|
query_params["amount"] = amount;
|
|
1556
1098
|
query_params["cart_id"] = cartId;
|
|
@@ -1587,23 +1129,15 @@ class Payment {
|
|
|
1587
1129
|
/**
|
|
1588
1130
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1589
1131
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1590
|
-
* @returns {Promise<
|
|
1132
|
+
* @returns {Promise<RupifiBannerDetails>} - Success response
|
|
1591
1133
|
* @name getRupifiBannerDetails
|
|
1592
|
-
* @summary: Rupifi banner info
|
|
1134
|
+
* @summary: Rupifi banner info
|
|
1593
1135
|
* @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/).
|
|
1594
1136
|
*/
|
|
1595
1137
|
async getRupifiBannerDetails(
|
|
1596
1138
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1597
1139
|
{ responseHeaders } = { responseHeaders: false }
|
|
1598
1140
|
) {
|
|
1599
|
-
let invalidInput = [];
|
|
1600
|
-
if (invalidInput.length) {
|
|
1601
|
-
const error = new Error();
|
|
1602
|
-
error.message = "Missing required field";
|
|
1603
|
-
error.details = invalidInput;
|
|
1604
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
1141
|
const query_params = {};
|
|
1608
1142
|
|
|
1609
1143
|
const xHeaders = {};
|
|
@@ -1632,38 +1166,16 @@ class Payment {
|
|
|
1632
1166
|
/**
|
|
1633
1167
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1634
1168
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1635
|
-
* @returns {Promise<
|
|
1636
|
-
* @name
|
|
1637
|
-
* @summary:
|
|
1638
|
-
* @description:
|
|
1169
|
+
* @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
|
|
1170
|
+
* @name getUserBeneficiariesDetail
|
|
1171
|
+
* @summary: Retrieve beneficiary details
|
|
1172
|
+
* @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/).
|
|
1639
1173
|
*/
|
|
1640
|
-
async
|
|
1641
|
-
{
|
|
1174
|
+
async getUserBeneficiariesDetail(
|
|
1175
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1642
1176
|
{ responseHeaders } = { responseHeaders: false }
|
|
1643
1177
|
) {
|
|
1644
|
-
let invalidInput = [];
|
|
1645
|
-
|
|
1646
|
-
if (!shipmentId) {
|
|
1647
|
-
invalidInput.push({
|
|
1648
|
-
message: `The 'shipmentId' field is required.`,
|
|
1649
|
-
path: ["shipmentId"],
|
|
1650
|
-
});
|
|
1651
|
-
}
|
|
1652
|
-
if (!orderId) {
|
|
1653
|
-
invalidInput.push({
|
|
1654
|
-
message: `The 'orderId' field is required.`,
|
|
1655
|
-
path: ["orderId"],
|
|
1656
|
-
});
|
|
1657
|
-
}
|
|
1658
|
-
if (invalidInput.length) {
|
|
1659
|
-
const error = new Error();
|
|
1660
|
-
error.message = "Missing required field";
|
|
1661
|
-
error.details = invalidInput;
|
|
1662
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
1178
|
const query_params = {};
|
|
1666
|
-
query_params["shipment_id"] = shipmentId;
|
|
1667
1179
|
query_params["order_id"] = orderId;
|
|
1668
1180
|
|
|
1669
1181
|
const xHeaders = {};
|
|
@@ -1672,7 +1184,7 @@ class Payment {
|
|
|
1672
1184
|
this._conf,
|
|
1673
1185
|
"get",
|
|
1674
1186
|
constructUrl({
|
|
1675
|
-
url: this._urls["
|
|
1187
|
+
url: this._urls["getUserBeneficiariesDetail"],
|
|
1676
1188
|
params: {},
|
|
1677
1189
|
}),
|
|
1678
1190
|
query_params,
|
|
@@ -1692,184 +1204,15 @@ class Payment {
|
|
|
1692
1204
|
/**
|
|
1693
1205
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1694
1206
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1695
|
-
* @returns {Promise<
|
|
1696
|
-
* @name getUserBeneficiariesDetail
|
|
1697
|
-
* @summary: Retrieve beneficiary details
|
|
1698
|
-
* @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/).
|
|
1699
|
-
*/
|
|
1700
|
-
async getUserBeneficiariesDetail(
|
|
1701
|
-
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1702
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1703
|
-
) {
|
|
1704
|
-
let invalidInput = [];
|
|
1705
|
-
|
|
1706
|
-
if (!orderId) {
|
|
1707
|
-
invalidInput.push({
|
|
1708
|
-
message: `The 'orderId' field is required.`,
|
|
1709
|
-
path: ["orderId"],
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
if (invalidInput.length) {
|
|
1713
|
-
const error = new Error();
|
|
1714
|
-
error.message = "Missing required field";
|
|
1715
|
-
error.details = invalidInput;
|
|
1716
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
const query_params = {};
|
|
1720
|
-
query_params["order_id"] = orderId;
|
|
1721
|
-
|
|
1722
|
-
const xHeaders = {};
|
|
1723
|
-
|
|
1724
|
-
const response = await ApplicationAPIClient.execute(
|
|
1725
|
-
this._conf,
|
|
1726
|
-
"get",
|
|
1727
|
-
constructUrl({
|
|
1728
|
-
url: this._urls["getUserBeneficiariesDetail"],
|
|
1729
|
-
params: {},
|
|
1730
|
-
}),
|
|
1731
|
-
query_params,
|
|
1732
|
-
undefined,
|
|
1733
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1734
|
-
{ responseHeaders }
|
|
1735
|
-
);
|
|
1736
|
-
|
|
1737
|
-
let responseData = response;
|
|
1738
|
-
if (responseHeaders) {
|
|
1739
|
-
responseData = response[0];
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
return response;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
/**
|
|
1746
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1747
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1748
|
-
* @returns {Promise<OrderBeneficiaryResponseSchemaV2>} - Success response
|
|
1749
|
-
* @name getUserBeneficiariesDetailV2
|
|
1750
|
-
* @summary: Retrieve beneficiary details
|
|
1751
|
-
* @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/getUserBeneficiariesDetailV2/).
|
|
1752
|
-
*/
|
|
1753
|
-
async getUserBeneficiariesDetailV2(
|
|
1754
|
-
{ orderId, shipmentId, mop, requestHeaders } = { requestHeaders: {} },
|
|
1755
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1756
|
-
) {
|
|
1757
|
-
let invalidInput = [];
|
|
1758
|
-
if (invalidInput.length) {
|
|
1759
|
-
const error = new Error();
|
|
1760
|
-
error.message = "Missing required field";
|
|
1761
|
-
error.details = invalidInput;
|
|
1762
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
const query_params = {};
|
|
1766
|
-
query_params["order_id"] = orderId;
|
|
1767
|
-
query_params["shipment_id"] = shipmentId;
|
|
1768
|
-
query_params["mop"] = mop;
|
|
1769
|
-
|
|
1770
|
-
const xHeaders = {};
|
|
1771
|
-
|
|
1772
|
-
const response = await ApplicationAPIClient.execute(
|
|
1773
|
-
this._conf,
|
|
1774
|
-
"get",
|
|
1775
|
-
constructUrl({
|
|
1776
|
-
url: this._urls["getUserBeneficiariesDetailV2"],
|
|
1777
|
-
params: {},
|
|
1778
|
-
}),
|
|
1779
|
-
query_params,
|
|
1780
|
-
undefined,
|
|
1781
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1782
|
-
{ responseHeaders }
|
|
1783
|
-
);
|
|
1784
|
-
|
|
1785
|
-
let responseData = response;
|
|
1786
|
-
if (responseHeaders) {
|
|
1787
|
-
responseData = response[0];
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
return response;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
/**
|
|
1794
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1795
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1796
|
-
* @returns {Promise<AddBeneficiaryDetailsOTPResponse>} - Success response
|
|
1797
|
-
* @name getotpOrderBeneficiariesDetail
|
|
1798
|
-
* @summary: Lists the beneficiary of a refund
|
|
1799
|
-
* @description: Get the details of all active beneficiary added by a user for refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getotpOrderBeneficiariesDetail/).
|
|
1800
|
-
*/
|
|
1801
|
-
async getotpOrderBeneficiariesDetail(
|
|
1802
|
-
{ orderId, requestHash, requestHeaders } = { requestHeaders: {} },
|
|
1803
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1804
|
-
) {
|
|
1805
|
-
let invalidInput = [];
|
|
1806
|
-
|
|
1807
|
-
if (!orderId) {
|
|
1808
|
-
invalidInput.push({
|
|
1809
|
-
message: `The 'orderId' field is required.`,
|
|
1810
|
-
path: ["orderId"],
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1813
|
-
if (!requestHash) {
|
|
1814
|
-
invalidInput.push({
|
|
1815
|
-
message: `The 'requestHash' field is required.`,
|
|
1816
|
-
path: ["requestHash"],
|
|
1817
|
-
});
|
|
1818
|
-
}
|
|
1819
|
-
if (invalidInput.length) {
|
|
1820
|
-
const error = new Error();
|
|
1821
|
-
error.message = "Missing required field";
|
|
1822
|
-
error.details = invalidInput;
|
|
1823
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
const query_params = {};
|
|
1827
|
-
query_params["order_id"] = orderId;
|
|
1828
|
-
query_params["request_hash"] = requestHash;
|
|
1829
|
-
|
|
1830
|
-
const xHeaders = {};
|
|
1831
|
-
|
|
1832
|
-
const response = await ApplicationAPIClient.execute(
|
|
1833
|
-
this._conf,
|
|
1834
|
-
"get",
|
|
1835
|
-
constructUrl({
|
|
1836
|
-
url: this._urls["getotpOrderBeneficiariesDetail"],
|
|
1837
|
-
params: {},
|
|
1838
|
-
}),
|
|
1839
|
-
query_params,
|
|
1840
|
-
undefined,
|
|
1841
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1842
|
-
{ responseHeaders }
|
|
1843
|
-
);
|
|
1844
|
-
|
|
1845
|
-
let responseData = response;
|
|
1846
|
-
if (responseHeaders) {
|
|
1847
|
-
responseData = response[0];
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
return response;
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1855
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1856
|
-
* @returns {Promise<PaymentInitializationResponse>} - Success response
|
|
1207
|
+
* @returns {Promise<PaymentInitializationDetails>} - Success response
|
|
1857
1208
|
* @name initialisePayment
|
|
1858
|
-
* @summary: Start payment process
|
|
1209
|
+
* @summary: Start payment process
|
|
1859
1210
|
* @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/).
|
|
1860
1211
|
*/
|
|
1861
1212
|
async initialisePayment(
|
|
1862
1213
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1863
1214
|
{ responseHeaders } = { responseHeaders: false }
|
|
1864
1215
|
) {
|
|
1865
|
-
let invalidInput = [];
|
|
1866
|
-
if (invalidInput.length) {
|
|
1867
|
-
const error = new Error();
|
|
1868
|
-
error.message = "Missing required field";
|
|
1869
|
-
error.details = invalidInput;
|
|
1870
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
1216
|
const query_params = {};
|
|
1874
1217
|
|
|
1875
1218
|
const xHeaders = {};
|
|
@@ -1898,23 +1241,15 @@ class Payment {
|
|
|
1898
1241
|
/**
|
|
1899
1242
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1900
1243
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1901
|
-
* @returns {Promise<
|
|
1244
|
+
* @returns {Promise<PaymentInitializationDetails>} - Success response
|
|
1902
1245
|
* @name initialisePaymentPaymentLink
|
|
1903
|
-
* @summary:
|
|
1246
|
+
* @summary: Initialize payment link
|
|
1904
1247
|
* @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/).
|
|
1905
1248
|
*/
|
|
1906
1249
|
async initialisePaymentPaymentLink(
|
|
1907
1250
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1908
1251
|
{ responseHeaders } = { responseHeaders: false }
|
|
1909
1252
|
) {
|
|
1910
|
-
let invalidInput = [];
|
|
1911
|
-
if (invalidInput.length) {
|
|
1912
|
-
const error = new Error();
|
|
1913
|
-
error.message = "Missing required field";
|
|
1914
|
-
error.details = invalidInput;
|
|
1915
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
1253
|
const query_params = {};
|
|
1919
1254
|
|
|
1920
1255
|
const xHeaders = {};
|
|
@@ -1952,14 +1287,6 @@ class Payment {
|
|
|
1952
1287
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1953
1288
|
{ responseHeaders } = { responseHeaders: false }
|
|
1954
1289
|
) {
|
|
1955
|
-
let invalidInput = [];
|
|
1956
|
-
if (invalidInput.length) {
|
|
1957
|
-
const error = new Error();
|
|
1958
|
-
error.message = "Missing required field";
|
|
1959
|
-
error.details = invalidInput;
|
|
1960
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
1290
|
const query_params = {};
|
|
1964
1291
|
|
|
1965
1292
|
const xHeaders = {};
|
|
@@ -1988,53 +1315,7 @@ class Payment {
|
|
|
1988
1315
|
/**
|
|
1989
1316
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1990
1317
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1991
|
-
* @returns {Promise<
|
|
1992
|
-
* @name outstandingOrderDetails
|
|
1993
|
-
* @summary: Outstanding orders.
|
|
1994
|
-
* @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
|
|
1995
|
-
*/
|
|
1996
|
-
async outstandingOrderDetails(
|
|
1997
|
-
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
1998
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1999
|
-
) {
|
|
2000
|
-
let invalidInput = [];
|
|
2001
|
-
if (invalidInput.length) {
|
|
2002
|
-
const error = new Error();
|
|
2003
|
-
error.message = "Missing required field";
|
|
2004
|
-
error.details = invalidInput;
|
|
2005
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
const query_params = {};
|
|
2009
|
-
query_params["aggregator"] = aggregator;
|
|
2010
|
-
|
|
2011
|
-
const xHeaders = {};
|
|
2012
|
-
|
|
2013
|
-
const response = await ApplicationAPIClient.execute(
|
|
2014
|
-
this._conf,
|
|
2015
|
-
"get",
|
|
2016
|
-
constructUrl({
|
|
2017
|
-
url: this._urls["outstandingOrderDetails"],
|
|
2018
|
-
params: {},
|
|
2019
|
-
}),
|
|
2020
|
-
query_params,
|
|
2021
|
-
undefined,
|
|
2022
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2023
|
-
{ responseHeaders }
|
|
2024
|
-
);
|
|
2025
|
-
|
|
2026
|
-
let responseData = response;
|
|
2027
|
-
if (responseHeaders) {
|
|
2028
|
-
responseData = response[0];
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
return response;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2036
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2037
|
-
* @returns {Promise<PaidOrderDetailsResponse>} - Success response
|
|
1318
|
+
* @returns {Promise<PaidOrderDetails>} - Success response
|
|
2038
1319
|
* @name paidOrderDetails
|
|
2039
1320
|
* @summary: Retrieve details of paid orders
|
|
2040
1321
|
* @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/).
|
|
@@ -2043,14 +1324,6 @@ class Payment {
|
|
|
2043
1324
|
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2044
1325
|
{ responseHeaders } = { responseHeaders: false }
|
|
2045
1326
|
) {
|
|
2046
|
-
let invalidInput = [];
|
|
2047
|
-
if (invalidInput.length) {
|
|
2048
|
-
const error = new Error();
|
|
2049
|
-
error.message = "Missing required field";
|
|
2050
|
-
error.details = invalidInput;
|
|
2051
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
1327
|
const query_params = {};
|
|
2055
1328
|
query_params["aggregator"] = aggregator;
|
|
2056
1329
|
|
|
@@ -2080,30 +1353,15 @@ class Payment {
|
|
|
2080
1353
|
/**
|
|
2081
1354
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2082
1355
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2083
|
-
* @returns {Promise<
|
|
1356
|
+
* @returns {Promise<PollingPaymentLinkDetails>} - Success response
|
|
2084
1357
|
* @name pollingPaymentLink
|
|
2085
|
-
* @summary: Poll payment link
|
|
1358
|
+
* @summary: Poll status of payment link
|
|
2086
1359
|
* @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/).
|
|
2087
1360
|
*/
|
|
2088
1361
|
async pollingPaymentLink(
|
|
2089
1362
|
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2090
1363
|
{ responseHeaders } = { responseHeaders: false }
|
|
2091
1364
|
) {
|
|
2092
|
-
let invalidInput = [];
|
|
2093
|
-
|
|
2094
|
-
if (!paymentLinkId) {
|
|
2095
|
-
invalidInput.push({
|
|
2096
|
-
message: `The 'paymentLinkId' field is required.`,
|
|
2097
|
-
path: ["paymentLinkId"],
|
|
2098
|
-
});
|
|
2099
|
-
}
|
|
2100
|
-
if (invalidInput.length) {
|
|
2101
|
-
const error = new Error();
|
|
2102
|
-
error.message = "Missing required field";
|
|
2103
|
-
error.details = invalidInput;
|
|
2104
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
1365
|
const query_params = {};
|
|
2108
1366
|
query_params["payment_link_id"] = paymentLinkId;
|
|
2109
1367
|
|
|
@@ -2133,23 +1391,15 @@ class Payment {
|
|
|
2133
1391
|
/**
|
|
2134
1392
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2135
1393
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2136
|
-
* @returns {Promise<
|
|
1394
|
+
* @returns {Promise<RedirectToAggregatorDetails>} - Success response
|
|
2137
1395
|
* @name redirectToAggregator
|
|
2138
1396
|
* @summary: Redirects users to the payment aggregator's interface
|
|
2139
|
-
* @description:
|
|
1397
|
+
* @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/).
|
|
2140
1398
|
*/
|
|
2141
1399
|
async redirectToAggregator(
|
|
2142
|
-
{
|
|
1400
|
+
{ aggregator, source, requestHeaders } = { requestHeaders: {} },
|
|
2143
1401
|
{ responseHeaders } = { responseHeaders: false }
|
|
2144
1402
|
) {
|
|
2145
|
-
let invalidInput = [];
|
|
2146
|
-
if (invalidInput.length) {
|
|
2147
|
-
const error = new Error();
|
|
2148
|
-
error.message = "Missing required field";
|
|
2149
|
-
error.details = invalidInput;
|
|
2150
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
1403
|
const query_params = {};
|
|
2154
1404
|
query_params["source"] = source;
|
|
2155
1405
|
query_params["aggregator"] = aggregator;
|
|
@@ -2180,23 +1430,15 @@ class Payment {
|
|
|
2180
1430
|
/**
|
|
2181
1431
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2182
1432
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2183
|
-
* @returns {Promise<
|
|
1433
|
+
* @returns {Promise<RenderHTMLDetails>} - Success response
|
|
2184
1434
|
* @name renderHTML
|
|
2185
|
-
* @summary: Render HTML
|
|
1435
|
+
* @summary: Render HTML
|
|
2186
1436
|
* @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
|
|
2187
1437
|
*/
|
|
2188
1438
|
async renderHTML(
|
|
2189
1439
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2190
1440
|
{ responseHeaders } = { responseHeaders: false }
|
|
2191
1441
|
) {
|
|
2192
|
-
let invalidInput = [];
|
|
2193
|
-
if (invalidInput.length) {
|
|
2194
|
-
const error = new Error();
|
|
2195
|
-
error.message = "Missing required field";
|
|
2196
|
-
error.details = invalidInput;
|
|
2197
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
1442
|
const query_params = {};
|
|
2201
1443
|
|
|
2202
1444
|
const xHeaders = {};
|
|
@@ -2225,7 +1467,7 @@ class Payment {
|
|
|
2225
1467
|
/**
|
|
2226
1468
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2227
1469
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2228
|
-
* @returns {Promise<
|
|
1470
|
+
* @returns {Promise<ResendOrCancelPaymentDetails>} - Success response
|
|
2229
1471
|
* @name resendOrCancelPayment
|
|
2230
1472
|
* @summary: Resend or cancel a pending payment transaction
|
|
2231
1473
|
* @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/).
|
|
@@ -2234,14 +1476,6 @@ class Payment {
|
|
|
2234
1476
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2235
1477
|
{ responseHeaders } = { responseHeaders: false }
|
|
2236
1478
|
) {
|
|
2237
|
-
let invalidInput = [];
|
|
2238
|
-
if (invalidInput.length) {
|
|
2239
|
-
const error = new Error();
|
|
2240
|
-
error.message = "Missing required field";
|
|
2241
|
-
error.details = invalidInput;
|
|
2242
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
1479
|
const query_params = {};
|
|
2246
1480
|
|
|
2247
1481
|
const xHeaders = {};
|
|
@@ -2270,7 +1504,7 @@ class Payment {
|
|
|
2270
1504
|
/**
|
|
2271
1505
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2272
1506
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2273
|
-
* @returns {Promise<
|
|
1507
|
+
* @returns {Promise<ResendPaymentLinkDetails>} - Success response
|
|
2274
1508
|
* @name resendPaymentLink
|
|
2275
1509
|
* @summary: Resend payment link
|
|
2276
1510
|
* @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/).
|
|
@@ -2279,14 +1513,6 @@ class Payment {
|
|
|
2279
1513
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2280
1514
|
{ responseHeaders } = { responseHeaders: false }
|
|
2281
1515
|
) {
|
|
2282
|
-
let invalidInput = [];
|
|
2283
|
-
if (invalidInput.length) {
|
|
2284
|
-
const error = new Error();
|
|
2285
|
-
error.message = "Missing required field";
|
|
2286
|
-
error.details = invalidInput;
|
|
2287
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
1516
|
const query_params = {};
|
|
2291
1517
|
|
|
2292
1518
|
const xHeaders = {};
|
|
@@ -2315,97 +1541,7 @@ class Payment {
|
|
|
2315
1541
|
/**
|
|
2316
1542
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2317
1543
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2318
|
-
* @returns {Promise<
|
|
2319
|
-
* @name setRefundOptionforShipment
|
|
2320
|
-
* @summary: Save refund source against shipment and order
|
|
2321
|
-
* @description: Save refund source against shipment and order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/setRefundOptionforShipment/).
|
|
2322
|
-
*/
|
|
2323
|
-
async setRefundOptionforShipment(
|
|
2324
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2325
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2326
|
-
) {
|
|
2327
|
-
let invalidInput = [];
|
|
2328
|
-
if (invalidInput.length) {
|
|
2329
|
-
const error = new Error();
|
|
2330
|
-
error.message = "Missing required field";
|
|
2331
|
-
error.details = invalidInput;
|
|
2332
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
const query_params = {};
|
|
2336
|
-
|
|
2337
|
-
const xHeaders = {};
|
|
2338
|
-
|
|
2339
|
-
const response = await ApplicationAPIClient.execute(
|
|
2340
|
-
this._conf,
|
|
2341
|
-
"post",
|
|
2342
|
-
constructUrl({
|
|
2343
|
-
url: this._urls["setRefundOptionforShipment"],
|
|
2344
|
-
params: {},
|
|
2345
|
-
}),
|
|
2346
|
-
query_params,
|
|
2347
|
-
body,
|
|
2348
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2349
|
-
{ responseHeaders }
|
|
2350
|
-
);
|
|
2351
|
-
|
|
2352
|
-
let responseData = response;
|
|
2353
|
-
if (responseHeaders) {
|
|
2354
|
-
responseData = response[0];
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
return response;
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
/**
|
|
2361
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2362
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2363
|
-
* @returns {Promise<UpdateCardResponse>} - Success response
|
|
2364
|
-
* @name updateActiveCards
|
|
2365
|
-
* @summary: update a card
|
|
2366
|
-
* @description: Use this API to update a card list added by a user on the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateActiveCards/).
|
|
2367
|
-
*/
|
|
2368
|
-
async updateActiveCards(
|
|
2369
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2370
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2371
|
-
) {
|
|
2372
|
-
let invalidInput = [];
|
|
2373
|
-
if (invalidInput.length) {
|
|
2374
|
-
const error = new Error();
|
|
2375
|
-
error.message = "Missing required field";
|
|
2376
|
-
error.details = invalidInput;
|
|
2377
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
const query_params = {};
|
|
2381
|
-
|
|
2382
|
-
const xHeaders = {};
|
|
2383
|
-
|
|
2384
|
-
const response = await ApplicationAPIClient.execute(
|
|
2385
|
-
this._conf,
|
|
2386
|
-
"post",
|
|
2387
|
-
constructUrl({
|
|
2388
|
-
url: this._urls["updateActiveCards"],
|
|
2389
|
-
params: {},
|
|
2390
|
-
}),
|
|
2391
|
-
query_params,
|
|
2392
|
-
body,
|
|
2393
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2394
|
-
{ responseHeaders }
|
|
2395
|
-
);
|
|
2396
|
-
|
|
2397
|
-
let responseData = response;
|
|
2398
|
-
if (responseHeaders) {
|
|
2399
|
-
responseData = response[0];
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
return response;
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
/**
|
|
2406
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2407
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2408
|
-
* @returns {Promise<SetDefaultBeneficiaryResponse>} - Success response
|
|
1544
|
+
* @returns {Promise<SetDefaultBeneficiaryDetails>} - Success response
|
|
2409
1545
|
* @name updateDefaultBeneficiary
|
|
2410
1546
|
* @summary: Set default beneficiary for refund
|
|
2411
1547
|
* @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/).
|
|
@@ -2414,14 +1550,6 @@ class Payment {
|
|
|
2414
1550
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2415
1551
|
{ responseHeaders } = { responseHeaders: false }
|
|
2416
1552
|
) {
|
|
2417
|
-
let invalidInput = [];
|
|
2418
|
-
if (invalidInput.length) {
|
|
2419
|
-
const error = new Error();
|
|
2420
|
-
error.message = "Missing required field";
|
|
2421
|
-
error.details = invalidInput;
|
|
2422
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
1553
|
const query_params = {};
|
|
2426
1554
|
|
|
2427
1555
|
const xHeaders = {};
|
|
@@ -2450,68 +1578,15 @@ class Payment {
|
|
|
2450
1578
|
/**
|
|
2451
1579
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2452
1580
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2453
|
-
* @returns {Promise<
|
|
2454
|
-
* @name
|
|
2455
|
-
* @summary:
|
|
2456
|
-
* @description:
|
|
2457
|
-
*/
|
|
2458
|
-
async updateUserCard(
|
|
2459
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2460
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2461
|
-
) {
|
|
2462
|
-
let invalidInput = [];
|
|
2463
|
-
if (invalidInput.length) {
|
|
2464
|
-
const error = new Error();
|
|
2465
|
-
error.message = "Missing required field";
|
|
2466
|
-
error.details = invalidInput;
|
|
2467
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
const query_params = {};
|
|
2471
|
-
|
|
2472
|
-
const xHeaders = {};
|
|
2473
|
-
|
|
2474
|
-
const response = await ApplicationAPIClient.execute(
|
|
2475
|
-
this._conf,
|
|
2476
|
-
"post",
|
|
2477
|
-
constructUrl({
|
|
2478
|
-
url: this._urls["updateUserCard"],
|
|
2479
|
-
params: {},
|
|
2480
|
-
}),
|
|
2481
|
-
query_params,
|
|
2482
|
-
body,
|
|
2483
|
-
{ ...xHeaders, ...requestHeaders },
|
|
2484
|
-
{ responseHeaders }
|
|
2485
|
-
);
|
|
2486
|
-
|
|
2487
|
-
let responseData = response;
|
|
2488
|
-
if (responseHeaders) {
|
|
2489
|
-
responseData = response[0];
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
return response;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
/**
|
|
2496
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2497
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2498
|
-
* @returns {Promise<ValidateValidateAddressResponse>} - Success response
|
|
2499
|
-
* @name validateBeneficiaryAddress
|
|
2500
|
-
* @summary: Validate UPI ID and IFSC code
|
|
2501
|
-
* @description: Validate UPI ID and IFSC code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateBeneficiaryAddress/).
|
|
1581
|
+
* @returns {Promise<ValidateCustomerCreditSchema>} - Success response
|
|
1582
|
+
* @name validateCustomerAndCreditSummary
|
|
1583
|
+
* @summary: Verify payment customer and show credit summary
|
|
1584
|
+
* @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/).
|
|
2502
1585
|
*/
|
|
2503
|
-
async
|
|
1586
|
+
async validateCustomerAndCreditSummary(
|
|
2504
1587
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2505
1588
|
{ responseHeaders } = { responseHeaders: false }
|
|
2506
1589
|
) {
|
|
2507
|
-
let invalidInput = [];
|
|
2508
|
-
if (invalidInput.length) {
|
|
2509
|
-
const error = new Error();
|
|
2510
|
-
error.message = "Missing required field";
|
|
2511
|
-
error.details = invalidInput;
|
|
2512
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
1590
|
const query_params = {};
|
|
2516
1591
|
|
|
2517
1592
|
const xHeaders = {};
|
|
@@ -2520,7 +1595,7 @@ class Payment {
|
|
|
2520
1595
|
this._conf,
|
|
2521
1596
|
"post",
|
|
2522
1597
|
constructUrl({
|
|
2523
|
-
url: this._urls["
|
|
1598
|
+
url: this._urls["validateCustomerAndCreditSummary"],
|
|
2524
1599
|
params: {},
|
|
2525
1600
|
}),
|
|
2526
1601
|
query_params,
|
|
@@ -2540,23 +1615,15 @@ class Payment {
|
|
|
2540
1615
|
/**
|
|
2541
1616
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2542
1617
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2543
|
-
* @returns {Promise<
|
|
1618
|
+
* @returns {Promise<ValidateVPADetails>} - Success response
|
|
2544
1619
|
* @name validateVPA
|
|
2545
|
-
* @summary: Validate VPA
|
|
1620
|
+
* @summary: Validate VPA
|
|
2546
1621
|
* @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/).
|
|
2547
1622
|
*/
|
|
2548
1623
|
async validateVPA(
|
|
2549
1624
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2550
1625
|
{ responseHeaders } = { responseHeaders: false }
|
|
2551
1626
|
) {
|
|
2552
|
-
let invalidInput = [];
|
|
2553
|
-
if (invalidInput.length) {
|
|
2554
|
-
const error = new Error();
|
|
2555
|
-
error.message = "Missing required field";
|
|
2556
|
-
error.details = invalidInput;
|
|
2557
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
1627
|
const query_params = {};
|
|
2561
1628
|
|
|
2562
1629
|
const xHeaders = {};
|
|
@@ -2585,7 +1652,7 @@ class Payment {
|
|
|
2585
1652
|
/**
|
|
2586
1653
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2587
1654
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2588
|
-
* @returns {Promise<
|
|
1655
|
+
* @returns {Promise<ChargeCustomerDetails>} - Success response
|
|
2589
1656
|
* @name verifyAndChargePayment
|
|
2590
1657
|
* @summary: Verify order confirmation and charge
|
|
2591
1658
|
* @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/).
|
|
@@ -2594,14 +1661,6 @@ class Payment {
|
|
|
2594
1661
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2595
1662
|
{ responseHeaders } = { responseHeaders: false }
|
|
2596
1663
|
) {
|
|
2597
|
-
let invalidInput = [];
|
|
2598
|
-
if (invalidInput.length) {
|
|
2599
|
-
const error = new Error();
|
|
2600
|
-
error.message = "Missing required field";
|
|
2601
|
-
error.details = invalidInput;
|
|
2602
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
1664
|
const query_params = {};
|
|
2606
1665
|
|
|
2607
1666
|
const xHeaders = {};
|
|
@@ -2630,23 +1689,15 @@ class Payment {
|
|
|
2630
1689
|
/**
|
|
2631
1690
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2632
1691
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2633
|
-
* @returns {Promise<
|
|
1692
|
+
* @returns {Promise<ValidateCustomerDetails>} - Success response
|
|
2634
1693
|
* @name verifyCustomerForPayment
|
|
2635
|
-
* @summary: Verify payment customer
|
|
1694
|
+
* @summary: Verify payment customer
|
|
2636
1695
|
* @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/).
|
|
2637
1696
|
*/
|
|
2638
1697
|
async verifyCustomerForPayment(
|
|
2639
1698
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2640
1699
|
{ responseHeaders } = { responseHeaders: false }
|
|
2641
1700
|
) {
|
|
2642
|
-
let invalidInput = [];
|
|
2643
|
-
if (invalidInput.length) {
|
|
2644
|
-
const error = new Error();
|
|
2645
|
-
error.message = "Missing required field";
|
|
2646
|
-
error.details = invalidInput;
|
|
2647
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
1701
|
const query_params = {};
|
|
2651
1702
|
|
|
2652
1703
|
const xHeaders = {};
|
|
@@ -2675,7 +1726,7 @@ class Payment {
|
|
|
2675
1726
|
/**
|
|
2676
1727
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2677
1728
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2678
|
-
* @returns {Promise<
|
|
1729
|
+
* @returns {Promise<IfscCodeDetails>} - Success response
|
|
2679
1730
|
* @name verifyIfscCode
|
|
2680
1731
|
* @summary: Verify IFSC
|
|
2681
1732
|
* @description: Validate IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/).
|
|
@@ -2684,14 +1735,6 @@ class Payment {
|
|
|
2684
1735
|
{ ifscCode, requestHeaders } = { requestHeaders: {} },
|
|
2685
1736
|
{ responseHeaders } = { responseHeaders: false }
|
|
2686
1737
|
) {
|
|
2687
|
-
let invalidInput = [];
|
|
2688
|
-
if (invalidInput.length) {
|
|
2689
|
-
const error = new Error();
|
|
2690
|
-
error.message = "Missing required field";
|
|
2691
|
-
error.details = invalidInput;
|
|
2692
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
1738
|
const query_params = {};
|
|
2696
1739
|
query_params["ifsc_code"] = ifscCode;
|
|
2697
1740
|
|
|
@@ -2721,23 +1764,15 @@ class Payment {
|
|
|
2721
1764
|
/**
|
|
2722
1765
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2723
1766
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2724
|
-
* @returns {Promise<
|
|
1767
|
+
* @returns {Promise<AddBeneficiaryViaOtpVerificationDetails>} - Success response
|
|
2725
1768
|
* @name verifyOtpAndAddBeneficiaryForBank
|
|
2726
|
-
* @summary: Verify OTP for bank
|
|
1769
|
+
* @summary: Verify OTP for bank and add beneficiary
|
|
2727
1770
|
* @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/).
|
|
2728
1771
|
*/
|
|
2729
1772
|
async verifyOtpAndAddBeneficiaryForBank(
|
|
2730
1773
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2731
1774
|
{ responseHeaders } = { responseHeaders: false }
|
|
2732
1775
|
) {
|
|
2733
|
-
let invalidInput = [];
|
|
2734
|
-
if (invalidInput.length) {
|
|
2735
|
-
const error = new Error();
|
|
2736
|
-
error.message = "Missing required field";
|
|
2737
|
-
error.details = invalidInput;
|
|
2738
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
1776
|
const query_params = {};
|
|
2742
1777
|
|
|
2743
1778
|
const xHeaders = {};
|
|
@@ -2766,23 +1801,15 @@ class Payment {
|
|
|
2766
1801
|
/**
|
|
2767
1802
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2768
1803
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2769
|
-
* @returns {Promise<
|
|
1804
|
+
* @returns {Promise<WalletOtpDetails>} - Success response
|
|
2770
1805
|
* @name verifyOtpAndAddBeneficiaryForWallet
|
|
2771
|
-
* @summary: Verify OTP for wallet
|
|
1806
|
+
* @summary: Verify OTP for wallet
|
|
2772
1807
|
* @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/).
|
|
2773
1808
|
*/
|
|
2774
1809
|
async verifyOtpAndAddBeneficiaryForWallet(
|
|
2775
1810
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2776
1811
|
{ responseHeaders } = { responseHeaders: false }
|
|
2777
1812
|
) {
|
|
2778
|
-
let invalidInput = [];
|
|
2779
|
-
if (invalidInput.length) {
|
|
2780
|
-
const error = new Error();
|
|
2781
|
-
error.message = "Missing required field";
|
|
2782
|
-
error.details = invalidInput;
|
|
2783
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
1813
|
const query_params = {};
|
|
2787
1814
|
|
|
2788
1815
|
const xHeaders = {};
|
|
@@ -2820,14 +1847,6 @@ class Payment {
|
|
|
2820
1847
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2821
1848
|
{ responseHeaders } = { responseHeaders: false }
|
|
2822
1849
|
) {
|
|
2823
|
-
let invalidInput = [];
|
|
2824
|
-
if (invalidInput.length) {
|
|
2825
|
-
const error = new Error();
|
|
2826
|
-
error.message = "Missing required field";
|
|
2827
|
-
error.details = invalidInput;
|
|
2828
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
1850
|
const query_params = {};
|
|
2832
1851
|
|
|
2833
1852
|
const xHeaders = {};
|