@gofynd/fdk-client-javascript 1.1.6 → 1.3.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 +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const PaymentApplicationValidator = require("./PaymentApplicationValidator");
|
|
6
|
+
const PaymentApplicationModel = require("./PaymentApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -99,14 +99,22 @@ class Payment {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* @param {
|
|
103
|
-
* @param {
|
|
104
|
-
* @
|
|
102
|
+
* @param {PaymentApplicationValidator.AddBeneficiaryDetailsParam} arg - Arg object.
|
|
103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
104
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
105
|
+
* @returns {Promise<PaymentApplicationModel.RefundAccountResponse>} -
|
|
106
|
+
* Success response
|
|
107
|
+
* @name addBeneficiaryDetails
|
|
105
108
|
* @summary: Save bank details for cancelled/returned order
|
|
106
|
-
* @description: Use this API to save the bank details for a returned or cancelled order to refund the amount.
|
|
109
|
+
* @description: Use this API to save the bank details for a returned or cancelled order to refund the amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/).
|
|
107
110
|
*/
|
|
108
|
-
async addBeneficiaryDetails(
|
|
109
|
-
|
|
111
|
+
async addBeneficiaryDetails(
|
|
112
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
113
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
114
|
+
) {
|
|
115
|
+
const {
|
|
116
|
+
error,
|
|
117
|
+
} = PaymentApplicationValidator.addBeneficiaryDetails().validate(
|
|
110
118
|
{ body },
|
|
111
119
|
{ abortEarly: false, allowUnknown: true }
|
|
112
120
|
);
|
|
@@ -117,16 +125,15 @@ class Payment {
|
|
|
117
125
|
// Showing warrnings if extra unknown parameters are found
|
|
118
126
|
const {
|
|
119
127
|
error: warrning,
|
|
120
|
-
} =
|
|
128
|
+
} = PaymentApplicationValidator.addBeneficiaryDetails().validate(
|
|
121
129
|
{ body },
|
|
122
130
|
{ abortEarly: false, allowUnknown: false }
|
|
123
131
|
);
|
|
124
132
|
if (warrning) {
|
|
125
133
|
Logger({
|
|
126
134
|
level: "WARN",
|
|
127
|
-
message:
|
|
135
|
+
message: `Parameter Validation warrnings for application > Payment > addBeneficiaryDetails \n ${warrning}`,
|
|
128
136
|
});
|
|
129
|
-
Logger({ level: "WARN", message: warrning });
|
|
130
137
|
}
|
|
131
138
|
|
|
132
139
|
const query_params = {};
|
|
@@ -142,12 +149,18 @@ class Payment {
|
|
|
142
149
|
}),
|
|
143
150
|
query_params,
|
|
144
151
|
body,
|
|
145
|
-
xHeaders
|
|
152
|
+
{ ...xHeaders, ...requestHeaders },
|
|
153
|
+
{ responseHeaders }
|
|
146
154
|
);
|
|
147
155
|
|
|
156
|
+
let responseData = response;
|
|
157
|
+
if (responseHeaders) {
|
|
158
|
+
responseData = response[0];
|
|
159
|
+
}
|
|
160
|
+
|
|
148
161
|
const {
|
|
149
162
|
error: res_error,
|
|
150
|
-
} =
|
|
163
|
+
} = PaymentApplicationModel.RefundAccountResponse().validate(responseData, {
|
|
151
164
|
abortEarly: false,
|
|
152
165
|
allowUnknown: false,
|
|
153
166
|
});
|
|
@@ -155,23 +168,32 @@ class Payment {
|
|
|
155
168
|
if (res_error) {
|
|
156
169
|
Logger({
|
|
157
170
|
level: "WARN",
|
|
158
|
-
message:
|
|
171
|
+
message: `Response Validation Warnnings for application > Payment > addBeneficiaryDetails \n ${res_error}`,
|
|
159
172
|
});
|
|
160
|
-
Logger({ level: "WARN", message: res_error });
|
|
161
173
|
}
|
|
162
174
|
|
|
163
175
|
return response;
|
|
164
176
|
}
|
|
165
177
|
|
|
166
178
|
/**
|
|
167
|
-
* @param {
|
|
168
|
-
*
|
|
169
|
-
*
|
|
179
|
+
* @param {PaymentApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
|
|
180
|
+
* - Arg object.
|
|
181
|
+
*
|
|
182
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
183
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
184
|
+
* @returns {Promise<PaymentApplicationModel.RefundAccountResponse>} -
|
|
185
|
+
* Success response
|
|
186
|
+
* @name addRefundBankAccountUsingOTP
|
|
170
187
|
* @summary: Save bank details for cancelled/returned order
|
|
171
|
-
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account.
|
|
188
|
+
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/).
|
|
172
189
|
*/
|
|
173
|
-
async addRefundBankAccountUsingOTP(
|
|
174
|
-
|
|
190
|
+
async addRefundBankAccountUsingOTP(
|
|
191
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
192
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
193
|
+
) {
|
|
194
|
+
const {
|
|
195
|
+
error,
|
|
196
|
+
} = PaymentApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
175
197
|
{ body },
|
|
176
198
|
{ abortEarly: false, allowUnknown: true }
|
|
177
199
|
);
|
|
@@ -182,17 +204,15 @@ class Payment {
|
|
|
182
204
|
// Showing warrnings if extra unknown parameters are found
|
|
183
205
|
const {
|
|
184
206
|
error: warrning,
|
|
185
|
-
} =
|
|
207
|
+
} = PaymentApplicationValidator.addRefundBankAccountUsingOTP().validate(
|
|
186
208
|
{ body },
|
|
187
209
|
{ abortEarly: false, allowUnknown: false }
|
|
188
210
|
);
|
|
189
211
|
if (warrning) {
|
|
190
212
|
Logger({
|
|
191
213
|
level: "WARN",
|
|
192
|
-
message:
|
|
193
|
-
"Parameter Validation warrnings for addRefundBankAccountUsingOTP",
|
|
214
|
+
message: `Parameter Validation warrnings for application > Payment > addRefundBankAccountUsingOTP \n ${warrning}`,
|
|
194
215
|
});
|
|
195
|
-
Logger({ level: "WARN", message: warrning });
|
|
196
216
|
}
|
|
197
217
|
|
|
198
218
|
const query_params = {};
|
|
@@ -208,12 +228,18 @@ class Payment {
|
|
|
208
228
|
}),
|
|
209
229
|
query_params,
|
|
210
230
|
body,
|
|
211
|
-
xHeaders
|
|
231
|
+
{ ...xHeaders, ...requestHeaders },
|
|
232
|
+
{ responseHeaders }
|
|
212
233
|
);
|
|
213
234
|
|
|
235
|
+
let responseData = response;
|
|
236
|
+
if (responseHeaders) {
|
|
237
|
+
responseData = response[0];
|
|
238
|
+
}
|
|
239
|
+
|
|
214
240
|
const {
|
|
215
241
|
error: res_error,
|
|
216
|
-
} =
|
|
242
|
+
} = PaymentApplicationModel.RefundAccountResponse().validate(responseData, {
|
|
217
243
|
abortEarly: false,
|
|
218
244
|
allowUnknown: false,
|
|
219
245
|
});
|
|
@@ -221,24 +247,29 @@ class Payment {
|
|
|
221
247
|
if (res_error) {
|
|
222
248
|
Logger({
|
|
223
249
|
level: "WARN",
|
|
224
|
-
message:
|
|
225
|
-
"Response Validation Warnnings for addRefundBankAccountUsingOTP",
|
|
250
|
+
message: `Response Validation Warnnings for application > Payment > addRefundBankAccountUsingOTP \n ${res_error}`,
|
|
226
251
|
});
|
|
227
|
-
Logger({ level: "WARN", message: res_error });
|
|
228
252
|
}
|
|
229
253
|
|
|
230
254
|
return response;
|
|
231
255
|
}
|
|
232
256
|
|
|
233
257
|
/**
|
|
234
|
-
* @param {
|
|
235
|
-
* @param {
|
|
236
|
-
* @
|
|
258
|
+
* @param {PaymentApplicationValidator.AttachCardToCustomerParam} arg - Arg object.
|
|
259
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
260
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
261
|
+
* @returns {Promise<PaymentApplicationModel.AttachCardsResponse>} - Success response
|
|
262
|
+
* @name attachCardToCustomer
|
|
237
263
|
* @summary: Attach a saved card to customer.
|
|
238
|
-
* @description: Use this API to attach a customer's saved card at the payment gateway, such as Stripe, Juspay.
|
|
264
|
+
* @description: Use this API to attach a customer's saved card at the payment gateway, such as Stripe, Juspay. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/).
|
|
239
265
|
*/
|
|
240
|
-
async attachCardToCustomer(
|
|
241
|
-
|
|
266
|
+
async attachCardToCustomer(
|
|
267
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
268
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
269
|
+
) {
|
|
270
|
+
const {
|
|
271
|
+
error,
|
|
272
|
+
} = PaymentApplicationValidator.attachCardToCustomer().validate(
|
|
242
273
|
{ body },
|
|
243
274
|
{ abortEarly: false, allowUnknown: true }
|
|
244
275
|
);
|
|
@@ -249,16 +280,15 @@ class Payment {
|
|
|
249
280
|
// Showing warrnings if extra unknown parameters are found
|
|
250
281
|
const {
|
|
251
282
|
error: warrning,
|
|
252
|
-
} =
|
|
283
|
+
} = PaymentApplicationValidator.attachCardToCustomer().validate(
|
|
253
284
|
{ body },
|
|
254
285
|
{ abortEarly: false, allowUnknown: false }
|
|
255
286
|
);
|
|
256
287
|
if (warrning) {
|
|
257
288
|
Logger({
|
|
258
289
|
level: "WARN",
|
|
259
|
-
message:
|
|
290
|
+
message: `Parameter Validation warrnings for application > Payment > attachCardToCustomer \n ${warrning}`,
|
|
260
291
|
});
|
|
261
|
-
Logger({ level: "WARN", message: warrning });
|
|
262
292
|
}
|
|
263
293
|
|
|
264
294
|
const query_params = {};
|
|
@@ -274,12 +304,18 @@ class Payment {
|
|
|
274
304
|
}),
|
|
275
305
|
query_params,
|
|
276
306
|
body,
|
|
277
|
-
xHeaders
|
|
307
|
+
{ ...xHeaders, ...requestHeaders },
|
|
308
|
+
{ responseHeaders }
|
|
278
309
|
);
|
|
279
310
|
|
|
311
|
+
let responseData = response;
|
|
312
|
+
if (responseHeaders) {
|
|
313
|
+
responseData = response[0];
|
|
314
|
+
}
|
|
315
|
+
|
|
280
316
|
const {
|
|
281
317
|
error: res_error,
|
|
282
|
-
} =
|
|
318
|
+
} = PaymentApplicationModel.AttachCardsResponse().validate(responseData, {
|
|
283
319
|
abortEarly: false,
|
|
284
320
|
allowUnknown: false,
|
|
285
321
|
});
|
|
@@ -287,23 +323,28 @@ class Payment {
|
|
|
287
323
|
if (res_error) {
|
|
288
324
|
Logger({
|
|
289
325
|
level: "WARN",
|
|
290
|
-
message:
|
|
326
|
+
message: `Response Validation Warnnings for application > Payment > attachCardToCustomer \n ${res_error}`,
|
|
291
327
|
});
|
|
292
|
-
Logger({ level: "WARN", message: res_error });
|
|
293
328
|
}
|
|
294
329
|
|
|
295
330
|
return response;
|
|
296
331
|
}
|
|
297
332
|
|
|
298
333
|
/**
|
|
299
|
-
* @param {
|
|
300
|
-
* @param {
|
|
301
|
-
* @
|
|
334
|
+
* @param {PaymentApplicationValidator.CancelPaymentLinkParam} arg - Arg object.
|
|
335
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
336
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
337
|
+
* @returns {Promise<PaymentApplicationModel.CancelPaymentLinkResponse>} -
|
|
338
|
+
* Success response
|
|
339
|
+
* @name cancelPaymentLink
|
|
302
340
|
* @summary: Cancel payment link
|
|
303
|
-
* @description: Use this API to cancel a payment link for the customer
|
|
341
|
+
* @description: Use this API to cancel a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
|
|
304
342
|
*/
|
|
305
|
-
async cancelPaymentLink(
|
|
306
|
-
|
|
343
|
+
async cancelPaymentLink(
|
|
344
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
345
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
346
|
+
) {
|
|
347
|
+
const { error } = PaymentApplicationValidator.cancelPaymentLink().validate(
|
|
307
348
|
{ body },
|
|
308
349
|
{ abortEarly: false, allowUnknown: true }
|
|
309
350
|
);
|
|
@@ -312,16 +353,17 @@ class Payment {
|
|
|
312
353
|
}
|
|
313
354
|
|
|
314
355
|
// Showing warrnings if extra unknown parameters are found
|
|
315
|
-
const {
|
|
356
|
+
const {
|
|
357
|
+
error: warrning,
|
|
358
|
+
} = PaymentApplicationValidator.cancelPaymentLink().validate(
|
|
316
359
|
{ body },
|
|
317
360
|
{ abortEarly: false, allowUnknown: false }
|
|
318
361
|
);
|
|
319
362
|
if (warrning) {
|
|
320
363
|
Logger({
|
|
321
364
|
level: "WARN",
|
|
322
|
-
message:
|
|
365
|
+
message: `Parameter Validation warrnings for application > Payment > cancelPaymentLink \n ${warrning}`,
|
|
323
366
|
});
|
|
324
|
-
Logger({ level: "WARN", message: warrning });
|
|
325
367
|
}
|
|
326
368
|
|
|
327
369
|
const query_params = {};
|
|
@@ -337,37 +379,46 @@ class Payment {
|
|
|
337
379
|
}),
|
|
338
380
|
query_params,
|
|
339
381
|
body,
|
|
340
|
-
xHeaders
|
|
382
|
+
{ ...xHeaders, ...requestHeaders },
|
|
383
|
+
{ responseHeaders }
|
|
341
384
|
);
|
|
342
385
|
|
|
386
|
+
let responseData = response;
|
|
387
|
+
if (responseHeaders) {
|
|
388
|
+
responseData = response[0];
|
|
389
|
+
}
|
|
390
|
+
|
|
343
391
|
const {
|
|
344
392
|
error: res_error,
|
|
345
|
-
} =
|
|
346
|
-
|
|
347
|
-
allowUnknown: false
|
|
348
|
-
|
|
393
|
+
} = PaymentApplicationModel.CancelPaymentLinkResponse().validate(
|
|
394
|
+
responseData,
|
|
395
|
+
{ abortEarly: false, allowUnknown: false }
|
|
396
|
+
);
|
|
349
397
|
|
|
350
398
|
if (res_error) {
|
|
351
399
|
Logger({
|
|
352
400
|
level: "WARN",
|
|
353
|
-
message:
|
|
401
|
+
message: `Response Validation Warnnings for application > Payment > cancelPaymentLink \n ${res_error}`,
|
|
354
402
|
});
|
|
355
|
-
Logger({ level: "WARN", message: res_error });
|
|
356
403
|
}
|
|
357
404
|
|
|
358
405
|
return response;
|
|
359
406
|
}
|
|
360
407
|
|
|
361
408
|
/**
|
|
362
|
-
* @param {
|
|
363
|
-
* @param {
|
|
364
|
-
* @param {
|
|
365
|
-
* @returns {Promise<CardDetailsResponse>} - Success response
|
|
409
|
+
* @param {PaymentApplicationValidator.CardDetailsParam} arg - Arg object.
|
|
410
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
411
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
412
|
+
* @returns {Promise<PaymentApplicationModel.CardDetailsResponse>} - Success response
|
|
413
|
+
* @name cardDetails
|
|
366
414
|
* @summary: API to get Card info from PG
|
|
367
|
-
* @description: API to get Card info from PG
|
|
415
|
+
* @description: API to get Card info from PG - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
|
|
368
416
|
*/
|
|
369
|
-
async cardDetails(
|
|
370
|
-
|
|
417
|
+
async cardDetails(
|
|
418
|
+
{ cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
419
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
420
|
+
) {
|
|
421
|
+
const { error } = PaymentApplicationValidator.cardDetails().validate(
|
|
371
422
|
{ cardInfo, aggregator },
|
|
372
423
|
{ abortEarly: false, allowUnknown: true }
|
|
373
424
|
);
|
|
@@ -376,16 +427,17 @@ class Payment {
|
|
|
376
427
|
}
|
|
377
428
|
|
|
378
429
|
// Showing warrnings if extra unknown parameters are found
|
|
379
|
-
const {
|
|
430
|
+
const {
|
|
431
|
+
error: warrning,
|
|
432
|
+
} = PaymentApplicationValidator.cardDetails().validate(
|
|
380
433
|
{ cardInfo, aggregator },
|
|
381
434
|
{ abortEarly: false, allowUnknown: false }
|
|
382
435
|
);
|
|
383
436
|
if (warrning) {
|
|
384
437
|
Logger({
|
|
385
438
|
level: "WARN",
|
|
386
|
-
message:
|
|
439
|
+
message: `Parameter Validation warrnings for application > Payment > cardDetails \n ${warrning}`,
|
|
387
440
|
});
|
|
388
|
-
Logger({ level: "WARN", message: warrning });
|
|
389
441
|
}
|
|
390
442
|
|
|
391
443
|
const query_params = {};
|
|
@@ -402,12 +454,18 @@ class Payment {
|
|
|
402
454
|
}),
|
|
403
455
|
query_params,
|
|
404
456
|
undefined,
|
|
405
|
-
xHeaders
|
|
457
|
+
{ ...xHeaders, ...requestHeaders },
|
|
458
|
+
{ responseHeaders }
|
|
406
459
|
);
|
|
407
460
|
|
|
461
|
+
let responseData = response;
|
|
462
|
+
if (responseHeaders) {
|
|
463
|
+
responseData = response[0];
|
|
464
|
+
}
|
|
465
|
+
|
|
408
466
|
const {
|
|
409
467
|
error: res_error,
|
|
410
|
-
} =
|
|
468
|
+
} = PaymentApplicationModel.CardDetailsResponse().validate(responseData, {
|
|
411
469
|
abortEarly: false,
|
|
412
470
|
allowUnknown: false,
|
|
413
471
|
});
|
|
@@ -415,23 +473,33 @@ class Payment {
|
|
|
415
473
|
if (res_error) {
|
|
416
474
|
Logger({
|
|
417
475
|
level: "WARN",
|
|
418
|
-
message:
|
|
476
|
+
message: `Response Validation Warnnings for application > Payment > cardDetails \n ${res_error}`,
|
|
419
477
|
});
|
|
420
|
-
Logger({ level: "WARN", message: res_error });
|
|
421
478
|
}
|
|
422
479
|
|
|
423
480
|
return response;
|
|
424
481
|
}
|
|
425
482
|
|
|
426
483
|
/**
|
|
427
|
-
* @param {
|
|
428
|
-
*
|
|
429
|
-
*
|
|
484
|
+
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
|
|
485
|
+
* - Arg object.
|
|
486
|
+
*
|
|
487
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
488
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
489
|
+
* @returns {Promise<PaymentApplicationModel.PaymentStatusUpdateResponse>}
|
|
490
|
+
* - Success response
|
|
491
|
+
*
|
|
492
|
+
* @name checkAndUpdatePaymentStatus
|
|
430
493
|
* @summary: Performs continuous polling to check status of payment on the server
|
|
431
|
-
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout.
|
|
494
|
+
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/).
|
|
432
495
|
*/
|
|
433
|
-
async checkAndUpdatePaymentStatus(
|
|
434
|
-
|
|
496
|
+
async checkAndUpdatePaymentStatus(
|
|
497
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
498
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
499
|
+
) {
|
|
500
|
+
const {
|
|
501
|
+
error,
|
|
502
|
+
} = PaymentApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
435
503
|
{ body },
|
|
436
504
|
{ abortEarly: false, allowUnknown: true }
|
|
437
505
|
);
|
|
@@ -442,17 +510,15 @@ class Payment {
|
|
|
442
510
|
// Showing warrnings if extra unknown parameters are found
|
|
443
511
|
const {
|
|
444
512
|
error: warrning,
|
|
445
|
-
} =
|
|
513
|
+
} = PaymentApplicationValidator.checkAndUpdatePaymentStatus().validate(
|
|
446
514
|
{ body },
|
|
447
515
|
{ abortEarly: false, allowUnknown: false }
|
|
448
516
|
);
|
|
449
517
|
if (warrning) {
|
|
450
518
|
Logger({
|
|
451
519
|
level: "WARN",
|
|
452
|
-
message:
|
|
453
|
-
"Parameter Validation warrnings for checkAndUpdatePaymentStatus",
|
|
520
|
+
message: `Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatus \n ${warrning}`,
|
|
454
521
|
});
|
|
455
|
-
Logger({ level: "WARN", message: warrning });
|
|
456
522
|
}
|
|
457
523
|
|
|
458
524
|
const query_params = {};
|
|
@@ -468,39 +534,52 @@ class Payment {
|
|
|
468
534
|
}),
|
|
469
535
|
query_params,
|
|
470
536
|
body,
|
|
471
|
-
xHeaders
|
|
537
|
+
{ ...xHeaders, ...requestHeaders },
|
|
538
|
+
{ responseHeaders }
|
|
472
539
|
);
|
|
473
540
|
|
|
541
|
+
let responseData = response;
|
|
542
|
+
if (responseHeaders) {
|
|
543
|
+
responseData = response[0];
|
|
544
|
+
}
|
|
545
|
+
|
|
474
546
|
const {
|
|
475
547
|
error: res_error,
|
|
476
|
-
} =
|
|
477
|
-
|
|
478
|
-
allowUnknown: false
|
|
479
|
-
|
|
548
|
+
} = PaymentApplicationModel.PaymentStatusUpdateResponse().validate(
|
|
549
|
+
responseData,
|
|
550
|
+
{ abortEarly: false, allowUnknown: false }
|
|
551
|
+
);
|
|
480
552
|
|
|
481
553
|
if (res_error) {
|
|
482
554
|
Logger({
|
|
483
555
|
level: "WARN",
|
|
484
|
-
message:
|
|
485
|
-
"Response Validation Warnnings for checkAndUpdatePaymentStatus",
|
|
556
|
+
message: `Response Validation Warnnings for application > Payment > checkAndUpdatePaymentStatus \n ${res_error}`,
|
|
486
557
|
});
|
|
487
|
-
Logger({ level: "WARN", message: res_error });
|
|
488
558
|
}
|
|
489
559
|
|
|
490
560
|
return response;
|
|
491
561
|
}
|
|
492
562
|
|
|
493
563
|
/**
|
|
494
|
-
* @param {
|
|
495
|
-
*
|
|
496
|
-
*
|
|
564
|
+
* @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusPaymentLinkParam} arg
|
|
565
|
+
* - Arg object.
|
|
566
|
+
*
|
|
567
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
568
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
569
|
+
* @returns {Promise<PaymentApplicationModel.PaymentStatusUpdateResponse>}
|
|
570
|
+
* - Success response
|
|
571
|
+
*
|
|
572
|
+
* @name checkAndUpdatePaymentStatusPaymentLink
|
|
497
573
|
* @summary: Performs continuous polling to check status of payment on the server
|
|
498
|
-
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout.
|
|
574
|
+
* @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/).
|
|
499
575
|
*/
|
|
500
|
-
async checkAndUpdatePaymentStatusPaymentLink(
|
|
576
|
+
async checkAndUpdatePaymentStatusPaymentLink(
|
|
577
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
578
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
579
|
+
) {
|
|
501
580
|
const {
|
|
502
581
|
error,
|
|
503
|
-
} =
|
|
582
|
+
} = PaymentApplicationValidator.checkAndUpdatePaymentStatusPaymentLink().validate(
|
|
504
583
|
{ body },
|
|
505
584
|
{ abortEarly: false, allowUnknown: true }
|
|
506
585
|
);
|
|
@@ -511,17 +590,15 @@ class Payment {
|
|
|
511
590
|
// Showing warrnings if extra unknown parameters are found
|
|
512
591
|
const {
|
|
513
592
|
error: warrning,
|
|
514
|
-
} =
|
|
593
|
+
} = PaymentApplicationValidator.checkAndUpdatePaymentStatusPaymentLink().validate(
|
|
515
594
|
{ body },
|
|
516
595
|
{ abortEarly: false, allowUnknown: false }
|
|
517
596
|
);
|
|
518
597
|
if (warrning) {
|
|
519
598
|
Logger({
|
|
520
599
|
level: "WARN",
|
|
521
|
-
message:
|
|
522
|
-
"Parameter Validation warrnings for checkAndUpdatePaymentStatusPaymentLink",
|
|
600
|
+
message: `Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${warrning}`,
|
|
523
601
|
});
|
|
524
|
-
Logger({ level: "WARN", message: warrning });
|
|
525
602
|
}
|
|
526
603
|
|
|
527
604
|
const query_params = {};
|
|
@@ -537,37 +614,46 @@ class Payment {
|
|
|
537
614
|
}),
|
|
538
615
|
query_params,
|
|
539
616
|
body,
|
|
540
|
-
xHeaders
|
|
617
|
+
{ ...xHeaders, ...requestHeaders },
|
|
618
|
+
{ responseHeaders }
|
|
541
619
|
);
|
|
542
620
|
|
|
621
|
+
let responseData = response;
|
|
622
|
+
if (responseHeaders) {
|
|
623
|
+
responseData = response[0];
|
|
624
|
+
}
|
|
625
|
+
|
|
543
626
|
const {
|
|
544
627
|
error: res_error,
|
|
545
|
-
} =
|
|
546
|
-
|
|
547
|
-
allowUnknown: false
|
|
548
|
-
|
|
628
|
+
} = PaymentApplicationModel.PaymentStatusUpdateResponse().validate(
|
|
629
|
+
responseData,
|
|
630
|
+
{ abortEarly: false, allowUnknown: false }
|
|
631
|
+
);
|
|
549
632
|
|
|
550
633
|
if (res_error) {
|
|
551
634
|
Logger({
|
|
552
635
|
level: "WARN",
|
|
553
|
-
message:
|
|
554
|
-
"Response Validation Warnnings for checkAndUpdatePaymentStatusPaymentLink",
|
|
636
|
+
message: `Response Validation Warnnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${res_error}`,
|
|
555
637
|
});
|
|
556
|
-
Logger({ level: "WARN", message: res_error });
|
|
557
638
|
}
|
|
558
639
|
|
|
559
640
|
return response;
|
|
560
641
|
}
|
|
561
642
|
|
|
562
643
|
/**
|
|
563
|
-
* @param {
|
|
564
|
-
* @param {
|
|
565
|
-
* @
|
|
644
|
+
* @param {PaymentApplicationValidator.CheckCreditParam} arg - Arg object.
|
|
645
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
646
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
647
|
+
* @returns {Promise<PaymentApplicationModel.CheckCreditResponse>} - Success response
|
|
648
|
+
* @name checkCredit
|
|
566
649
|
* @summary: API to fetch the customer credit summary
|
|
567
|
-
* @description: Use this API to fetch the customer credit summary.
|
|
650
|
+
* @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/).
|
|
568
651
|
*/
|
|
569
|
-
async checkCredit(
|
|
570
|
-
|
|
652
|
+
async checkCredit(
|
|
653
|
+
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
654
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
655
|
+
) {
|
|
656
|
+
const { error } = PaymentApplicationValidator.checkCredit().validate(
|
|
571
657
|
{ aggregator },
|
|
572
658
|
{ abortEarly: false, allowUnknown: true }
|
|
573
659
|
);
|
|
@@ -576,16 +662,17 @@ class Payment {
|
|
|
576
662
|
}
|
|
577
663
|
|
|
578
664
|
// Showing warrnings if extra unknown parameters are found
|
|
579
|
-
const {
|
|
665
|
+
const {
|
|
666
|
+
error: warrning,
|
|
667
|
+
} = PaymentApplicationValidator.checkCredit().validate(
|
|
580
668
|
{ aggregator },
|
|
581
669
|
{ abortEarly: false, allowUnknown: false }
|
|
582
670
|
);
|
|
583
671
|
if (warrning) {
|
|
584
672
|
Logger({
|
|
585
673
|
level: "WARN",
|
|
586
|
-
message:
|
|
674
|
+
message: `Parameter Validation warrnings for application > Payment > checkCredit \n ${warrning}`,
|
|
587
675
|
});
|
|
588
|
-
Logger({ level: "WARN", message: warrning });
|
|
589
676
|
}
|
|
590
677
|
|
|
591
678
|
const query_params = {};
|
|
@@ -602,12 +689,18 @@ class Payment {
|
|
|
602
689
|
}),
|
|
603
690
|
query_params,
|
|
604
691
|
undefined,
|
|
605
|
-
xHeaders
|
|
692
|
+
{ ...xHeaders, ...requestHeaders },
|
|
693
|
+
{ responseHeaders }
|
|
606
694
|
);
|
|
607
695
|
|
|
696
|
+
let responseData = response;
|
|
697
|
+
if (responseHeaders) {
|
|
698
|
+
responseData = response[0];
|
|
699
|
+
}
|
|
700
|
+
|
|
608
701
|
const {
|
|
609
702
|
error: res_error,
|
|
610
|
-
} =
|
|
703
|
+
} = PaymentApplicationModel.CheckCreditResponse().validate(responseData, {
|
|
611
704
|
abortEarly: false,
|
|
612
705
|
allowUnknown: false,
|
|
613
706
|
});
|
|
@@ -615,23 +708,32 @@ class Payment {
|
|
|
615
708
|
if (res_error) {
|
|
616
709
|
Logger({
|
|
617
710
|
level: "WARN",
|
|
618
|
-
message:
|
|
711
|
+
message: `Response Validation Warnnings for application > Payment > checkCredit \n ${res_error}`,
|
|
619
712
|
});
|
|
620
|
-
Logger({ level: "WARN", message: res_error });
|
|
621
713
|
}
|
|
622
714
|
|
|
623
715
|
return response;
|
|
624
716
|
}
|
|
625
717
|
|
|
626
718
|
/**
|
|
627
|
-
* @param {
|
|
628
|
-
*
|
|
629
|
-
*
|
|
719
|
+
* @param {PaymentApplicationValidator.CreateOrderHandlerPaymentLinkParam} arg
|
|
720
|
+
* - Arg object.
|
|
721
|
+
*
|
|
722
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
723
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
724
|
+
* @returns {Promise<PaymentApplicationModel.CreateOrderUserResponse>} -
|
|
725
|
+
* Success response
|
|
726
|
+
* @name createOrderHandlerPaymentLink
|
|
630
727
|
* @summary: Create Order user
|
|
631
|
-
* @description: Use this API to create a order and payment on aggregator side
|
|
728
|
+
* @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/).
|
|
632
729
|
*/
|
|
633
|
-
async createOrderHandlerPaymentLink(
|
|
634
|
-
|
|
730
|
+
async createOrderHandlerPaymentLink(
|
|
731
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
732
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
733
|
+
) {
|
|
734
|
+
const {
|
|
735
|
+
error,
|
|
736
|
+
} = PaymentApplicationValidator.createOrderHandlerPaymentLink().validate(
|
|
635
737
|
{ body },
|
|
636
738
|
{ abortEarly: false, allowUnknown: true }
|
|
637
739
|
);
|
|
@@ -642,17 +744,15 @@ class Payment {
|
|
|
642
744
|
// Showing warrnings if extra unknown parameters are found
|
|
643
745
|
const {
|
|
644
746
|
error: warrning,
|
|
645
|
-
} =
|
|
747
|
+
} = PaymentApplicationValidator.createOrderHandlerPaymentLink().validate(
|
|
646
748
|
{ body },
|
|
647
749
|
{ abortEarly: false, allowUnknown: false }
|
|
648
750
|
);
|
|
649
751
|
if (warrning) {
|
|
650
752
|
Logger({
|
|
651
753
|
level: "WARN",
|
|
652
|
-
message:
|
|
653
|
-
"Parameter Validation warrnings for createOrderHandlerPaymentLink",
|
|
754
|
+
message: `Parameter Validation warrnings for application > Payment > createOrderHandlerPaymentLink \n ${warrning}`,
|
|
654
755
|
});
|
|
655
|
-
Logger({ level: "WARN", message: warrning });
|
|
656
756
|
}
|
|
657
757
|
|
|
658
758
|
const query_params = {};
|
|
@@ -668,37 +768,47 @@ class Payment {
|
|
|
668
768
|
}),
|
|
669
769
|
query_params,
|
|
670
770
|
body,
|
|
671
|
-
xHeaders
|
|
771
|
+
{ ...xHeaders, ...requestHeaders },
|
|
772
|
+
{ responseHeaders }
|
|
672
773
|
);
|
|
673
774
|
|
|
775
|
+
let responseData = response;
|
|
776
|
+
if (responseHeaders) {
|
|
777
|
+
responseData = response[0];
|
|
778
|
+
}
|
|
779
|
+
|
|
674
780
|
const {
|
|
675
781
|
error: res_error,
|
|
676
|
-
} =
|
|
677
|
-
|
|
678
|
-
allowUnknown: false
|
|
679
|
-
|
|
782
|
+
} = PaymentApplicationModel.CreateOrderUserResponse().validate(
|
|
783
|
+
responseData,
|
|
784
|
+
{ abortEarly: false, allowUnknown: false }
|
|
785
|
+
);
|
|
680
786
|
|
|
681
787
|
if (res_error) {
|
|
682
788
|
Logger({
|
|
683
789
|
level: "WARN",
|
|
684
|
-
message:
|
|
685
|
-
"Response Validation Warnnings for createOrderHandlerPaymentLink",
|
|
790
|
+
message: `Response Validation Warnnings for application > Payment > createOrderHandlerPaymentLink \n ${res_error}`,
|
|
686
791
|
});
|
|
687
|
-
Logger({ level: "WARN", message: res_error });
|
|
688
792
|
}
|
|
689
793
|
|
|
690
794
|
return response;
|
|
691
795
|
}
|
|
692
796
|
|
|
693
797
|
/**
|
|
694
|
-
* @param {
|
|
695
|
-
* @param {
|
|
696
|
-
* @
|
|
798
|
+
* @param {PaymentApplicationValidator.CreatePaymentLinkParam} arg - Arg object.
|
|
799
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
800
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
801
|
+
* @returns {Promise<PaymentApplicationModel.CreatePaymentLinkResponse>} -
|
|
802
|
+
* Success response
|
|
803
|
+
* @name createPaymentLink
|
|
697
804
|
* @summary: Create payment link
|
|
698
|
-
* @description: Use this API to create a payment link for the customer
|
|
805
|
+
* @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
|
|
699
806
|
*/
|
|
700
|
-
async createPaymentLink(
|
|
701
|
-
|
|
807
|
+
async createPaymentLink(
|
|
808
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
809
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
810
|
+
) {
|
|
811
|
+
const { error } = PaymentApplicationValidator.createPaymentLink().validate(
|
|
702
812
|
{ body },
|
|
703
813
|
{ abortEarly: false, allowUnknown: true }
|
|
704
814
|
);
|
|
@@ -707,16 +817,17 @@ class Payment {
|
|
|
707
817
|
}
|
|
708
818
|
|
|
709
819
|
// Showing warrnings if extra unknown parameters are found
|
|
710
|
-
const {
|
|
820
|
+
const {
|
|
821
|
+
error: warrning,
|
|
822
|
+
} = PaymentApplicationValidator.createPaymentLink().validate(
|
|
711
823
|
{ body },
|
|
712
824
|
{ abortEarly: false, allowUnknown: false }
|
|
713
825
|
);
|
|
714
826
|
if (warrning) {
|
|
715
827
|
Logger({
|
|
716
828
|
level: "WARN",
|
|
717
|
-
message:
|
|
829
|
+
message: `Parameter Validation warrnings for application > Payment > createPaymentLink \n ${warrning}`,
|
|
718
830
|
});
|
|
719
|
-
Logger({ level: "WARN", message: warrning });
|
|
720
831
|
}
|
|
721
832
|
|
|
722
833
|
const query_params = {};
|
|
@@ -732,36 +843,50 @@ class Payment {
|
|
|
732
843
|
}),
|
|
733
844
|
query_params,
|
|
734
845
|
body,
|
|
735
|
-
xHeaders
|
|
846
|
+
{ ...xHeaders, ...requestHeaders },
|
|
847
|
+
{ responseHeaders }
|
|
736
848
|
);
|
|
737
849
|
|
|
850
|
+
let responseData = response;
|
|
851
|
+
if (responseHeaders) {
|
|
852
|
+
responseData = response[0];
|
|
853
|
+
}
|
|
854
|
+
|
|
738
855
|
const {
|
|
739
856
|
error: res_error,
|
|
740
|
-
} =
|
|
741
|
-
|
|
742
|
-
allowUnknown: false
|
|
743
|
-
|
|
857
|
+
} = PaymentApplicationModel.CreatePaymentLinkResponse().validate(
|
|
858
|
+
responseData,
|
|
859
|
+
{ abortEarly: false, allowUnknown: false }
|
|
860
|
+
);
|
|
744
861
|
|
|
745
862
|
if (res_error) {
|
|
746
863
|
Logger({
|
|
747
864
|
level: "WARN",
|
|
748
|
-
message:
|
|
865
|
+
message: `Response Validation Warnnings for application > Payment > createPaymentLink \n ${res_error}`,
|
|
749
866
|
});
|
|
750
|
-
Logger({ level: "WARN", message: res_error });
|
|
751
867
|
}
|
|
752
868
|
|
|
753
869
|
return response;
|
|
754
870
|
}
|
|
755
871
|
|
|
756
872
|
/**
|
|
757
|
-
* @param {
|
|
758
|
-
* @param {
|
|
759
|
-
* @
|
|
873
|
+
* @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
|
|
874
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
875
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
876
|
+
* @returns {Promise<PaymentApplicationModel.CustomerCreditSummaryResponse>}
|
|
877
|
+
* - Success response
|
|
878
|
+
*
|
|
879
|
+
* @name customerCreditSummary
|
|
760
880
|
* @summary: API to fetch the customer credit summary
|
|
761
|
-
* @description: Use this API to fetch the customer credit summary.
|
|
881
|
+
* @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/).
|
|
762
882
|
*/
|
|
763
|
-
async customerCreditSummary(
|
|
764
|
-
|
|
883
|
+
async customerCreditSummary(
|
|
884
|
+
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
885
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
886
|
+
) {
|
|
887
|
+
const {
|
|
888
|
+
error,
|
|
889
|
+
} = PaymentApplicationValidator.customerCreditSummary().validate(
|
|
765
890
|
{ aggregator },
|
|
766
891
|
{ abortEarly: false, allowUnknown: true }
|
|
767
892
|
);
|
|
@@ -772,16 +897,15 @@ class Payment {
|
|
|
772
897
|
// Showing warrnings if extra unknown parameters are found
|
|
773
898
|
const {
|
|
774
899
|
error: warrning,
|
|
775
|
-
} =
|
|
900
|
+
} = PaymentApplicationValidator.customerCreditSummary().validate(
|
|
776
901
|
{ aggregator },
|
|
777
902
|
{ abortEarly: false, allowUnknown: false }
|
|
778
903
|
);
|
|
779
904
|
if (warrning) {
|
|
780
905
|
Logger({
|
|
781
906
|
level: "WARN",
|
|
782
|
-
message:
|
|
907
|
+
message: `Parameter Validation warrnings for application > Payment > customerCreditSummary \n ${warrning}`,
|
|
783
908
|
});
|
|
784
|
-
Logger({ level: "WARN", message: warrning });
|
|
785
909
|
}
|
|
786
910
|
|
|
787
911
|
const query_params = {};
|
|
@@ -798,36 +922,47 @@ class Payment {
|
|
|
798
922
|
}),
|
|
799
923
|
query_params,
|
|
800
924
|
undefined,
|
|
801
|
-
xHeaders
|
|
925
|
+
{ ...xHeaders, ...requestHeaders },
|
|
926
|
+
{ responseHeaders }
|
|
802
927
|
);
|
|
803
928
|
|
|
929
|
+
let responseData = response;
|
|
930
|
+
if (responseHeaders) {
|
|
931
|
+
responseData = response[0];
|
|
932
|
+
}
|
|
933
|
+
|
|
804
934
|
const {
|
|
805
935
|
error: res_error,
|
|
806
|
-
} =
|
|
807
|
-
|
|
808
|
-
allowUnknown: false
|
|
809
|
-
|
|
936
|
+
} = PaymentApplicationModel.CustomerCreditSummaryResponse().validate(
|
|
937
|
+
responseData,
|
|
938
|
+
{ abortEarly: false, allowUnknown: false }
|
|
939
|
+
);
|
|
810
940
|
|
|
811
941
|
if (res_error) {
|
|
812
942
|
Logger({
|
|
813
943
|
level: "WARN",
|
|
814
|
-
message:
|
|
944
|
+
message: `Response Validation Warnnings for application > Payment > customerCreditSummary \n ${res_error}`,
|
|
815
945
|
});
|
|
816
|
-
Logger({ level: "WARN", message: res_error });
|
|
817
946
|
}
|
|
818
947
|
|
|
819
948
|
return response;
|
|
820
949
|
}
|
|
821
950
|
|
|
822
951
|
/**
|
|
823
|
-
* @param {
|
|
824
|
-
* @param {
|
|
825
|
-
* @
|
|
952
|
+
* @param {PaymentApplicationValidator.CustomerOnboardParam} arg - Arg object.
|
|
953
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
954
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
955
|
+
* @returns {Promise<PaymentApplicationModel.CustomerOnboardingResponse>} -
|
|
956
|
+
* Success response
|
|
957
|
+
* @name customerOnboard
|
|
826
958
|
* @summary: API to fetch the customer credit summary
|
|
827
|
-
* @description: Use this API to fetch the customer credit summary.
|
|
959
|
+
* @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/).
|
|
828
960
|
*/
|
|
829
|
-
async customerOnboard(
|
|
830
|
-
|
|
961
|
+
async customerOnboard(
|
|
962
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
963
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
964
|
+
) {
|
|
965
|
+
const { error } = PaymentApplicationValidator.customerOnboard().validate(
|
|
831
966
|
{ body },
|
|
832
967
|
{ abortEarly: false, allowUnknown: true }
|
|
833
968
|
);
|
|
@@ -836,16 +971,17 @@ class Payment {
|
|
|
836
971
|
}
|
|
837
972
|
|
|
838
973
|
// Showing warrnings if extra unknown parameters are found
|
|
839
|
-
const {
|
|
974
|
+
const {
|
|
975
|
+
error: warrning,
|
|
976
|
+
} = PaymentApplicationValidator.customerOnboard().validate(
|
|
840
977
|
{ body },
|
|
841
978
|
{ abortEarly: false, allowUnknown: false }
|
|
842
979
|
);
|
|
843
980
|
if (warrning) {
|
|
844
981
|
Logger({
|
|
845
982
|
level: "WARN",
|
|
846
|
-
message:
|
|
983
|
+
message: `Parameter Validation warrnings for application > Payment > customerOnboard \n ${warrning}`,
|
|
847
984
|
});
|
|
848
|
-
Logger({ level: "WARN", message: warrning });
|
|
849
985
|
}
|
|
850
986
|
|
|
851
987
|
const query_params = {};
|
|
@@ -861,36 +997,46 @@ class Payment {
|
|
|
861
997
|
}),
|
|
862
998
|
query_params,
|
|
863
999
|
body,
|
|
864
|
-
xHeaders
|
|
1000
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1001
|
+
{ responseHeaders }
|
|
865
1002
|
);
|
|
866
1003
|
|
|
1004
|
+
let responseData = response;
|
|
1005
|
+
if (responseHeaders) {
|
|
1006
|
+
responseData = response[0];
|
|
1007
|
+
}
|
|
1008
|
+
|
|
867
1009
|
const {
|
|
868
1010
|
error: res_error,
|
|
869
|
-
} =
|
|
870
|
-
|
|
871
|
-
allowUnknown: false
|
|
872
|
-
|
|
1011
|
+
} = PaymentApplicationModel.CustomerOnboardingResponse().validate(
|
|
1012
|
+
responseData,
|
|
1013
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1014
|
+
);
|
|
873
1015
|
|
|
874
1016
|
if (res_error) {
|
|
875
1017
|
Logger({
|
|
876
1018
|
level: "WARN",
|
|
877
|
-
message:
|
|
1019
|
+
message: `Response Validation Warnnings for application > Payment > customerOnboard \n ${res_error}`,
|
|
878
1020
|
});
|
|
879
|
-
Logger({ level: "WARN", message: res_error });
|
|
880
1021
|
}
|
|
881
1022
|
|
|
882
1023
|
return response;
|
|
883
1024
|
}
|
|
884
1025
|
|
|
885
1026
|
/**
|
|
886
|
-
* @param {
|
|
887
|
-
* @param {
|
|
888
|
-
* @
|
|
1027
|
+
* @param {PaymentApplicationValidator.DeleteUserCardParam} arg - Arg object.
|
|
1028
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1029
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1030
|
+
* @returns {Promise<PaymentApplicationModel.DeleteCardsResponse>} - Success response
|
|
1031
|
+
* @name deleteUserCard
|
|
889
1032
|
* @summary: Delete a card
|
|
890
|
-
* @description: Use this API to delete a card added by a user on the payment gateway and clear the cache.
|
|
1033
|
+
* @description: Use this API to delete a card added by a user on the payment gateway and clear the cache. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
|
|
891
1034
|
*/
|
|
892
|
-
async deleteUserCard(
|
|
893
|
-
|
|
1035
|
+
async deleteUserCard(
|
|
1036
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1037
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1038
|
+
) {
|
|
1039
|
+
const { error } = PaymentApplicationValidator.deleteUserCard().validate(
|
|
894
1040
|
{ body },
|
|
895
1041
|
{ abortEarly: false, allowUnknown: true }
|
|
896
1042
|
);
|
|
@@ -899,16 +1045,17 @@ class Payment {
|
|
|
899
1045
|
}
|
|
900
1046
|
|
|
901
1047
|
// Showing warrnings if extra unknown parameters are found
|
|
902
|
-
const {
|
|
1048
|
+
const {
|
|
1049
|
+
error: warrning,
|
|
1050
|
+
} = PaymentApplicationValidator.deleteUserCard().validate(
|
|
903
1051
|
{ body },
|
|
904
1052
|
{ abortEarly: false, allowUnknown: false }
|
|
905
1053
|
);
|
|
906
1054
|
if (warrning) {
|
|
907
1055
|
Logger({
|
|
908
1056
|
level: "WARN",
|
|
909
|
-
message:
|
|
1057
|
+
message: `Parameter Validation warrnings for application > Payment > deleteUserCard \n ${warrning}`,
|
|
910
1058
|
});
|
|
911
|
-
Logger({ level: "WARN", message: warrning });
|
|
912
1059
|
}
|
|
913
1060
|
|
|
914
1061
|
const query_params = {};
|
|
@@ -924,12 +1071,18 @@ class Payment {
|
|
|
924
1071
|
}),
|
|
925
1072
|
query_params,
|
|
926
1073
|
body,
|
|
927
|
-
xHeaders
|
|
1074
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1075
|
+
{ responseHeaders }
|
|
928
1076
|
);
|
|
929
1077
|
|
|
1078
|
+
let responseData = response;
|
|
1079
|
+
if (responseHeaders) {
|
|
1080
|
+
responseData = response[0];
|
|
1081
|
+
}
|
|
1082
|
+
|
|
930
1083
|
const {
|
|
931
1084
|
error: res_error,
|
|
932
|
-
} =
|
|
1085
|
+
} = PaymentApplicationModel.DeleteCardsResponse().validate(responseData, {
|
|
933
1086
|
abortEarly: false,
|
|
934
1087
|
allowUnknown: false,
|
|
935
1088
|
});
|
|
@@ -937,25 +1090,33 @@ class Payment {
|
|
|
937
1090
|
if (res_error) {
|
|
938
1091
|
Logger({
|
|
939
1092
|
level: "WARN",
|
|
940
|
-
message:
|
|
1093
|
+
message: `Response Validation Warnnings for application > Payment > deleteUserCard \n ${res_error}`,
|
|
941
1094
|
});
|
|
942
|
-
Logger({ level: "WARN", message: res_error });
|
|
943
1095
|
}
|
|
944
1096
|
|
|
945
1097
|
return response;
|
|
946
1098
|
}
|
|
947
1099
|
|
|
948
1100
|
/**
|
|
949
|
-
* @param {
|
|
950
|
-
*
|
|
951
|
-
*
|
|
1101
|
+
* @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
|
|
1102
|
+
* - Arg object.
|
|
1103
|
+
*
|
|
1104
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1105
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1106
|
+
* @returns {Promise<PaymentApplicationModel.UpdateRefundTransferModeResponse>}
|
|
1107
|
+
* - Success response
|
|
1108
|
+
*
|
|
1109
|
+
* @name enableOrDisableRefundTransferMode
|
|
952
1110
|
* @summary: Enable/Disable a mode for transferring a refund
|
|
953
|
-
* @description: Activate or Deactivate Transfer Mode to collect Beneficiary Details for Refund
|
|
1111
|
+
* @description: Activate or Deactivate Transfer Mode to collect Beneficiary Details for Refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/).
|
|
954
1112
|
*/
|
|
955
|
-
async enableOrDisableRefundTransferMode(
|
|
1113
|
+
async enableOrDisableRefundTransferMode(
|
|
1114
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1115
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1116
|
+
) {
|
|
956
1117
|
const {
|
|
957
1118
|
error,
|
|
958
|
-
} =
|
|
1119
|
+
} = PaymentApplicationValidator.enableOrDisableRefundTransferMode().validate(
|
|
959
1120
|
{ body },
|
|
960
1121
|
{ abortEarly: false, allowUnknown: true }
|
|
961
1122
|
);
|
|
@@ -966,17 +1127,15 @@ class Payment {
|
|
|
966
1127
|
// Showing warrnings if extra unknown parameters are found
|
|
967
1128
|
const {
|
|
968
1129
|
error: warrning,
|
|
969
|
-
} =
|
|
1130
|
+
} = PaymentApplicationValidator.enableOrDisableRefundTransferMode().validate(
|
|
970
1131
|
{ body },
|
|
971
1132
|
{ abortEarly: false, allowUnknown: false }
|
|
972
1133
|
);
|
|
973
1134
|
if (warrning) {
|
|
974
1135
|
Logger({
|
|
975
1136
|
level: "WARN",
|
|
976
|
-
message:
|
|
977
|
-
"Parameter Validation warrnings for enableOrDisableRefundTransferMode",
|
|
1137
|
+
message: `Parameter Validation warrnings for application > Payment > enableOrDisableRefundTransferMode \n ${warrning}`,
|
|
978
1138
|
});
|
|
979
|
-
Logger({ level: "WARN", message: warrning });
|
|
980
1139
|
}
|
|
981
1140
|
|
|
982
1141
|
const query_params = {};
|
|
@@ -992,37 +1151,50 @@ class Payment {
|
|
|
992
1151
|
}),
|
|
993
1152
|
query_params,
|
|
994
1153
|
body,
|
|
995
|
-
xHeaders
|
|
1154
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1155
|
+
{ responseHeaders }
|
|
996
1156
|
);
|
|
997
1157
|
|
|
1158
|
+
let responseData = response;
|
|
1159
|
+
if (responseHeaders) {
|
|
1160
|
+
responseData = response[0];
|
|
1161
|
+
}
|
|
1162
|
+
|
|
998
1163
|
const {
|
|
999
1164
|
error: res_error,
|
|
1000
|
-
} =
|
|
1001
|
-
|
|
1002
|
-
allowUnknown: false
|
|
1003
|
-
|
|
1165
|
+
} = PaymentApplicationModel.UpdateRefundTransferModeResponse().validate(
|
|
1166
|
+
responseData,
|
|
1167
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1168
|
+
);
|
|
1004
1169
|
|
|
1005
1170
|
if (res_error) {
|
|
1006
1171
|
Logger({
|
|
1007
1172
|
level: "WARN",
|
|
1008
|
-
message:
|
|
1009
|
-
"Response Validation Warnnings for enableOrDisableRefundTransferMode",
|
|
1173
|
+
message: `Response Validation Warnnings for application > Payment > enableOrDisableRefundTransferMode \n ${res_error}`,
|
|
1010
1174
|
});
|
|
1011
|
-
Logger({ level: "WARN", message: res_error });
|
|
1012
1175
|
}
|
|
1013
1176
|
|
|
1014
1177
|
return response;
|
|
1015
1178
|
}
|
|
1016
1179
|
|
|
1017
1180
|
/**
|
|
1018
|
-
* @param {
|
|
1019
|
-
* @param {
|
|
1020
|
-
* @
|
|
1181
|
+
* @param {PaymentApplicationValidator.GetActiveCardAggregatorParam} arg - Arg object.
|
|
1182
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1183
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1184
|
+
* @returns {Promise<PaymentApplicationModel.ActiveCardPaymentGatewayResponse>}
|
|
1185
|
+
* - Success response
|
|
1186
|
+
*
|
|
1187
|
+
* @name getActiveCardAggregator
|
|
1021
1188
|
* @summary: Fetch active payment gateway for card payments
|
|
1022
|
-
* @description: Use this API to retrieve an active payment aggregator along with the Customer ID. This is applicable for cards payments only.
|
|
1189
|
+
* @description: Use this API to retrieve an active payment aggregator along with the Customer ID. This is applicable for cards payments only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/).
|
|
1023
1190
|
*/
|
|
1024
|
-
async getActiveCardAggregator(
|
|
1025
|
-
|
|
1191
|
+
async getActiveCardAggregator(
|
|
1192
|
+
{ refresh, requestHeaders } = { requestHeaders: {} },
|
|
1193
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1194
|
+
) {
|
|
1195
|
+
const {
|
|
1196
|
+
error,
|
|
1197
|
+
} = PaymentApplicationValidator.getActiveCardAggregator().validate(
|
|
1026
1198
|
{ refresh },
|
|
1027
1199
|
{ abortEarly: false, allowUnknown: true }
|
|
1028
1200
|
);
|
|
@@ -1033,16 +1205,15 @@ class Payment {
|
|
|
1033
1205
|
// Showing warrnings if extra unknown parameters are found
|
|
1034
1206
|
const {
|
|
1035
1207
|
error: warrning,
|
|
1036
|
-
} =
|
|
1208
|
+
} = PaymentApplicationValidator.getActiveCardAggregator().validate(
|
|
1037
1209
|
{ refresh },
|
|
1038
1210
|
{ abortEarly: false, allowUnknown: false }
|
|
1039
1211
|
);
|
|
1040
1212
|
if (warrning) {
|
|
1041
1213
|
Logger({
|
|
1042
1214
|
level: "WARN",
|
|
1043
|
-
message:
|
|
1215
|
+
message: `Parameter Validation warrnings for application > Payment > getActiveCardAggregator \n ${warrning}`,
|
|
1044
1216
|
});
|
|
1045
|
-
Logger({ level: "WARN", message: warrning });
|
|
1046
1217
|
}
|
|
1047
1218
|
|
|
1048
1219
|
const query_params = {};
|
|
@@ -1059,35 +1230,50 @@ class Payment {
|
|
|
1059
1230
|
}),
|
|
1060
1231
|
query_params,
|
|
1061
1232
|
undefined,
|
|
1062
|
-
xHeaders
|
|
1233
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1234
|
+
{ responseHeaders }
|
|
1063
1235
|
);
|
|
1064
1236
|
|
|
1237
|
+
let responseData = response;
|
|
1238
|
+
if (responseHeaders) {
|
|
1239
|
+
responseData = response[0];
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1065
1242
|
const {
|
|
1066
1243
|
error: res_error,
|
|
1067
|
-
} =
|
|
1068
|
-
|
|
1069
|
-
allowUnknown: false
|
|
1070
|
-
|
|
1244
|
+
} = PaymentApplicationModel.ActiveCardPaymentGatewayResponse().validate(
|
|
1245
|
+
responseData,
|
|
1246
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1247
|
+
);
|
|
1071
1248
|
|
|
1072
1249
|
if (res_error) {
|
|
1073
1250
|
Logger({
|
|
1074
1251
|
level: "WARN",
|
|
1075
|
-
message:
|
|
1252
|
+
message: `Response Validation Warnnings for application > Payment > getActiveCardAggregator \n ${res_error}`,
|
|
1076
1253
|
});
|
|
1077
|
-
Logger({ level: "WARN", message: res_error });
|
|
1078
1254
|
}
|
|
1079
1255
|
|
|
1080
1256
|
return response;
|
|
1081
1257
|
}
|
|
1082
1258
|
|
|
1083
1259
|
/**
|
|
1084
|
-
* @param {
|
|
1085
|
-
*
|
|
1260
|
+
* @param {PaymentApplicationValidator.GetActiveRefundTransferModesParam} arg
|
|
1261
|
+
* - Arg object.
|
|
1262
|
+
*
|
|
1263
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1264
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1265
|
+
* @returns {Promise<PaymentApplicationModel.TransferModeResponse>} - Success response
|
|
1266
|
+
* @name getActiveRefundTransferModes
|
|
1086
1267
|
* @summary: Lists the mode of refund
|
|
1087
|
-
* @description: Use this API to retrieve eligible refund modes (such as Netbanking) and add the beneficiary details.
|
|
1268
|
+
* @description: Use this API to retrieve eligible refund modes (such as Netbanking) and add the beneficiary details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/).
|
|
1088
1269
|
*/
|
|
1089
|
-
async getActiveRefundTransferModes(
|
|
1090
|
-
|
|
1270
|
+
async getActiveRefundTransferModes(
|
|
1271
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1272
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1273
|
+
) {
|
|
1274
|
+
const {
|
|
1275
|
+
error,
|
|
1276
|
+
} = PaymentApplicationValidator.getActiveRefundTransferModes().validate(
|
|
1091
1277
|
{},
|
|
1092
1278
|
{ abortEarly: false, allowUnknown: true }
|
|
1093
1279
|
);
|
|
@@ -1098,17 +1284,15 @@ class Payment {
|
|
|
1098
1284
|
// Showing warrnings if extra unknown parameters are found
|
|
1099
1285
|
const {
|
|
1100
1286
|
error: warrning,
|
|
1101
|
-
} =
|
|
1287
|
+
} = PaymentApplicationValidator.getActiveRefundTransferModes().validate(
|
|
1102
1288
|
{},
|
|
1103
1289
|
{ abortEarly: false, allowUnknown: false }
|
|
1104
1290
|
);
|
|
1105
1291
|
if (warrning) {
|
|
1106
1292
|
Logger({
|
|
1107
1293
|
level: "WARN",
|
|
1108
|
-
message:
|
|
1109
|
-
"Parameter Validation warrnings for getActiveRefundTransferModes",
|
|
1294
|
+
message: `Parameter Validation warrnings for application > Payment > getActiveRefundTransferModes \n ${warrning}`,
|
|
1110
1295
|
});
|
|
1111
|
-
Logger({ level: "WARN", message: warrning });
|
|
1112
1296
|
}
|
|
1113
1297
|
|
|
1114
1298
|
const query_params = {};
|
|
@@ -1124,12 +1308,18 @@ class Payment {
|
|
|
1124
1308
|
}),
|
|
1125
1309
|
query_params,
|
|
1126
1310
|
undefined,
|
|
1127
|
-
xHeaders
|
|
1311
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1312
|
+
{ responseHeaders }
|
|
1128
1313
|
);
|
|
1129
1314
|
|
|
1315
|
+
let responseData = response;
|
|
1316
|
+
if (responseHeaders) {
|
|
1317
|
+
responseData = response[0];
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1130
1320
|
const {
|
|
1131
1321
|
error: res_error,
|
|
1132
|
-
} =
|
|
1322
|
+
} = PaymentApplicationModel.TransferModeResponse().validate(responseData, {
|
|
1133
1323
|
abortEarly: false,
|
|
1134
1324
|
allowUnknown: false,
|
|
1135
1325
|
});
|
|
@@ -1137,24 +1327,27 @@ class Payment {
|
|
|
1137
1327
|
if (res_error) {
|
|
1138
1328
|
Logger({
|
|
1139
1329
|
level: "WARN",
|
|
1140
|
-
message:
|
|
1141
|
-
"Response Validation Warnnings for getActiveRefundTransferModes",
|
|
1330
|
+
message: `Response Validation Warnnings for application > Payment > getActiveRefundTransferModes \n ${res_error}`,
|
|
1142
1331
|
});
|
|
1143
|
-
Logger({ level: "WARN", message: res_error });
|
|
1144
1332
|
}
|
|
1145
1333
|
|
|
1146
1334
|
return response;
|
|
1147
1335
|
}
|
|
1148
1336
|
|
|
1149
1337
|
/**
|
|
1150
|
-
* @param {
|
|
1151
|
-
* @param {
|
|
1152
|
-
* @
|
|
1338
|
+
* @param {PaymentApplicationValidator.GetActiveUserCardsParam} arg - Arg object.
|
|
1339
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1340
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1341
|
+
* @returns {Promise<PaymentApplicationModel.ListCardsResponse>} - Success response
|
|
1342
|
+
* @name getActiveUserCards
|
|
1153
1343
|
* @summary: Fetch the list of cards saved by the user
|
|
1154
|
-
* @description: Use this API to retrieve a list of cards stored by user from an active payment gateway.
|
|
1344
|
+
* @description: Use this API to retrieve a list of cards stored by user from an active payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/).
|
|
1155
1345
|
*/
|
|
1156
|
-
async getActiveUserCards(
|
|
1157
|
-
|
|
1346
|
+
async getActiveUserCards(
|
|
1347
|
+
{ forceRefresh, requestHeaders } = { requestHeaders: {} },
|
|
1348
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1349
|
+
) {
|
|
1350
|
+
const { error } = PaymentApplicationValidator.getActiveUserCards().validate(
|
|
1158
1351
|
{ forceRefresh },
|
|
1159
1352
|
{ abortEarly: false, allowUnknown: true }
|
|
1160
1353
|
);
|
|
@@ -1163,16 +1356,17 @@ class Payment {
|
|
|
1163
1356
|
}
|
|
1164
1357
|
|
|
1165
1358
|
// Showing warrnings if extra unknown parameters are found
|
|
1166
|
-
const {
|
|
1359
|
+
const {
|
|
1360
|
+
error: warrning,
|
|
1361
|
+
} = PaymentApplicationValidator.getActiveUserCards().validate(
|
|
1167
1362
|
{ forceRefresh },
|
|
1168
1363
|
{ abortEarly: false, allowUnknown: false }
|
|
1169
1364
|
);
|
|
1170
1365
|
if (warrning) {
|
|
1171
1366
|
Logger({
|
|
1172
1367
|
level: "WARN",
|
|
1173
|
-
message:
|
|
1368
|
+
message: `Parameter Validation warrnings for application > Payment > getActiveUserCards \n ${warrning}`,
|
|
1174
1369
|
});
|
|
1175
|
-
Logger({ level: "WARN", message: warrning });
|
|
1176
1370
|
}
|
|
1177
1371
|
|
|
1178
1372
|
const query_params = {};
|
|
@@ -1189,12 +1383,18 @@ class Payment {
|
|
|
1189
1383
|
}),
|
|
1190
1384
|
query_params,
|
|
1191
1385
|
undefined,
|
|
1192
|
-
xHeaders
|
|
1386
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1387
|
+
{ responseHeaders }
|
|
1193
1388
|
);
|
|
1194
1389
|
|
|
1390
|
+
let responseData = response;
|
|
1391
|
+
if (responseHeaders) {
|
|
1392
|
+
responseData = response[0];
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1195
1395
|
const {
|
|
1196
1396
|
error: res_error,
|
|
1197
|
-
} =
|
|
1397
|
+
} = PaymentApplicationModel.ListCardsResponse().validate(responseData, {
|
|
1198
1398
|
abortEarly: false,
|
|
1199
1399
|
allowUnknown: false,
|
|
1200
1400
|
});
|
|
@@ -1202,26 +1402,31 @@ class Payment {
|
|
|
1202
1402
|
if (res_error) {
|
|
1203
1403
|
Logger({
|
|
1204
1404
|
level: "WARN",
|
|
1205
|
-
message:
|
|
1405
|
+
message: `Response Validation Warnnings for application > Payment > getActiveUserCards \n ${res_error}`,
|
|
1206
1406
|
});
|
|
1207
|
-
Logger({ level: "WARN", message: res_error });
|
|
1208
1407
|
}
|
|
1209
1408
|
|
|
1210
1409
|
return response;
|
|
1211
1410
|
}
|
|
1212
1411
|
|
|
1213
1412
|
/**
|
|
1214
|
-
* @param {
|
|
1215
|
-
* @param {
|
|
1216
|
-
* @param {
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1413
|
+
* @param {PaymentApplicationValidator.GetAggregatorsConfigParam} arg - Arg object.
|
|
1414
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1415
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1416
|
+
* @returns {Promise<PaymentApplicationModel.AggregatorsConfigDetailResponse>}
|
|
1417
|
+
* - Success response
|
|
1418
|
+
*
|
|
1419
|
+
* @name getAggregatorsConfig
|
|
1220
1420
|
* @summary: Get payment gateway keys
|
|
1221
|
-
* @description: Use this API to retrieve the payment gateway key, secrets, merchant, SDK/API details to complete a payment at front-end.
|
|
1421
|
+
* @description: Use this API to retrieve the payment gateway key, secrets, merchant, SDK/API details to complete a payment at front-end. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
|
|
1222
1422
|
*/
|
|
1223
|
-
async getAggregatorsConfig(
|
|
1224
|
-
|
|
1423
|
+
async getAggregatorsConfig(
|
|
1424
|
+
{ xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
|
|
1425
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1426
|
+
) {
|
|
1427
|
+
const {
|
|
1428
|
+
error,
|
|
1429
|
+
} = PaymentApplicationValidator.getAggregatorsConfig().validate(
|
|
1225
1430
|
{ xApiToken, refresh },
|
|
1226
1431
|
{ abortEarly: false, allowUnknown: true }
|
|
1227
1432
|
);
|
|
@@ -1232,16 +1437,15 @@ class Payment {
|
|
|
1232
1437
|
// Showing warrnings if extra unknown parameters are found
|
|
1233
1438
|
const {
|
|
1234
1439
|
error: warrning,
|
|
1235
|
-
} =
|
|
1440
|
+
} = PaymentApplicationValidator.getAggregatorsConfig().validate(
|
|
1236
1441
|
{ xApiToken, refresh },
|
|
1237
1442
|
{ abortEarly: false, allowUnknown: false }
|
|
1238
1443
|
);
|
|
1239
1444
|
if (warrning) {
|
|
1240
1445
|
Logger({
|
|
1241
1446
|
level: "WARN",
|
|
1242
|
-
message:
|
|
1447
|
+
message: `Parameter Validation warrnings for application > Payment > getAggregatorsConfig \n ${warrning}`,
|
|
1243
1448
|
});
|
|
1244
|
-
Logger({ level: "WARN", message: warrning });
|
|
1245
1449
|
}
|
|
1246
1450
|
|
|
1247
1451
|
const query_params = {};
|
|
@@ -1259,35 +1463,51 @@ class Payment {
|
|
|
1259
1463
|
}),
|
|
1260
1464
|
query_params,
|
|
1261
1465
|
undefined,
|
|
1262
|
-
xHeaders
|
|
1466
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1467
|
+
{ responseHeaders }
|
|
1263
1468
|
);
|
|
1264
1469
|
|
|
1470
|
+
let responseData = response;
|
|
1471
|
+
if (responseHeaders) {
|
|
1472
|
+
responseData = response[0];
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1265
1475
|
const {
|
|
1266
1476
|
error: res_error,
|
|
1267
|
-
} =
|
|
1268
|
-
|
|
1269
|
-
allowUnknown: false
|
|
1270
|
-
|
|
1477
|
+
} = PaymentApplicationModel.AggregatorsConfigDetailResponse().validate(
|
|
1478
|
+
responseData,
|
|
1479
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1480
|
+
);
|
|
1271
1481
|
|
|
1272
1482
|
if (res_error) {
|
|
1273
1483
|
Logger({
|
|
1274
1484
|
level: "WARN",
|
|
1275
|
-
message:
|
|
1485
|
+
message: `Response Validation Warnnings for application > Payment > getAggregatorsConfig \n ${res_error}`,
|
|
1276
1486
|
});
|
|
1277
|
-
Logger({ level: "WARN", message: res_error });
|
|
1278
1487
|
}
|
|
1279
1488
|
|
|
1280
1489
|
return response;
|
|
1281
1490
|
}
|
|
1282
1491
|
|
|
1283
1492
|
/**
|
|
1284
|
-
* @param {
|
|
1285
|
-
*
|
|
1493
|
+
* @param {PaymentApplicationValidator.GetEpaylaterBannerDetailsParam} arg
|
|
1494
|
+
* - Arg object.
|
|
1495
|
+
*
|
|
1496
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1497
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1498
|
+
* @returns {Promise<PaymentApplicationModel.EpaylaterBannerResponse>} -
|
|
1499
|
+
* Success response
|
|
1500
|
+
* @name getEpaylaterBannerDetails
|
|
1286
1501
|
* @summary: Get Epaylater Enabled
|
|
1287
|
-
* @description: Get Epaylater Enabled if user is tentatively approved by epaylater
|
|
1502
|
+
* @description: Get Epaylater Enabled if user is tentatively approved by epaylater - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/).
|
|
1288
1503
|
*/
|
|
1289
|
-
async getEpaylaterBannerDetails(
|
|
1290
|
-
|
|
1504
|
+
async getEpaylaterBannerDetails(
|
|
1505
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1506
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1507
|
+
) {
|
|
1508
|
+
const {
|
|
1509
|
+
error,
|
|
1510
|
+
} = PaymentApplicationValidator.getEpaylaterBannerDetails().validate(
|
|
1291
1511
|
{},
|
|
1292
1512
|
{ abortEarly: false, allowUnknown: true }
|
|
1293
1513
|
);
|
|
@@ -1298,16 +1518,15 @@ class Payment {
|
|
|
1298
1518
|
// Showing warrnings if extra unknown parameters are found
|
|
1299
1519
|
const {
|
|
1300
1520
|
error: warrning,
|
|
1301
|
-
} =
|
|
1521
|
+
} = PaymentApplicationValidator.getEpaylaterBannerDetails().validate(
|
|
1302
1522
|
{},
|
|
1303
1523
|
{ abortEarly: false, allowUnknown: false }
|
|
1304
1524
|
);
|
|
1305
1525
|
if (warrning) {
|
|
1306
1526
|
Logger({
|
|
1307
1527
|
level: "WARN",
|
|
1308
|
-
message:
|
|
1528
|
+
message: `Parameter Validation warrnings for application > Payment > getEpaylaterBannerDetails \n ${warrning}`,
|
|
1309
1529
|
});
|
|
1310
|
-
Logger({ level: "WARN", message: warrning });
|
|
1311
1530
|
}
|
|
1312
1531
|
|
|
1313
1532
|
const query_params = {};
|
|
@@ -1323,37 +1542,51 @@ class Payment {
|
|
|
1323
1542
|
}),
|
|
1324
1543
|
query_params,
|
|
1325
1544
|
undefined,
|
|
1326
|
-
xHeaders
|
|
1545
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1546
|
+
{ responseHeaders }
|
|
1327
1547
|
);
|
|
1328
1548
|
|
|
1549
|
+
let responseData = response;
|
|
1550
|
+
if (responseHeaders) {
|
|
1551
|
+
responseData = response[0];
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1329
1554
|
const {
|
|
1330
1555
|
error: res_error,
|
|
1331
|
-
} =
|
|
1332
|
-
|
|
1333
|
-
allowUnknown: false
|
|
1334
|
-
|
|
1556
|
+
} = PaymentApplicationModel.EpaylaterBannerResponse().validate(
|
|
1557
|
+
responseData,
|
|
1558
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1559
|
+
);
|
|
1335
1560
|
|
|
1336
1561
|
if (res_error) {
|
|
1337
1562
|
Logger({
|
|
1338
1563
|
level: "WARN",
|
|
1339
|
-
message:
|
|
1564
|
+
message: `Response Validation Warnnings for application > Payment > getEpaylaterBannerDetails \n ${res_error}`,
|
|
1340
1565
|
});
|
|
1341
|
-
Logger({ level: "WARN", message: res_error });
|
|
1342
1566
|
}
|
|
1343
1567
|
|
|
1344
1568
|
return response;
|
|
1345
1569
|
}
|
|
1346
1570
|
|
|
1347
1571
|
/**
|
|
1348
|
-
* @param {
|
|
1349
|
-
*
|
|
1350
|
-
*
|
|
1351
|
-
* @
|
|
1572
|
+
* @param {PaymentApplicationValidator.GetOrderBeneficiariesDetailParam} arg
|
|
1573
|
+
* - Arg object.
|
|
1574
|
+
*
|
|
1575
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1576
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1577
|
+
* @returns {Promise<PaymentApplicationModel.OrderBeneficiaryResponse>} -
|
|
1578
|
+
* Success response
|
|
1579
|
+
* @name getOrderBeneficiariesDetail
|
|
1352
1580
|
* @summary: Lists the beneficiary of a refund
|
|
1353
|
-
* @description: Use this API to get the details of all active beneficiary added by a user for refund.
|
|
1581
|
+
* @description: Use this API to 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/getOrderBeneficiariesDetail/).
|
|
1354
1582
|
*/
|
|
1355
|
-
async getOrderBeneficiariesDetail(
|
|
1356
|
-
|
|
1583
|
+
async getOrderBeneficiariesDetail(
|
|
1584
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
1585
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1586
|
+
) {
|
|
1587
|
+
const {
|
|
1588
|
+
error,
|
|
1589
|
+
} = PaymentApplicationValidator.getOrderBeneficiariesDetail().validate(
|
|
1357
1590
|
{ orderId },
|
|
1358
1591
|
{ abortEarly: false, allowUnknown: true }
|
|
1359
1592
|
);
|
|
@@ -1364,17 +1597,15 @@ class Payment {
|
|
|
1364
1597
|
// Showing warrnings if extra unknown parameters are found
|
|
1365
1598
|
const {
|
|
1366
1599
|
error: warrning,
|
|
1367
|
-
} =
|
|
1600
|
+
} = PaymentApplicationValidator.getOrderBeneficiariesDetail().validate(
|
|
1368
1601
|
{ orderId },
|
|
1369
1602
|
{ abortEarly: false, allowUnknown: false }
|
|
1370
1603
|
);
|
|
1371
1604
|
if (warrning) {
|
|
1372
1605
|
Logger({
|
|
1373
1606
|
level: "WARN",
|
|
1374
|
-
message:
|
|
1375
|
-
"Parameter Validation warrnings for getOrderBeneficiariesDetail",
|
|
1607
|
+
message: `Parameter Validation warrnings for application > Payment > getOrderBeneficiariesDetail \n ${warrning}`,
|
|
1376
1608
|
});
|
|
1377
|
-
Logger({ level: "WARN", message: warrning });
|
|
1378
1609
|
}
|
|
1379
1610
|
|
|
1380
1611
|
const query_params = {};
|
|
@@ -1391,37 +1622,47 @@ class Payment {
|
|
|
1391
1622
|
}),
|
|
1392
1623
|
query_params,
|
|
1393
1624
|
undefined,
|
|
1394
|
-
xHeaders
|
|
1625
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1626
|
+
{ responseHeaders }
|
|
1395
1627
|
);
|
|
1396
1628
|
|
|
1629
|
+
let responseData = response;
|
|
1630
|
+
if (responseHeaders) {
|
|
1631
|
+
responseData = response[0];
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1397
1634
|
const {
|
|
1398
1635
|
error: res_error,
|
|
1399
|
-
} =
|
|
1400
|
-
|
|
1401
|
-
allowUnknown: false
|
|
1402
|
-
|
|
1636
|
+
} = PaymentApplicationModel.OrderBeneficiaryResponse().validate(
|
|
1637
|
+
responseData,
|
|
1638
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1639
|
+
);
|
|
1403
1640
|
|
|
1404
1641
|
if (res_error) {
|
|
1405
1642
|
Logger({
|
|
1406
1643
|
level: "WARN",
|
|
1407
|
-
message:
|
|
1408
|
-
"Response Validation Warnnings for getOrderBeneficiariesDetail",
|
|
1644
|
+
message: `Response Validation Warnnings for application > Payment > getOrderBeneficiariesDetail \n ${res_error}`,
|
|
1409
1645
|
});
|
|
1410
|
-
Logger({ level: "WARN", message: res_error });
|
|
1411
1646
|
}
|
|
1412
1647
|
|
|
1413
1648
|
return response;
|
|
1414
1649
|
}
|
|
1415
1650
|
|
|
1416
1651
|
/**
|
|
1417
|
-
* @param {
|
|
1418
|
-
* @param {
|
|
1419
|
-
* @
|
|
1652
|
+
* @param {PaymentApplicationValidator.GetPaymentLinkParam} arg - Arg object.
|
|
1653
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1654
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1655
|
+
* @returns {Promise<PaymentApplicationModel.GetPaymentLinkResponse>} -
|
|
1656
|
+
* Success response
|
|
1657
|
+
* @name getPaymentLink
|
|
1420
1658
|
* @summary: Get payment link
|
|
1421
|
-
* @description: Use this API to get a payment link
|
|
1659
|
+
* @description: Use this API to get a payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
|
|
1422
1660
|
*/
|
|
1423
|
-
async getPaymentLink(
|
|
1424
|
-
|
|
1661
|
+
async getPaymentLink(
|
|
1662
|
+
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1663
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1664
|
+
) {
|
|
1665
|
+
const { error } = PaymentApplicationValidator.getPaymentLink().validate(
|
|
1425
1666
|
{ paymentLinkId },
|
|
1426
1667
|
{ abortEarly: false, allowUnknown: true }
|
|
1427
1668
|
);
|
|
@@ -1430,16 +1671,17 @@ class Payment {
|
|
|
1430
1671
|
}
|
|
1431
1672
|
|
|
1432
1673
|
// Showing warrnings if extra unknown parameters are found
|
|
1433
|
-
const {
|
|
1674
|
+
const {
|
|
1675
|
+
error: warrning,
|
|
1676
|
+
} = PaymentApplicationValidator.getPaymentLink().validate(
|
|
1434
1677
|
{ paymentLinkId },
|
|
1435
1678
|
{ abortEarly: false, allowUnknown: false }
|
|
1436
1679
|
);
|
|
1437
1680
|
if (warrning) {
|
|
1438
1681
|
Logger({
|
|
1439
1682
|
level: "WARN",
|
|
1440
|
-
message:
|
|
1683
|
+
message: `Parameter Validation warrnings for application > Payment > getPaymentLink \n ${warrning}`,
|
|
1441
1684
|
});
|
|
1442
|
-
Logger({ level: "WARN", message: warrning });
|
|
1443
1685
|
}
|
|
1444
1686
|
|
|
1445
1687
|
const query_params = {};
|
|
@@ -1456,54 +1698,58 @@ class Payment {
|
|
|
1456
1698
|
}),
|
|
1457
1699
|
query_params,
|
|
1458
1700
|
undefined,
|
|
1459
|
-
xHeaders
|
|
1701
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1702
|
+
{ responseHeaders }
|
|
1460
1703
|
);
|
|
1461
1704
|
|
|
1705
|
+
let responseData = response;
|
|
1706
|
+
if (responseHeaders) {
|
|
1707
|
+
responseData = response[0];
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1462
1710
|
const {
|
|
1463
1711
|
error: res_error,
|
|
1464
|
-
} =
|
|
1465
|
-
|
|
1466
|
-
allowUnknown: false
|
|
1467
|
-
|
|
1712
|
+
} = PaymentApplicationModel.GetPaymentLinkResponse().validate(
|
|
1713
|
+
responseData,
|
|
1714
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1715
|
+
);
|
|
1468
1716
|
|
|
1469
1717
|
if (res_error) {
|
|
1470
1718
|
Logger({
|
|
1471
1719
|
level: "WARN",
|
|
1472
|
-
message:
|
|
1720
|
+
message: `Response Validation Warnnings for application > Payment > getPaymentLink \n ${res_error}`,
|
|
1473
1721
|
});
|
|
1474
|
-
Logger({ level: "WARN", message: res_error });
|
|
1475
1722
|
}
|
|
1476
1723
|
|
|
1477
1724
|
return response;
|
|
1478
1725
|
}
|
|
1479
1726
|
|
|
1480
1727
|
/**
|
|
1481
|
-
* @param {
|
|
1482
|
-
* @param {
|
|
1483
|
-
* @param {
|
|
1484
|
-
* @
|
|
1485
|
-
*
|
|
1486
|
-
* @
|
|
1487
|
-
* to remove temporary cache files on payment gateway and replace with the
|
|
1488
|
-
* latest one.
|
|
1489
|
-
* @param {string} [arg.cardReference] - Card reference id of user's debit
|
|
1490
|
-
* or credit card.
|
|
1491
|
-
* @param {string} [arg.userDetails] - URIencoded JSON containing details of
|
|
1492
|
-
* an anonymous user.
|
|
1493
|
-
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
1728
|
+
* @param {PaymentApplicationValidator.GetPaymentModeRoutesParam} arg - Arg object.
|
|
1729
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1730
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1731
|
+
* @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
|
|
1732
|
+
* Success response
|
|
1733
|
+
* @name getPaymentModeRoutes
|
|
1494
1734
|
* @summary: Get applicable payment options
|
|
1495
|
-
* @description: Use this API to get all valid payment options for doing a payment.
|
|
1735
|
+
* @description: Use this API to get all valid payment options for doing a payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/).
|
|
1496
1736
|
*/
|
|
1497
|
-
async getPaymentModeRoutes(
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1737
|
+
async getPaymentModeRoutes(
|
|
1738
|
+
{
|
|
1739
|
+
amount,
|
|
1740
|
+
cartId,
|
|
1741
|
+
pincode,
|
|
1742
|
+
checkoutMode,
|
|
1743
|
+
refresh,
|
|
1744
|
+
cardReference,
|
|
1745
|
+
userDetails,
|
|
1746
|
+
requestHeaders,
|
|
1747
|
+
} = { requestHeaders: {} },
|
|
1748
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1749
|
+
) {
|
|
1750
|
+
const {
|
|
1751
|
+
error,
|
|
1752
|
+
} = PaymentApplicationValidator.getPaymentModeRoutes().validate(
|
|
1507
1753
|
{
|
|
1508
1754
|
amount,
|
|
1509
1755
|
cartId,
|
|
@@ -1522,7 +1768,7 @@ class Payment {
|
|
|
1522
1768
|
// Showing warrnings if extra unknown parameters are found
|
|
1523
1769
|
const {
|
|
1524
1770
|
error: warrning,
|
|
1525
|
-
} =
|
|
1771
|
+
} = PaymentApplicationValidator.getPaymentModeRoutes().validate(
|
|
1526
1772
|
{
|
|
1527
1773
|
amount,
|
|
1528
1774
|
cartId,
|
|
@@ -1537,9 +1783,8 @@ class Payment {
|
|
|
1537
1783
|
if (warrning) {
|
|
1538
1784
|
Logger({
|
|
1539
1785
|
level: "WARN",
|
|
1540
|
-
message:
|
|
1786
|
+
message: `Parameter Validation warrnings for application > Payment > getPaymentModeRoutes \n ${warrning}`,
|
|
1541
1787
|
});
|
|
1542
|
-
Logger({ level: "WARN", message: warrning });
|
|
1543
1788
|
}
|
|
1544
1789
|
|
|
1545
1790
|
const query_params = {};
|
|
@@ -1562,38 +1807,51 @@ class Payment {
|
|
|
1562
1807
|
}),
|
|
1563
1808
|
query_params,
|
|
1564
1809
|
undefined,
|
|
1565
|
-
xHeaders
|
|
1810
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1811
|
+
{ responseHeaders }
|
|
1566
1812
|
);
|
|
1567
1813
|
|
|
1814
|
+
let responseData = response;
|
|
1815
|
+
if (responseHeaders) {
|
|
1816
|
+
responseData = response[0];
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1568
1819
|
const {
|
|
1569
1820
|
error: res_error,
|
|
1570
|
-
} =
|
|
1571
|
-
|
|
1572
|
-
allowUnknown: false
|
|
1573
|
-
|
|
1821
|
+
} = PaymentApplicationModel.PaymentModeRouteResponse().validate(
|
|
1822
|
+
responseData,
|
|
1823
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1824
|
+
);
|
|
1574
1825
|
|
|
1575
1826
|
if (res_error) {
|
|
1576
1827
|
Logger({
|
|
1577
1828
|
level: "WARN",
|
|
1578
|
-
message:
|
|
1829
|
+
message: `Response Validation Warnnings for application > Payment > getPaymentModeRoutes \n ${res_error}`,
|
|
1579
1830
|
});
|
|
1580
|
-
Logger({ level: "WARN", message: res_error });
|
|
1581
1831
|
}
|
|
1582
1832
|
|
|
1583
1833
|
return response;
|
|
1584
1834
|
}
|
|
1585
1835
|
|
|
1586
1836
|
/**
|
|
1587
|
-
* @param {
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1837
|
+
* @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg
|
|
1838
|
+
* - Arg object.
|
|
1839
|
+
*
|
|
1840
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1841
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1842
|
+
* @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
|
|
1843
|
+
* Success response
|
|
1844
|
+
* @name getPaymentModeRoutesPaymentLink
|
|
1590
1845
|
* @summary: Get applicable payment options for payment link
|
|
1591
|
-
* @description: Use this API to get all valid payment options for doing a payment through payment link
|
|
1846
|
+
* @description: Use this API to get all valid payment options for doing a payment through payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/).
|
|
1592
1847
|
*/
|
|
1593
|
-
async getPaymentModeRoutesPaymentLink(
|
|
1848
|
+
async getPaymentModeRoutesPaymentLink(
|
|
1849
|
+
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
1850
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1851
|
+
) {
|
|
1594
1852
|
const {
|
|
1595
1853
|
error,
|
|
1596
|
-
} =
|
|
1854
|
+
} = PaymentApplicationValidator.getPaymentModeRoutesPaymentLink().validate(
|
|
1597
1855
|
{ paymentLinkId },
|
|
1598
1856
|
{ abortEarly: false, allowUnknown: true }
|
|
1599
1857
|
);
|
|
@@ -1604,17 +1862,15 @@ class Payment {
|
|
|
1604
1862
|
// Showing warrnings if extra unknown parameters are found
|
|
1605
1863
|
const {
|
|
1606
1864
|
error: warrning,
|
|
1607
|
-
} =
|
|
1865
|
+
} = PaymentApplicationValidator.getPaymentModeRoutesPaymentLink().validate(
|
|
1608
1866
|
{ paymentLinkId },
|
|
1609
1867
|
{ abortEarly: false, allowUnknown: false }
|
|
1610
1868
|
);
|
|
1611
1869
|
if (warrning) {
|
|
1612
1870
|
Logger({
|
|
1613
1871
|
level: "WARN",
|
|
1614
|
-
message:
|
|
1615
|
-
"Parameter Validation warrnings for getPaymentModeRoutesPaymentLink",
|
|
1872
|
+
message: `Parameter Validation warrnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${warrning}`,
|
|
1616
1873
|
});
|
|
1617
|
-
Logger({ level: "WARN", message: warrning });
|
|
1618
1874
|
}
|
|
1619
1875
|
|
|
1620
1876
|
const query_params = {};
|
|
@@ -1631,59 +1887,59 @@ class Payment {
|
|
|
1631
1887
|
}),
|
|
1632
1888
|
query_params,
|
|
1633
1889
|
undefined,
|
|
1634
|
-
xHeaders
|
|
1890
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1891
|
+
{ responseHeaders }
|
|
1635
1892
|
);
|
|
1636
1893
|
|
|
1894
|
+
let responseData = response;
|
|
1895
|
+
if (responseHeaders) {
|
|
1896
|
+
responseData = response[0];
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1637
1899
|
const {
|
|
1638
1900
|
error: res_error,
|
|
1639
|
-
} =
|
|
1640
|
-
|
|
1641
|
-
allowUnknown: false
|
|
1642
|
-
|
|
1901
|
+
} = PaymentApplicationModel.PaymentModeRouteResponse().validate(
|
|
1902
|
+
responseData,
|
|
1903
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1904
|
+
);
|
|
1643
1905
|
|
|
1644
1906
|
if (res_error) {
|
|
1645
1907
|
Logger({
|
|
1646
1908
|
level: "WARN",
|
|
1647
|
-
message:
|
|
1648
|
-
"Response Validation Warnnings for getPaymentModeRoutesPaymentLink",
|
|
1909
|
+
message: `Response Validation Warnnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${res_error}`,
|
|
1649
1910
|
});
|
|
1650
|
-
Logger({ level: "WARN", message: res_error });
|
|
1651
1911
|
}
|
|
1652
1912
|
|
|
1653
1913
|
return response;
|
|
1654
1914
|
}
|
|
1655
1915
|
|
|
1656
1916
|
/**
|
|
1657
|
-
* @param {
|
|
1658
|
-
* @param {
|
|
1659
|
-
* @param {
|
|
1660
|
-
* @
|
|
1661
|
-
*
|
|
1662
|
-
* @
|
|
1663
|
-
* to remove temporary cache files on payment gateway and replace with the
|
|
1664
|
-
* latest one.
|
|
1665
|
-
* @param {string} [arg.cardReference] - Card reference id of user's debit
|
|
1666
|
-
* or credit card.
|
|
1667
|
-
* @param {string} arg.orderType - The order type of shipment * HomeDelivery
|
|
1668
|
-
* - If the customer wants the order home-delivered * PickAtStore - If the
|
|
1669
|
-
* customer wants the handover of an order at the store itself.
|
|
1670
|
-
* @param {string} [arg.userDetails] - URIencoded JSON containing details of
|
|
1671
|
-
* an anonymous user.
|
|
1672
|
-
* @returns {Promise<PaymentModeRouteResponse>} - Success response
|
|
1917
|
+
* @param {PaymentApplicationValidator.GetPosPaymentModeRoutesParam} arg - Arg object.
|
|
1918
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1919
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1920
|
+
* @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
|
|
1921
|
+
* Success response
|
|
1922
|
+
* @name getPosPaymentModeRoutes
|
|
1673
1923
|
* @summary: Get applicable payment options for Point-of-Sale (POS)
|
|
1674
|
-
* @description: Use this API to get all valid payment options for doing a payment in POS.
|
|
1924
|
+
* @description: Use this API to get all valid payment options for doing a payment in POS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/).
|
|
1675
1925
|
*/
|
|
1676
|
-
async getPosPaymentModeRoutes(
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1926
|
+
async getPosPaymentModeRoutes(
|
|
1927
|
+
{
|
|
1928
|
+
amount,
|
|
1929
|
+
cartId,
|
|
1930
|
+
pincode,
|
|
1931
|
+
checkoutMode,
|
|
1932
|
+
orderType,
|
|
1933
|
+
refresh,
|
|
1934
|
+
cardReference,
|
|
1935
|
+
userDetails,
|
|
1936
|
+
requestHeaders,
|
|
1937
|
+
} = { requestHeaders: {} },
|
|
1938
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1939
|
+
) {
|
|
1940
|
+
const {
|
|
1941
|
+
error,
|
|
1942
|
+
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
1687
1943
|
{
|
|
1688
1944
|
amount,
|
|
1689
1945
|
cartId,
|
|
@@ -1703,7 +1959,7 @@ class Payment {
|
|
|
1703
1959
|
// Showing warrnings if extra unknown parameters are found
|
|
1704
1960
|
const {
|
|
1705
1961
|
error: warrning,
|
|
1706
|
-
} =
|
|
1962
|
+
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
1707
1963
|
{
|
|
1708
1964
|
amount,
|
|
1709
1965
|
cartId,
|
|
@@ -1719,9 +1975,8 @@ class Payment {
|
|
|
1719
1975
|
if (warrning) {
|
|
1720
1976
|
Logger({
|
|
1721
1977
|
level: "WARN",
|
|
1722
|
-
message:
|
|
1978
|
+
message: `Parameter Validation warrnings for application > Payment > getPosPaymentModeRoutes \n ${warrning}`,
|
|
1723
1979
|
});
|
|
1724
|
-
Logger({ level: "WARN", message: warrning });
|
|
1725
1980
|
}
|
|
1726
1981
|
|
|
1727
1982
|
const query_params = {};
|
|
@@ -1745,35 +2000,48 @@ class Payment {
|
|
|
1745
2000
|
}),
|
|
1746
2001
|
query_params,
|
|
1747
2002
|
undefined,
|
|
1748
|
-
xHeaders
|
|
2003
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2004
|
+
{ responseHeaders }
|
|
1749
2005
|
);
|
|
1750
2006
|
|
|
2007
|
+
let responseData = response;
|
|
2008
|
+
if (responseHeaders) {
|
|
2009
|
+
responseData = response[0];
|
|
2010
|
+
}
|
|
2011
|
+
|
|
1751
2012
|
const {
|
|
1752
2013
|
error: res_error,
|
|
1753
|
-
} =
|
|
1754
|
-
|
|
1755
|
-
allowUnknown: false
|
|
1756
|
-
|
|
2014
|
+
} = PaymentApplicationModel.PaymentModeRouteResponse().validate(
|
|
2015
|
+
responseData,
|
|
2016
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2017
|
+
);
|
|
1757
2018
|
|
|
1758
2019
|
if (res_error) {
|
|
1759
2020
|
Logger({
|
|
1760
2021
|
level: "WARN",
|
|
1761
|
-
message:
|
|
2022
|
+
message: `Response Validation Warnnings for application > Payment > getPosPaymentModeRoutes \n ${res_error}`,
|
|
1762
2023
|
});
|
|
1763
|
-
Logger({ level: "WARN", message: res_error });
|
|
1764
2024
|
}
|
|
1765
2025
|
|
|
1766
2026
|
return response;
|
|
1767
2027
|
}
|
|
1768
2028
|
|
|
1769
2029
|
/**
|
|
1770
|
-
* @param {
|
|
1771
|
-
* @
|
|
2030
|
+
* @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object.
|
|
2031
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2032
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2033
|
+
* @returns {Promise<PaymentApplicationModel.RupifiBannerResponse>} - Success response
|
|
2034
|
+
* @name getRupifiBannerDetails
|
|
1772
2035
|
* @summary: Get CreditLine Offer
|
|
1773
|
-
* @description: Get CreditLine Offer if user is tentatively approved by rupifi
|
|
2036
|
+
* @description: Get CreditLine Offer if user is tentatively approved by rupifi - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/).
|
|
1774
2037
|
*/
|
|
1775
|
-
async getRupifiBannerDetails(
|
|
1776
|
-
|
|
2038
|
+
async getRupifiBannerDetails(
|
|
2039
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2040
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2041
|
+
) {
|
|
2042
|
+
const {
|
|
2043
|
+
error,
|
|
2044
|
+
} = PaymentApplicationValidator.getRupifiBannerDetails().validate(
|
|
1777
2045
|
{},
|
|
1778
2046
|
{ abortEarly: false, allowUnknown: true }
|
|
1779
2047
|
);
|
|
@@ -1784,16 +2052,15 @@ class Payment {
|
|
|
1784
2052
|
// Showing warrnings if extra unknown parameters are found
|
|
1785
2053
|
const {
|
|
1786
2054
|
error: warrning,
|
|
1787
|
-
} =
|
|
2055
|
+
} = PaymentApplicationValidator.getRupifiBannerDetails().validate(
|
|
1788
2056
|
{},
|
|
1789
2057
|
{ abortEarly: false, allowUnknown: false }
|
|
1790
2058
|
);
|
|
1791
2059
|
if (warrning) {
|
|
1792
2060
|
Logger({
|
|
1793
2061
|
level: "WARN",
|
|
1794
|
-
message:
|
|
2062
|
+
message: `Parameter Validation warrnings for application > Payment > getRupifiBannerDetails \n ${warrning}`,
|
|
1795
2063
|
});
|
|
1796
|
-
Logger({ level: "WARN", message: warrning });
|
|
1797
2064
|
}
|
|
1798
2065
|
|
|
1799
2066
|
const query_params = {};
|
|
@@ -1809,12 +2076,18 @@ class Payment {
|
|
|
1809
2076
|
}),
|
|
1810
2077
|
query_params,
|
|
1811
2078
|
undefined,
|
|
1812
|
-
xHeaders
|
|
2079
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2080
|
+
{ responseHeaders }
|
|
1813
2081
|
);
|
|
1814
2082
|
|
|
2083
|
+
let responseData = response;
|
|
2084
|
+
if (responseHeaders) {
|
|
2085
|
+
responseData = response[0];
|
|
2086
|
+
}
|
|
2087
|
+
|
|
1815
2088
|
const {
|
|
1816
2089
|
error: res_error,
|
|
1817
|
-
} =
|
|
2090
|
+
} = PaymentApplicationModel.RupifiBannerResponse().validate(responseData, {
|
|
1818
2091
|
abortEarly: false,
|
|
1819
2092
|
allowUnknown: false,
|
|
1820
2093
|
});
|
|
@@ -1822,24 +2095,32 @@ class Payment {
|
|
|
1822
2095
|
if (res_error) {
|
|
1823
2096
|
Logger({
|
|
1824
2097
|
level: "WARN",
|
|
1825
|
-
message:
|
|
2098
|
+
message: `Response Validation Warnnings for application > Payment > getRupifiBannerDetails \n ${res_error}`,
|
|
1826
2099
|
});
|
|
1827
|
-
Logger({ level: "WARN", message: res_error });
|
|
1828
2100
|
}
|
|
1829
2101
|
|
|
1830
2102
|
return response;
|
|
1831
2103
|
}
|
|
1832
2104
|
|
|
1833
2105
|
/**
|
|
1834
|
-
* @param {
|
|
1835
|
-
*
|
|
1836
|
-
*
|
|
1837
|
-
* @
|
|
2106
|
+
* @param {PaymentApplicationValidator.GetUserBeneficiariesDetailParam} arg
|
|
2107
|
+
* - Arg object.
|
|
2108
|
+
*
|
|
2109
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2110
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2111
|
+
* @returns {Promise<PaymentApplicationModel.OrderBeneficiaryResponse>} -
|
|
2112
|
+
* Success response
|
|
2113
|
+
* @name getUserBeneficiariesDetail
|
|
1838
2114
|
* @summary: Lists the beneficiary of a refund
|
|
1839
|
-
* @description: Use this API to get the details of all active beneficiary added by a user for refund.
|
|
2115
|
+
* @description: Use this API to 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/getUserBeneficiariesDetail/).
|
|
1840
2116
|
*/
|
|
1841
|
-
async getUserBeneficiariesDetail(
|
|
1842
|
-
|
|
2117
|
+
async getUserBeneficiariesDetail(
|
|
2118
|
+
{ orderId, requestHeaders } = { requestHeaders: {} },
|
|
2119
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2120
|
+
) {
|
|
2121
|
+
const {
|
|
2122
|
+
error,
|
|
2123
|
+
} = PaymentApplicationValidator.getUserBeneficiariesDetail().validate(
|
|
1843
2124
|
{ orderId },
|
|
1844
2125
|
{ abortEarly: false, allowUnknown: true }
|
|
1845
2126
|
);
|
|
@@ -1850,17 +2131,15 @@ class Payment {
|
|
|
1850
2131
|
// Showing warrnings if extra unknown parameters are found
|
|
1851
2132
|
const {
|
|
1852
2133
|
error: warrning,
|
|
1853
|
-
} =
|
|
2134
|
+
} = PaymentApplicationValidator.getUserBeneficiariesDetail().validate(
|
|
1854
2135
|
{ orderId },
|
|
1855
2136
|
{ abortEarly: false, allowUnknown: false }
|
|
1856
2137
|
);
|
|
1857
2138
|
if (warrning) {
|
|
1858
2139
|
Logger({
|
|
1859
2140
|
level: "WARN",
|
|
1860
|
-
message:
|
|
1861
|
-
"Parameter Validation warrnings for getUserBeneficiariesDetail",
|
|
2141
|
+
message: `Parameter Validation warrnings for application > Payment > getUserBeneficiariesDetail \n ${warrning}`,
|
|
1862
2142
|
});
|
|
1863
|
-
Logger({ level: "WARN", message: warrning });
|
|
1864
2143
|
}
|
|
1865
2144
|
|
|
1866
2145
|
const query_params = {};
|
|
@@ -1877,36 +2156,48 @@ class Payment {
|
|
|
1877
2156
|
}),
|
|
1878
2157
|
query_params,
|
|
1879
2158
|
undefined,
|
|
1880
|
-
xHeaders
|
|
2159
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2160
|
+
{ responseHeaders }
|
|
1881
2161
|
);
|
|
1882
2162
|
|
|
2163
|
+
let responseData = response;
|
|
2164
|
+
if (responseHeaders) {
|
|
2165
|
+
responseData = response[0];
|
|
2166
|
+
}
|
|
2167
|
+
|
|
1883
2168
|
const {
|
|
1884
2169
|
error: res_error,
|
|
1885
|
-
} =
|
|
1886
|
-
|
|
1887
|
-
allowUnknown: false
|
|
1888
|
-
|
|
2170
|
+
} = PaymentApplicationModel.OrderBeneficiaryResponse().validate(
|
|
2171
|
+
responseData,
|
|
2172
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2173
|
+
);
|
|
1889
2174
|
|
|
1890
2175
|
if (res_error) {
|
|
1891
2176
|
Logger({
|
|
1892
2177
|
level: "WARN",
|
|
1893
|
-
message:
|
|
2178
|
+
message: `Response Validation Warnnings for application > Payment > getUserBeneficiariesDetail \n ${res_error}`,
|
|
1894
2179
|
});
|
|
1895
|
-
Logger({ level: "WARN", message: res_error });
|
|
1896
2180
|
}
|
|
1897
2181
|
|
|
1898
2182
|
return response;
|
|
1899
2183
|
}
|
|
1900
2184
|
|
|
1901
2185
|
/**
|
|
1902
|
-
* @param {
|
|
1903
|
-
* @param {
|
|
1904
|
-
* @
|
|
2186
|
+
* @param {PaymentApplicationValidator.InitialisePaymentParam} arg - Arg object.
|
|
2187
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2188
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2189
|
+
* @returns {Promise<PaymentApplicationModel.PaymentInitializationResponse>}
|
|
2190
|
+
* - Success response
|
|
2191
|
+
*
|
|
2192
|
+
* @name initialisePayment
|
|
1905
2193
|
* @summary: Initialize a payment (server-to-server) for UPI and BharatQR
|
|
1906
|
-
* @description: PUse this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen.
|
|
2194
|
+
* @description: PUse this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/).
|
|
1907
2195
|
*/
|
|
1908
|
-
async initialisePayment(
|
|
1909
|
-
|
|
2196
|
+
async initialisePayment(
|
|
2197
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2198
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2199
|
+
) {
|
|
2200
|
+
const { error } = PaymentApplicationValidator.initialisePayment().validate(
|
|
1910
2201
|
{ body },
|
|
1911
2202
|
{ abortEarly: false, allowUnknown: true }
|
|
1912
2203
|
);
|
|
@@ -1915,16 +2206,17 @@ class Payment {
|
|
|
1915
2206
|
}
|
|
1916
2207
|
|
|
1917
2208
|
// Showing warrnings if extra unknown parameters are found
|
|
1918
|
-
const {
|
|
2209
|
+
const {
|
|
2210
|
+
error: warrning,
|
|
2211
|
+
} = PaymentApplicationValidator.initialisePayment().validate(
|
|
1919
2212
|
{ body },
|
|
1920
2213
|
{ abortEarly: false, allowUnknown: false }
|
|
1921
2214
|
);
|
|
1922
2215
|
if (warrning) {
|
|
1923
2216
|
Logger({
|
|
1924
2217
|
level: "WARN",
|
|
1925
|
-
message:
|
|
2218
|
+
message: `Parameter Validation warrnings for application > Payment > initialisePayment \n ${warrning}`,
|
|
1926
2219
|
});
|
|
1927
|
-
Logger({ level: "WARN", message: warrning });
|
|
1928
2220
|
}
|
|
1929
2221
|
|
|
1930
2222
|
const query_params = {};
|
|
@@ -1940,36 +2232,52 @@ class Payment {
|
|
|
1940
2232
|
}),
|
|
1941
2233
|
query_params,
|
|
1942
2234
|
body,
|
|
1943
|
-
xHeaders
|
|
2235
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2236
|
+
{ responseHeaders }
|
|
1944
2237
|
);
|
|
1945
2238
|
|
|
2239
|
+
let responseData = response;
|
|
2240
|
+
if (responseHeaders) {
|
|
2241
|
+
responseData = response[0];
|
|
2242
|
+
}
|
|
2243
|
+
|
|
1946
2244
|
const {
|
|
1947
2245
|
error: res_error,
|
|
1948
|
-
} =
|
|
1949
|
-
|
|
1950
|
-
allowUnknown: false
|
|
1951
|
-
|
|
2246
|
+
} = PaymentApplicationModel.PaymentInitializationResponse().validate(
|
|
2247
|
+
responseData,
|
|
2248
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2249
|
+
);
|
|
1952
2250
|
|
|
1953
2251
|
if (res_error) {
|
|
1954
2252
|
Logger({
|
|
1955
2253
|
level: "WARN",
|
|
1956
|
-
message:
|
|
2254
|
+
message: `Response Validation Warnnings for application > Payment > initialisePayment \n ${res_error}`,
|
|
1957
2255
|
});
|
|
1958
|
-
Logger({ level: "WARN", message: res_error });
|
|
1959
2256
|
}
|
|
1960
2257
|
|
|
1961
2258
|
return response;
|
|
1962
2259
|
}
|
|
1963
2260
|
|
|
1964
2261
|
/**
|
|
1965
|
-
* @param {
|
|
1966
|
-
*
|
|
1967
|
-
*
|
|
2262
|
+
* @param {PaymentApplicationValidator.InitialisePaymentPaymentLinkParam} arg
|
|
2263
|
+
* - Arg object.
|
|
2264
|
+
*
|
|
2265
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2266
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2267
|
+
* @returns {Promise<PaymentApplicationModel.PaymentInitializationResponse>}
|
|
2268
|
+
* - Success response
|
|
2269
|
+
*
|
|
2270
|
+
* @name initialisePaymentPaymentLink
|
|
1968
2271
|
* @summary: Initialize a payment (server-to-server) for UPI and BharatQR
|
|
1969
|
-
* @description: Use this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen.
|
|
2272
|
+
* @description: Use this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/).
|
|
1970
2273
|
*/
|
|
1971
|
-
async initialisePaymentPaymentLink(
|
|
1972
|
-
|
|
2274
|
+
async initialisePaymentPaymentLink(
|
|
2275
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2276
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2277
|
+
) {
|
|
2278
|
+
const {
|
|
2279
|
+
error,
|
|
2280
|
+
} = PaymentApplicationValidator.initialisePaymentPaymentLink().validate(
|
|
1973
2281
|
{ body },
|
|
1974
2282
|
{ abortEarly: false, allowUnknown: true }
|
|
1975
2283
|
);
|
|
@@ -1980,17 +2288,15 @@ class Payment {
|
|
|
1980
2288
|
// Showing warrnings if extra unknown parameters are found
|
|
1981
2289
|
const {
|
|
1982
2290
|
error: warrning,
|
|
1983
|
-
} =
|
|
2291
|
+
} = PaymentApplicationValidator.initialisePaymentPaymentLink().validate(
|
|
1984
2292
|
{ body },
|
|
1985
2293
|
{ abortEarly: false, allowUnknown: false }
|
|
1986
2294
|
);
|
|
1987
2295
|
if (warrning) {
|
|
1988
2296
|
Logger({
|
|
1989
2297
|
level: "WARN",
|
|
1990
|
-
message:
|
|
1991
|
-
"Parameter Validation warrnings for initialisePaymentPaymentLink",
|
|
2298
|
+
message: `Parameter Validation warrnings for application > Payment > initialisePaymentPaymentLink \n ${warrning}`,
|
|
1992
2299
|
});
|
|
1993
|
-
Logger({ level: "WARN", message: warrning });
|
|
1994
2300
|
}
|
|
1995
2301
|
|
|
1996
2302
|
const query_params = {};
|
|
@@ -2006,37 +2312,50 @@ class Payment {
|
|
|
2006
2312
|
}),
|
|
2007
2313
|
query_params,
|
|
2008
2314
|
body,
|
|
2009
|
-
xHeaders
|
|
2315
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2316
|
+
{ responseHeaders }
|
|
2010
2317
|
);
|
|
2011
2318
|
|
|
2319
|
+
let responseData = response;
|
|
2320
|
+
if (responseHeaders) {
|
|
2321
|
+
responseData = response[0];
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2012
2324
|
const {
|
|
2013
2325
|
error: res_error,
|
|
2014
|
-
} =
|
|
2015
|
-
|
|
2016
|
-
allowUnknown: false
|
|
2017
|
-
|
|
2326
|
+
} = PaymentApplicationModel.PaymentInitializationResponse().validate(
|
|
2327
|
+
responseData,
|
|
2328
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2329
|
+
);
|
|
2018
2330
|
|
|
2019
2331
|
if (res_error) {
|
|
2020
2332
|
Logger({
|
|
2021
2333
|
level: "WARN",
|
|
2022
|
-
message:
|
|
2023
|
-
"Response Validation Warnnings for initialisePaymentPaymentLink",
|
|
2334
|
+
message: `Response Validation Warnnings for application > Payment > initialisePaymentPaymentLink \n ${res_error}`,
|
|
2024
2335
|
});
|
|
2025
|
-
Logger({ level: "WARN", message: res_error });
|
|
2026
2336
|
}
|
|
2027
2337
|
|
|
2028
2338
|
return response;
|
|
2029
2339
|
}
|
|
2030
2340
|
|
|
2031
2341
|
/**
|
|
2032
|
-
* @param {
|
|
2033
|
-
* @param {
|
|
2034
|
-
* @
|
|
2342
|
+
* @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
|
|
2343
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2344
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2345
|
+
* @returns {Promise<PaymentApplicationModel.OutstandingOrderDetailsResponse>}
|
|
2346
|
+
* - Success response
|
|
2347
|
+
*
|
|
2348
|
+
* @name outstandingOrderDetails
|
|
2035
2349
|
* @summary: API to fetch the outstanding order details
|
|
2036
|
-
* @description: Use this API to fetch the outstanding order details.
|
|
2350
|
+
* @description: Use this API to fetch the outstanding order details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
|
|
2037
2351
|
*/
|
|
2038
|
-
async outstandingOrderDetails(
|
|
2039
|
-
|
|
2352
|
+
async outstandingOrderDetails(
|
|
2353
|
+
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2354
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2355
|
+
) {
|
|
2356
|
+
const {
|
|
2357
|
+
error,
|
|
2358
|
+
} = PaymentApplicationValidator.outstandingOrderDetails().validate(
|
|
2040
2359
|
{ aggregator },
|
|
2041
2360
|
{ abortEarly: false, allowUnknown: true }
|
|
2042
2361
|
);
|
|
@@ -2047,16 +2366,15 @@ class Payment {
|
|
|
2047
2366
|
// Showing warrnings if extra unknown parameters are found
|
|
2048
2367
|
const {
|
|
2049
2368
|
error: warrning,
|
|
2050
|
-
} =
|
|
2369
|
+
} = PaymentApplicationValidator.outstandingOrderDetails().validate(
|
|
2051
2370
|
{ aggregator },
|
|
2052
2371
|
{ abortEarly: false, allowUnknown: false }
|
|
2053
2372
|
);
|
|
2054
2373
|
if (warrning) {
|
|
2055
2374
|
Logger({
|
|
2056
2375
|
level: "WARN",
|
|
2057
|
-
message:
|
|
2376
|
+
message: `Parameter Validation warrnings for application > Payment > outstandingOrderDetails \n ${warrning}`,
|
|
2058
2377
|
});
|
|
2059
|
-
Logger({ level: "WARN", message: warrning });
|
|
2060
2378
|
}
|
|
2061
2379
|
|
|
2062
2380
|
const query_params = {};
|
|
@@ -2073,36 +2391,47 @@ class Payment {
|
|
|
2073
2391
|
}),
|
|
2074
2392
|
query_params,
|
|
2075
2393
|
undefined,
|
|
2076
|
-
xHeaders
|
|
2394
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2395
|
+
{ responseHeaders }
|
|
2077
2396
|
);
|
|
2078
2397
|
|
|
2398
|
+
let responseData = response;
|
|
2399
|
+
if (responseHeaders) {
|
|
2400
|
+
responseData = response[0];
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2079
2403
|
const {
|
|
2080
2404
|
error: res_error,
|
|
2081
|
-
} =
|
|
2082
|
-
|
|
2083
|
-
allowUnknown: false
|
|
2084
|
-
|
|
2405
|
+
} = PaymentApplicationModel.OutstandingOrderDetailsResponse().validate(
|
|
2406
|
+
responseData,
|
|
2407
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2408
|
+
);
|
|
2085
2409
|
|
|
2086
2410
|
if (res_error) {
|
|
2087
2411
|
Logger({
|
|
2088
2412
|
level: "WARN",
|
|
2089
|
-
message:
|
|
2413
|
+
message: `Response Validation Warnnings for application > Payment > outstandingOrderDetails \n ${res_error}`,
|
|
2090
2414
|
});
|
|
2091
|
-
Logger({ level: "WARN", message: res_error });
|
|
2092
2415
|
}
|
|
2093
2416
|
|
|
2094
2417
|
return response;
|
|
2095
2418
|
}
|
|
2096
2419
|
|
|
2097
2420
|
/**
|
|
2098
|
-
* @param {
|
|
2099
|
-
* @param {
|
|
2100
|
-
* @
|
|
2421
|
+
* @param {PaymentApplicationValidator.PaidOrderDetailsParam} arg - Arg object.
|
|
2422
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2423
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2424
|
+
* @returns {Promise<PaymentApplicationModel.PaidOrderDetailsResponse>} -
|
|
2425
|
+
* Success response
|
|
2426
|
+
* @name paidOrderDetails
|
|
2101
2427
|
* @summary: API to fetch the paid order details
|
|
2102
|
-
* @description: Use this API to fetch the paid order details.
|
|
2428
|
+
* @description: Use this API to fetch the paid order details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/).
|
|
2103
2429
|
*/
|
|
2104
|
-
async paidOrderDetails(
|
|
2105
|
-
|
|
2430
|
+
async paidOrderDetails(
|
|
2431
|
+
{ aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2432
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2433
|
+
) {
|
|
2434
|
+
const { error } = PaymentApplicationValidator.paidOrderDetails().validate(
|
|
2106
2435
|
{ aggregator },
|
|
2107
2436
|
{ abortEarly: false, allowUnknown: true }
|
|
2108
2437
|
);
|
|
@@ -2111,16 +2440,17 @@ class Payment {
|
|
|
2111
2440
|
}
|
|
2112
2441
|
|
|
2113
2442
|
// Showing warrnings if extra unknown parameters are found
|
|
2114
|
-
const {
|
|
2443
|
+
const {
|
|
2444
|
+
error: warrning,
|
|
2445
|
+
} = PaymentApplicationValidator.paidOrderDetails().validate(
|
|
2115
2446
|
{ aggregator },
|
|
2116
2447
|
{ abortEarly: false, allowUnknown: false }
|
|
2117
2448
|
);
|
|
2118
2449
|
if (warrning) {
|
|
2119
2450
|
Logger({
|
|
2120
2451
|
level: "WARN",
|
|
2121
|
-
message:
|
|
2452
|
+
message: `Parameter Validation warrnings for application > Payment > paidOrderDetails \n ${warrning}`,
|
|
2122
2453
|
});
|
|
2123
|
-
Logger({ level: "WARN", message: warrning });
|
|
2124
2454
|
}
|
|
2125
2455
|
|
|
2126
2456
|
const query_params = {};
|
|
@@ -2137,36 +2467,47 @@ class Payment {
|
|
|
2137
2467
|
}),
|
|
2138
2468
|
query_params,
|
|
2139
2469
|
undefined,
|
|
2140
|
-
xHeaders
|
|
2470
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2471
|
+
{ responseHeaders }
|
|
2141
2472
|
);
|
|
2142
2473
|
|
|
2474
|
+
let responseData = response;
|
|
2475
|
+
if (responseHeaders) {
|
|
2476
|
+
responseData = response[0];
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2143
2479
|
const {
|
|
2144
2480
|
error: res_error,
|
|
2145
|
-
} =
|
|
2146
|
-
|
|
2147
|
-
allowUnknown: false
|
|
2148
|
-
|
|
2481
|
+
} = PaymentApplicationModel.PaidOrderDetailsResponse().validate(
|
|
2482
|
+
responseData,
|
|
2483
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2484
|
+
);
|
|
2149
2485
|
|
|
2150
2486
|
if (res_error) {
|
|
2151
2487
|
Logger({
|
|
2152
2488
|
level: "WARN",
|
|
2153
|
-
message:
|
|
2489
|
+
message: `Response Validation Warnnings for application > Payment > paidOrderDetails \n ${res_error}`,
|
|
2154
2490
|
});
|
|
2155
|
-
Logger({ level: "WARN", message: res_error });
|
|
2156
2491
|
}
|
|
2157
2492
|
|
|
2158
2493
|
return response;
|
|
2159
2494
|
}
|
|
2160
2495
|
|
|
2161
2496
|
/**
|
|
2162
|
-
* @param {
|
|
2163
|
-
* @param {
|
|
2164
|
-
* @
|
|
2497
|
+
* @param {PaymentApplicationValidator.PollingPaymentLinkParam} arg - Arg object.
|
|
2498
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2499
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2500
|
+
* @returns {Promise<PaymentApplicationModel.PollingPaymentLinkResponse>} -
|
|
2501
|
+
* Success response
|
|
2502
|
+
* @name pollingPaymentLink
|
|
2165
2503
|
* @summary: Used for polling if payment successful or not
|
|
2166
|
-
* @description: Use this API to poll if payment through payment was successful or not
|
|
2504
|
+
* @description: Use this API to poll if payment through payment was successful or not - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/).
|
|
2167
2505
|
*/
|
|
2168
|
-
async pollingPaymentLink(
|
|
2169
|
-
|
|
2506
|
+
async pollingPaymentLink(
|
|
2507
|
+
{ paymentLinkId, requestHeaders } = { requestHeaders: {} },
|
|
2508
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2509
|
+
) {
|
|
2510
|
+
const { error } = PaymentApplicationValidator.pollingPaymentLink().validate(
|
|
2170
2511
|
{ paymentLinkId },
|
|
2171
2512
|
{ abortEarly: false, allowUnknown: true }
|
|
2172
2513
|
);
|
|
@@ -2175,16 +2516,17 @@ class Payment {
|
|
|
2175
2516
|
}
|
|
2176
2517
|
|
|
2177
2518
|
// Showing warrnings if extra unknown parameters are found
|
|
2178
|
-
const {
|
|
2519
|
+
const {
|
|
2520
|
+
error: warrning,
|
|
2521
|
+
} = PaymentApplicationValidator.pollingPaymentLink().validate(
|
|
2179
2522
|
{ paymentLinkId },
|
|
2180
2523
|
{ abortEarly: false, allowUnknown: false }
|
|
2181
2524
|
);
|
|
2182
2525
|
if (warrning) {
|
|
2183
2526
|
Logger({
|
|
2184
2527
|
level: "WARN",
|
|
2185
|
-
message:
|
|
2528
|
+
message: `Parameter Validation warrnings for application > Payment > pollingPaymentLink \n ${warrning}`,
|
|
2186
2529
|
});
|
|
2187
|
-
Logger({ level: "WARN", message: warrning });
|
|
2188
2530
|
}
|
|
2189
2531
|
|
|
2190
2532
|
const query_params = {};
|
|
@@ -2201,39 +2543,50 @@ class Payment {
|
|
|
2201
2543
|
}),
|
|
2202
2544
|
query_params,
|
|
2203
2545
|
undefined,
|
|
2204
|
-
xHeaders
|
|
2546
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2547
|
+
{ responseHeaders }
|
|
2205
2548
|
);
|
|
2206
2549
|
|
|
2550
|
+
let responseData = response;
|
|
2551
|
+
if (responseHeaders) {
|
|
2552
|
+
responseData = response[0];
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2207
2555
|
const {
|
|
2208
2556
|
error: res_error,
|
|
2209
|
-
} =
|
|
2210
|
-
|
|
2211
|
-
allowUnknown: false
|
|
2212
|
-
|
|
2557
|
+
} = PaymentApplicationModel.PollingPaymentLinkResponse().validate(
|
|
2558
|
+
responseData,
|
|
2559
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2560
|
+
);
|
|
2213
2561
|
|
|
2214
2562
|
if (res_error) {
|
|
2215
2563
|
Logger({
|
|
2216
2564
|
level: "WARN",
|
|
2217
|
-
message:
|
|
2565
|
+
message: `Response Validation Warnnings for application > Payment > pollingPaymentLink \n ${res_error}`,
|
|
2218
2566
|
});
|
|
2219
|
-
Logger({ level: "WARN", message: res_error });
|
|
2220
2567
|
}
|
|
2221
2568
|
|
|
2222
2569
|
return response;
|
|
2223
2570
|
}
|
|
2224
2571
|
|
|
2225
2572
|
/**
|
|
2226
|
-
* @param {
|
|
2227
|
-
* @param {
|
|
2228
|
-
*
|
|
2229
|
-
* @
|
|
2230
|
-
*
|
|
2231
|
-
*
|
|
2573
|
+
* @param {PaymentApplicationValidator.RedirectToAggregatorParam} arg - Arg object.
|
|
2574
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2575
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2576
|
+
* @returns {Promise<PaymentApplicationModel.RedirectToAggregatorResponse>}
|
|
2577
|
+
* - Success response
|
|
2578
|
+
*
|
|
2579
|
+
* @name redirectToAggregator
|
|
2232
2580
|
* @summary: API to get the redirect url to redirect the user to aggregator's page
|
|
2233
|
-
* @description: Use this API to get the redirect url to redirect the user to aggregator's page
|
|
2581
|
+
* @description: Use this API to get the redirect url to redirect the user to aggregator's page - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/).
|
|
2234
2582
|
*/
|
|
2235
|
-
async redirectToAggregator(
|
|
2236
|
-
|
|
2583
|
+
async redirectToAggregator(
|
|
2584
|
+
{ source, aggregator, requestHeaders } = { requestHeaders: {} },
|
|
2585
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2586
|
+
) {
|
|
2587
|
+
const {
|
|
2588
|
+
error,
|
|
2589
|
+
} = PaymentApplicationValidator.redirectToAggregator().validate(
|
|
2237
2590
|
{ source, aggregator },
|
|
2238
2591
|
{ abortEarly: false, allowUnknown: true }
|
|
2239
2592
|
);
|
|
@@ -2244,16 +2597,15 @@ class Payment {
|
|
|
2244
2597
|
// Showing warrnings if extra unknown parameters are found
|
|
2245
2598
|
const {
|
|
2246
2599
|
error: warrning,
|
|
2247
|
-
} =
|
|
2600
|
+
} = PaymentApplicationValidator.redirectToAggregator().validate(
|
|
2248
2601
|
{ source, aggregator },
|
|
2249
2602
|
{ abortEarly: false, allowUnknown: false }
|
|
2250
2603
|
);
|
|
2251
2604
|
if (warrning) {
|
|
2252
2605
|
Logger({
|
|
2253
2606
|
level: "WARN",
|
|
2254
|
-
message:
|
|
2607
|
+
message: `Parameter Validation warrnings for application > Payment > redirectToAggregator \n ${warrning}`,
|
|
2255
2608
|
});
|
|
2256
|
-
Logger({ level: "WARN", message: warrning });
|
|
2257
2609
|
}
|
|
2258
2610
|
|
|
2259
2611
|
const query_params = {};
|
|
@@ -2271,36 +2623,46 @@ class Payment {
|
|
|
2271
2623
|
}),
|
|
2272
2624
|
query_params,
|
|
2273
2625
|
undefined,
|
|
2274
|
-
xHeaders
|
|
2626
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2627
|
+
{ responseHeaders }
|
|
2275
2628
|
);
|
|
2276
2629
|
|
|
2630
|
+
let responseData = response;
|
|
2631
|
+
if (responseHeaders) {
|
|
2632
|
+
responseData = response[0];
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2277
2635
|
const {
|
|
2278
2636
|
error: res_error,
|
|
2279
|
-
} =
|
|
2280
|
-
|
|
2281
|
-
allowUnknown: false
|
|
2282
|
-
|
|
2637
|
+
} = PaymentApplicationModel.RedirectToAggregatorResponse().validate(
|
|
2638
|
+
responseData,
|
|
2639
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2640
|
+
);
|
|
2283
2641
|
|
|
2284
2642
|
if (res_error) {
|
|
2285
2643
|
Logger({
|
|
2286
2644
|
level: "WARN",
|
|
2287
|
-
message:
|
|
2645
|
+
message: `Response Validation Warnnings for application > Payment > redirectToAggregator \n ${res_error}`,
|
|
2288
2646
|
});
|
|
2289
|
-
Logger({ level: "WARN", message: res_error });
|
|
2290
2647
|
}
|
|
2291
2648
|
|
|
2292
2649
|
return response;
|
|
2293
2650
|
}
|
|
2294
2651
|
|
|
2295
2652
|
/**
|
|
2296
|
-
* @param {
|
|
2297
|
-
* @param {
|
|
2298
|
-
* @
|
|
2653
|
+
* @param {PaymentApplicationValidator.RenderHTMLParam} arg - Arg object.
|
|
2654
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2655
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2656
|
+
* @returns {Promise<PaymentApplicationModel.renderHTMLResponse>} - Success response
|
|
2657
|
+
* @name renderHTML
|
|
2299
2658
|
* @summary: Convert base64 string to HTML form
|
|
2300
|
-
* @description: Use this API to decode base64 html form to plain HTML string.
|
|
2659
|
+
* @description: Use this API to decode base64 html form to plain HTML string. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
|
|
2301
2660
|
*/
|
|
2302
|
-
async renderHTML(
|
|
2303
|
-
|
|
2661
|
+
async renderHTML(
|
|
2662
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2663
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2664
|
+
) {
|
|
2665
|
+
const { error } = PaymentApplicationValidator.renderHTML().validate(
|
|
2304
2666
|
{ body },
|
|
2305
2667
|
{ abortEarly: false, allowUnknown: true }
|
|
2306
2668
|
);
|
|
@@ -2309,16 +2671,17 @@ class Payment {
|
|
|
2309
2671
|
}
|
|
2310
2672
|
|
|
2311
2673
|
// Showing warrnings if extra unknown parameters are found
|
|
2312
|
-
const {
|
|
2674
|
+
const {
|
|
2675
|
+
error: warrning,
|
|
2676
|
+
} = PaymentApplicationValidator.renderHTML().validate(
|
|
2313
2677
|
{ body },
|
|
2314
2678
|
{ abortEarly: false, allowUnknown: false }
|
|
2315
2679
|
);
|
|
2316
2680
|
if (warrning) {
|
|
2317
2681
|
Logger({
|
|
2318
2682
|
level: "WARN",
|
|
2319
|
-
message:
|
|
2683
|
+
message: `Parameter Validation warrnings for application > Payment > renderHTML \n ${warrning}`,
|
|
2320
2684
|
});
|
|
2321
|
-
Logger({ level: "WARN", message: warrning });
|
|
2322
2685
|
}
|
|
2323
2686
|
|
|
2324
2687
|
const query_params = {};
|
|
@@ -2334,12 +2697,18 @@ class Payment {
|
|
|
2334
2697
|
}),
|
|
2335
2698
|
query_params,
|
|
2336
2699
|
body,
|
|
2337
|
-
xHeaders
|
|
2700
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2701
|
+
{ responseHeaders }
|
|
2338
2702
|
);
|
|
2339
2703
|
|
|
2704
|
+
let responseData = response;
|
|
2705
|
+
if (responseHeaders) {
|
|
2706
|
+
responseData = response[0];
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2340
2709
|
const {
|
|
2341
2710
|
error: res_error,
|
|
2342
|
-
} =
|
|
2711
|
+
} = PaymentApplicationModel.renderHTMLResponse().validate(responseData, {
|
|
2343
2712
|
abortEarly: false,
|
|
2344
2713
|
allowUnknown: false,
|
|
2345
2714
|
});
|
|
@@ -2347,23 +2716,31 @@ class Payment {
|
|
|
2347
2716
|
if (res_error) {
|
|
2348
2717
|
Logger({
|
|
2349
2718
|
level: "WARN",
|
|
2350
|
-
message:
|
|
2719
|
+
message: `Response Validation Warnnings for application > Payment > renderHTML \n ${res_error}`,
|
|
2351
2720
|
});
|
|
2352
|
-
Logger({ level: "WARN", message: res_error });
|
|
2353
2721
|
}
|
|
2354
2722
|
|
|
2355
2723
|
return response;
|
|
2356
2724
|
}
|
|
2357
2725
|
|
|
2358
2726
|
/**
|
|
2359
|
-
* @param {
|
|
2360
|
-
* @param {
|
|
2361
|
-
* @
|
|
2727
|
+
* @param {PaymentApplicationValidator.ResendOrCancelPaymentParam} arg - Arg object.
|
|
2728
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2729
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2730
|
+
* @returns {Promise<PaymentApplicationModel.ResendOrCancelPaymentResponse>}
|
|
2731
|
+
* - Success response
|
|
2732
|
+
*
|
|
2733
|
+
* @name resendOrCancelPayment
|
|
2362
2734
|
* @summary: API to resend and cancel a payment link which was already generated.
|
|
2363
|
-
* @description: Use this API to perform resend or cancel a payment link based on request payload.
|
|
2735
|
+
* @description: Use this API to perform resend or cancel a payment link based on request payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/).
|
|
2364
2736
|
*/
|
|
2365
|
-
async resendOrCancelPayment(
|
|
2366
|
-
|
|
2737
|
+
async resendOrCancelPayment(
|
|
2738
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2739
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2740
|
+
) {
|
|
2741
|
+
const {
|
|
2742
|
+
error,
|
|
2743
|
+
} = PaymentApplicationValidator.resendOrCancelPayment().validate(
|
|
2367
2744
|
{ body },
|
|
2368
2745
|
{ abortEarly: false, allowUnknown: true }
|
|
2369
2746
|
);
|
|
@@ -2374,16 +2751,15 @@ class Payment {
|
|
|
2374
2751
|
// Showing warrnings if extra unknown parameters are found
|
|
2375
2752
|
const {
|
|
2376
2753
|
error: warrning,
|
|
2377
|
-
} =
|
|
2754
|
+
} = PaymentApplicationValidator.resendOrCancelPayment().validate(
|
|
2378
2755
|
{ body },
|
|
2379
2756
|
{ abortEarly: false, allowUnknown: false }
|
|
2380
2757
|
);
|
|
2381
2758
|
if (warrning) {
|
|
2382
2759
|
Logger({
|
|
2383
2760
|
level: "WARN",
|
|
2384
|
-
message:
|
|
2761
|
+
message: `Parameter Validation warrnings for application > Payment > resendOrCancelPayment \n ${warrning}`,
|
|
2385
2762
|
});
|
|
2386
|
-
Logger({ level: "WARN", message: warrning });
|
|
2387
2763
|
}
|
|
2388
2764
|
|
|
2389
2765
|
const query_params = {};
|
|
@@ -2399,36 +2775,47 @@ class Payment {
|
|
|
2399
2775
|
}),
|
|
2400
2776
|
query_params,
|
|
2401
2777
|
body,
|
|
2402
|
-
xHeaders
|
|
2778
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2779
|
+
{ responseHeaders }
|
|
2403
2780
|
);
|
|
2404
2781
|
|
|
2782
|
+
let responseData = response;
|
|
2783
|
+
if (responseHeaders) {
|
|
2784
|
+
responseData = response[0];
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2405
2787
|
const {
|
|
2406
2788
|
error: res_error,
|
|
2407
|
-
} =
|
|
2408
|
-
|
|
2409
|
-
allowUnknown: false
|
|
2410
|
-
|
|
2789
|
+
} = PaymentApplicationModel.ResendOrCancelPaymentResponse().validate(
|
|
2790
|
+
responseData,
|
|
2791
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2792
|
+
);
|
|
2411
2793
|
|
|
2412
2794
|
if (res_error) {
|
|
2413
2795
|
Logger({
|
|
2414
2796
|
level: "WARN",
|
|
2415
|
-
message:
|
|
2797
|
+
message: `Response Validation Warnnings for application > Payment > resendOrCancelPayment \n ${res_error}`,
|
|
2416
2798
|
});
|
|
2417
|
-
Logger({ level: "WARN", message: res_error });
|
|
2418
2799
|
}
|
|
2419
2800
|
|
|
2420
2801
|
return response;
|
|
2421
2802
|
}
|
|
2422
2803
|
|
|
2423
2804
|
/**
|
|
2424
|
-
* @param {
|
|
2425
|
-
* @param {
|
|
2426
|
-
* @
|
|
2805
|
+
* @param {PaymentApplicationValidator.ResendPaymentLinkParam} arg - Arg object.
|
|
2806
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2807
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2808
|
+
* @returns {Promise<PaymentApplicationModel.ResendPaymentLinkResponse>} -
|
|
2809
|
+
* Success response
|
|
2810
|
+
* @name resendPaymentLink
|
|
2427
2811
|
* @summary: Resend payment link
|
|
2428
|
-
* @description: Use this API to resend a payment link for the customer
|
|
2812
|
+
* @description: Use this API to resend a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/).
|
|
2429
2813
|
*/
|
|
2430
|
-
async resendPaymentLink(
|
|
2431
|
-
|
|
2814
|
+
async resendPaymentLink(
|
|
2815
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2816
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2817
|
+
) {
|
|
2818
|
+
const { error } = PaymentApplicationValidator.resendPaymentLink().validate(
|
|
2432
2819
|
{ body },
|
|
2433
2820
|
{ abortEarly: false, allowUnknown: true }
|
|
2434
2821
|
);
|
|
@@ -2437,16 +2824,17 @@ class Payment {
|
|
|
2437
2824
|
}
|
|
2438
2825
|
|
|
2439
2826
|
// Showing warrnings if extra unknown parameters are found
|
|
2440
|
-
const {
|
|
2827
|
+
const {
|
|
2828
|
+
error: warrning,
|
|
2829
|
+
} = PaymentApplicationValidator.resendPaymentLink().validate(
|
|
2441
2830
|
{ body },
|
|
2442
2831
|
{ abortEarly: false, allowUnknown: false }
|
|
2443
2832
|
);
|
|
2444
2833
|
if (warrning) {
|
|
2445
2834
|
Logger({
|
|
2446
2835
|
level: "WARN",
|
|
2447
|
-
message:
|
|
2836
|
+
message: `Parameter Validation warrnings for application > Payment > resendPaymentLink \n ${warrning}`,
|
|
2448
2837
|
});
|
|
2449
|
-
Logger({ level: "WARN", message: warrning });
|
|
2450
2838
|
}
|
|
2451
2839
|
|
|
2452
2840
|
const query_params = {};
|
|
@@ -2462,36 +2850,51 @@ class Payment {
|
|
|
2462
2850
|
}),
|
|
2463
2851
|
query_params,
|
|
2464
2852
|
body,
|
|
2465
|
-
xHeaders
|
|
2853
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2854
|
+
{ responseHeaders }
|
|
2466
2855
|
);
|
|
2467
2856
|
|
|
2857
|
+
let responseData = response;
|
|
2858
|
+
if (responseHeaders) {
|
|
2859
|
+
responseData = response[0];
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2468
2862
|
const {
|
|
2469
2863
|
error: res_error,
|
|
2470
|
-
} =
|
|
2471
|
-
|
|
2472
|
-
allowUnknown: false
|
|
2473
|
-
|
|
2864
|
+
} = PaymentApplicationModel.ResendPaymentLinkResponse().validate(
|
|
2865
|
+
responseData,
|
|
2866
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2867
|
+
);
|
|
2474
2868
|
|
|
2475
2869
|
if (res_error) {
|
|
2476
2870
|
Logger({
|
|
2477
2871
|
level: "WARN",
|
|
2478
|
-
message:
|
|
2872
|
+
message: `Response Validation Warnnings for application > Payment > resendPaymentLink \n ${res_error}`,
|
|
2479
2873
|
});
|
|
2480
|
-
Logger({ level: "WARN", message: res_error });
|
|
2481
2874
|
}
|
|
2482
2875
|
|
|
2483
2876
|
return response;
|
|
2484
2877
|
}
|
|
2485
2878
|
|
|
2486
2879
|
/**
|
|
2487
|
-
* @param {
|
|
2488
|
-
*
|
|
2489
|
-
* @
|
|
2880
|
+
* @param {PaymentApplicationValidator.UpdateDefaultBeneficiaryParam} arg -
|
|
2881
|
+
* Arg object.
|
|
2882
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2883
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2884
|
+
* @returns {Promise<PaymentApplicationModel.SetDefaultBeneficiaryResponse>}
|
|
2885
|
+
* - Success response
|
|
2886
|
+
*
|
|
2887
|
+
* @name updateDefaultBeneficiary
|
|
2490
2888
|
* @summary: Set a default beneficiary for a refund
|
|
2491
|
-
* @description: Use this API to set a default beneficiary for getting a refund.
|
|
2889
|
+
* @description: Use this API to set a default beneficiary for getting a refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/).
|
|
2492
2890
|
*/
|
|
2493
|
-
async updateDefaultBeneficiary(
|
|
2494
|
-
|
|
2891
|
+
async updateDefaultBeneficiary(
|
|
2892
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2893
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2894
|
+
) {
|
|
2895
|
+
const {
|
|
2896
|
+
error,
|
|
2897
|
+
} = PaymentApplicationValidator.updateDefaultBeneficiary().validate(
|
|
2495
2898
|
{ body },
|
|
2496
2899
|
{ abortEarly: false, allowUnknown: true }
|
|
2497
2900
|
);
|
|
@@ -2502,16 +2905,15 @@ class Payment {
|
|
|
2502
2905
|
// Showing warrnings if extra unknown parameters are found
|
|
2503
2906
|
const {
|
|
2504
2907
|
error: warrning,
|
|
2505
|
-
} =
|
|
2908
|
+
} = PaymentApplicationValidator.updateDefaultBeneficiary().validate(
|
|
2506
2909
|
{ body },
|
|
2507
2910
|
{ abortEarly: false, allowUnknown: false }
|
|
2508
2911
|
);
|
|
2509
2912
|
if (warrning) {
|
|
2510
2913
|
Logger({
|
|
2511
2914
|
level: "WARN",
|
|
2512
|
-
message:
|
|
2915
|
+
message: `Parameter Validation warrnings for application > Payment > updateDefaultBeneficiary \n ${warrning}`,
|
|
2513
2916
|
});
|
|
2514
|
-
Logger({ level: "WARN", message: warrning });
|
|
2515
2917
|
}
|
|
2516
2918
|
|
|
2517
2919
|
const query_params = {};
|
|
@@ -2527,36 +2929,46 @@ class Payment {
|
|
|
2527
2929
|
}),
|
|
2528
2930
|
query_params,
|
|
2529
2931
|
body,
|
|
2530
|
-
xHeaders
|
|
2932
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2933
|
+
{ responseHeaders }
|
|
2531
2934
|
);
|
|
2532
2935
|
|
|
2936
|
+
let responseData = response;
|
|
2937
|
+
if (responseHeaders) {
|
|
2938
|
+
responseData = response[0];
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2533
2941
|
const {
|
|
2534
2942
|
error: res_error,
|
|
2535
|
-
} =
|
|
2536
|
-
|
|
2537
|
-
allowUnknown: false
|
|
2538
|
-
|
|
2943
|
+
} = PaymentApplicationModel.SetDefaultBeneficiaryResponse().validate(
|
|
2944
|
+
responseData,
|
|
2945
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2946
|
+
);
|
|
2539
2947
|
|
|
2540
2948
|
if (res_error) {
|
|
2541
2949
|
Logger({
|
|
2542
2950
|
level: "WARN",
|
|
2543
|
-
message:
|
|
2951
|
+
message: `Response Validation Warnnings for application > Payment > updateDefaultBeneficiary \n ${res_error}`,
|
|
2544
2952
|
});
|
|
2545
|
-
Logger({ level: "WARN", message: res_error });
|
|
2546
2953
|
}
|
|
2547
2954
|
|
|
2548
2955
|
return response;
|
|
2549
2956
|
}
|
|
2550
2957
|
|
|
2551
2958
|
/**
|
|
2552
|
-
* @param {
|
|
2553
|
-
* @param {
|
|
2554
|
-
* @
|
|
2959
|
+
* @param {PaymentApplicationValidator.ValidateVPAParam} arg - Arg object.
|
|
2960
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2961
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2962
|
+
* @returns {Promise<PaymentApplicationModel.ValidateVPAResponse>} - Success response
|
|
2963
|
+
* @name validateVPA
|
|
2555
2964
|
* @summary: API to Validate UPI ID
|
|
2556
|
-
* @description: API to Validate UPI ID
|
|
2965
|
+
* @description: API to Validate UPI ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/).
|
|
2557
2966
|
*/
|
|
2558
|
-
async validateVPA(
|
|
2559
|
-
|
|
2967
|
+
async validateVPA(
|
|
2968
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2969
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2970
|
+
) {
|
|
2971
|
+
const { error } = PaymentApplicationValidator.validateVPA().validate(
|
|
2560
2972
|
{ body },
|
|
2561
2973
|
{ abortEarly: false, allowUnknown: true }
|
|
2562
2974
|
);
|
|
@@ -2565,16 +2977,17 @@ class Payment {
|
|
|
2565
2977
|
}
|
|
2566
2978
|
|
|
2567
2979
|
// Showing warrnings if extra unknown parameters are found
|
|
2568
|
-
const {
|
|
2980
|
+
const {
|
|
2981
|
+
error: warrning,
|
|
2982
|
+
} = PaymentApplicationValidator.validateVPA().validate(
|
|
2569
2983
|
{ body },
|
|
2570
2984
|
{ abortEarly: false, allowUnknown: false }
|
|
2571
2985
|
);
|
|
2572
2986
|
if (warrning) {
|
|
2573
2987
|
Logger({
|
|
2574
2988
|
level: "WARN",
|
|
2575
|
-
message:
|
|
2989
|
+
message: `Parameter Validation warrnings for application > Payment > validateVPA \n ${warrning}`,
|
|
2576
2990
|
});
|
|
2577
|
-
Logger({ level: "WARN", message: warrning });
|
|
2578
2991
|
}
|
|
2579
2992
|
|
|
2580
2993
|
const query_params = {};
|
|
@@ -2590,12 +3003,18 @@ class Payment {
|
|
|
2590
3003
|
}),
|
|
2591
3004
|
query_params,
|
|
2592
3005
|
body,
|
|
2593
|
-
xHeaders
|
|
3006
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3007
|
+
{ responseHeaders }
|
|
2594
3008
|
);
|
|
2595
3009
|
|
|
3010
|
+
let responseData = response;
|
|
3011
|
+
if (responseHeaders) {
|
|
3012
|
+
responseData = response[0];
|
|
3013
|
+
}
|
|
3014
|
+
|
|
2596
3015
|
const {
|
|
2597
3016
|
error: res_error,
|
|
2598
|
-
} =
|
|
3017
|
+
} = PaymentApplicationModel.ValidateVPAResponse().validate(responseData, {
|
|
2599
3018
|
abortEarly: false,
|
|
2600
3019
|
allowUnknown: false,
|
|
2601
3020
|
});
|
|
@@ -2603,23 +3022,30 @@ class Payment {
|
|
|
2603
3022
|
if (res_error) {
|
|
2604
3023
|
Logger({
|
|
2605
3024
|
level: "WARN",
|
|
2606
|
-
message:
|
|
3025
|
+
message: `Response Validation Warnnings for application > Payment > validateVPA \n ${res_error}`,
|
|
2607
3026
|
});
|
|
2608
|
-
Logger({ level: "WARN", message: res_error });
|
|
2609
3027
|
}
|
|
2610
3028
|
|
|
2611
3029
|
return response;
|
|
2612
3030
|
}
|
|
2613
3031
|
|
|
2614
3032
|
/**
|
|
2615
|
-
* @param {
|
|
2616
|
-
* @param {
|
|
2617
|
-
* @
|
|
3033
|
+
* @param {PaymentApplicationValidator.VerifyAndChargePaymentParam} arg - Arg object.
|
|
3034
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3035
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3036
|
+
* @returns {Promise<PaymentApplicationModel.ChargeCustomerResponse>} -
|
|
3037
|
+
* Success response
|
|
3038
|
+
* @name verifyAndChargePayment
|
|
2618
3039
|
* @summary: Verify and charge payment
|
|
2619
|
-
* @description: Use this API to verify and check the status of a payment transaction (server-to-server) made through aggregators like Simpl and Mswipe.
|
|
3040
|
+
* @description: Use this API to verify and check the status of a payment transaction (server-to-server) made through aggregators like Simpl and Mswipe. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/).
|
|
2620
3041
|
*/
|
|
2621
|
-
async verifyAndChargePayment(
|
|
2622
|
-
|
|
3042
|
+
async verifyAndChargePayment(
|
|
3043
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3044
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3045
|
+
) {
|
|
3046
|
+
const {
|
|
3047
|
+
error,
|
|
3048
|
+
} = PaymentApplicationValidator.verifyAndChargePayment().validate(
|
|
2623
3049
|
{ body },
|
|
2624
3050
|
{ abortEarly: false, allowUnknown: true }
|
|
2625
3051
|
);
|
|
@@ -2630,16 +3056,15 @@ class Payment {
|
|
|
2630
3056
|
// Showing warrnings if extra unknown parameters are found
|
|
2631
3057
|
const {
|
|
2632
3058
|
error: warrning,
|
|
2633
|
-
} =
|
|
3059
|
+
} = PaymentApplicationValidator.verifyAndChargePayment().validate(
|
|
2634
3060
|
{ body },
|
|
2635
3061
|
{ abortEarly: false, allowUnknown: false }
|
|
2636
3062
|
);
|
|
2637
3063
|
if (warrning) {
|
|
2638
3064
|
Logger({
|
|
2639
3065
|
level: "WARN",
|
|
2640
|
-
message:
|
|
3066
|
+
message: `Parameter Validation warrnings for application > Payment > verifyAndChargePayment \n ${warrning}`,
|
|
2641
3067
|
});
|
|
2642
|
-
Logger({ level: "WARN", message: warrning });
|
|
2643
3068
|
}
|
|
2644
3069
|
|
|
2645
3070
|
const query_params = {};
|
|
@@ -2655,36 +3080,50 @@ class Payment {
|
|
|
2655
3080
|
}),
|
|
2656
3081
|
query_params,
|
|
2657
3082
|
body,
|
|
2658
|
-
xHeaders
|
|
3083
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3084
|
+
{ responseHeaders }
|
|
2659
3085
|
);
|
|
2660
3086
|
|
|
3087
|
+
let responseData = response;
|
|
3088
|
+
if (responseHeaders) {
|
|
3089
|
+
responseData = response[0];
|
|
3090
|
+
}
|
|
3091
|
+
|
|
2661
3092
|
const {
|
|
2662
3093
|
error: res_error,
|
|
2663
|
-
} =
|
|
2664
|
-
|
|
2665
|
-
allowUnknown: false
|
|
2666
|
-
|
|
3094
|
+
} = PaymentApplicationModel.ChargeCustomerResponse().validate(
|
|
3095
|
+
responseData,
|
|
3096
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3097
|
+
);
|
|
2667
3098
|
|
|
2668
3099
|
if (res_error) {
|
|
2669
3100
|
Logger({
|
|
2670
3101
|
level: "WARN",
|
|
2671
|
-
message:
|
|
3102
|
+
message: `Response Validation Warnnings for application > Payment > verifyAndChargePayment \n ${res_error}`,
|
|
2672
3103
|
});
|
|
2673
|
-
Logger({ level: "WARN", message: res_error });
|
|
2674
3104
|
}
|
|
2675
3105
|
|
|
2676
3106
|
return response;
|
|
2677
3107
|
}
|
|
2678
3108
|
|
|
2679
3109
|
/**
|
|
2680
|
-
* @param {
|
|
2681
|
-
*
|
|
2682
|
-
* @
|
|
3110
|
+
* @param {PaymentApplicationValidator.VerifyCustomerForPaymentParam} arg -
|
|
3111
|
+
* Arg object.
|
|
3112
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3113
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3114
|
+
* @returns {Promise<PaymentApplicationModel.ValidateCustomerResponse>} -
|
|
3115
|
+
* Success response
|
|
3116
|
+
* @name verifyCustomerForPayment
|
|
2683
3117
|
* @summary: Validate customer for payment
|
|
2684
|
-
* @description: Use this API to check if the customer is eligible to use credit-line facilities such as Simpl Pay Later and Rupifi.
|
|
3118
|
+
* @description: Use this API to check if the customer is eligible to use credit-line facilities such as Simpl Pay Later and Rupifi. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/).
|
|
2685
3119
|
*/
|
|
2686
|
-
async verifyCustomerForPayment(
|
|
2687
|
-
|
|
3120
|
+
async verifyCustomerForPayment(
|
|
3121
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3122
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3123
|
+
) {
|
|
3124
|
+
const {
|
|
3125
|
+
error,
|
|
3126
|
+
} = PaymentApplicationValidator.verifyCustomerForPayment().validate(
|
|
2688
3127
|
{ body },
|
|
2689
3128
|
{ abortEarly: false, allowUnknown: true }
|
|
2690
3129
|
);
|
|
@@ -2695,16 +3134,15 @@ class Payment {
|
|
|
2695
3134
|
// Showing warrnings if extra unknown parameters are found
|
|
2696
3135
|
const {
|
|
2697
3136
|
error: warrning,
|
|
2698
|
-
} =
|
|
3137
|
+
} = PaymentApplicationValidator.verifyCustomerForPayment().validate(
|
|
2699
3138
|
{ body },
|
|
2700
3139
|
{ abortEarly: false, allowUnknown: false }
|
|
2701
3140
|
);
|
|
2702
3141
|
if (warrning) {
|
|
2703
3142
|
Logger({
|
|
2704
3143
|
level: "WARN",
|
|
2705
|
-
message:
|
|
3144
|
+
message: `Parameter Validation warrnings for application > Payment > verifyCustomerForPayment \n ${warrning}`,
|
|
2706
3145
|
});
|
|
2707
|
-
Logger({ level: "WARN", message: warrning });
|
|
2708
3146
|
}
|
|
2709
3147
|
|
|
2710
3148
|
const query_params = {};
|
|
@@ -2720,37 +3158,46 @@ class Payment {
|
|
|
2720
3158
|
}),
|
|
2721
3159
|
query_params,
|
|
2722
3160
|
body,
|
|
2723
|
-
xHeaders
|
|
3161
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3162
|
+
{ responseHeaders }
|
|
2724
3163
|
);
|
|
2725
3164
|
|
|
3165
|
+
let responseData = response;
|
|
3166
|
+
if (responseHeaders) {
|
|
3167
|
+
responseData = response[0];
|
|
3168
|
+
}
|
|
3169
|
+
|
|
2726
3170
|
const {
|
|
2727
3171
|
error: res_error,
|
|
2728
|
-
} =
|
|
2729
|
-
|
|
2730
|
-
allowUnknown: false
|
|
2731
|
-
|
|
3172
|
+
} = PaymentApplicationModel.ValidateCustomerResponse().validate(
|
|
3173
|
+
responseData,
|
|
3174
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3175
|
+
);
|
|
2732
3176
|
|
|
2733
3177
|
if (res_error) {
|
|
2734
3178
|
Logger({
|
|
2735
3179
|
level: "WARN",
|
|
2736
|
-
message:
|
|
3180
|
+
message: `Response Validation Warnnings for application > Payment > verifyCustomerForPayment \n ${res_error}`,
|
|
2737
3181
|
});
|
|
2738
|
-
Logger({ level: "WARN", message: res_error });
|
|
2739
3182
|
}
|
|
2740
3183
|
|
|
2741
3184
|
return response;
|
|
2742
3185
|
}
|
|
2743
3186
|
|
|
2744
3187
|
/**
|
|
2745
|
-
* @param {
|
|
2746
|
-
* @param {
|
|
2747
|
-
*
|
|
2748
|
-
* @returns {Promise<IfscCodeResponse>} - Success response
|
|
3188
|
+
* @param {PaymentApplicationValidator.VerifyIfscCodeParam} arg - Arg object.
|
|
3189
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3190
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3191
|
+
* @returns {Promise<PaymentApplicationModel.IfscCodeResponse>} - Success response
|
|
3192
|
+
* @name verifyIfscCode
|
|
2749
3193
|
* @summary: Verify IFSC Code
|
|
2750
|
-
* @description: Use this API to check whether the 11-digit IFSC code is valid and to fetch the bank details for refund.
|
|
3194
|
+
* @description: Use this API to check whether the 11-digit IFSC code is valid and to fetch the bank details for refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/).
|
|
2751
3195
|
*/
|
|
2752
|
-
async verifyIfscCode(
|
|
2753
|
-
|
|
3196
|
+
async verifyIfscCode(
|
|
3197
|
+
{ ifscCode, requestHeaders } = { requestHeaders: {} },
|
|
3198
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3199
|
+
) {
|
|
3200
|
+
const { error } = PaymentApplicationValidator.verifyIfscCode().validate(
|
|
2754
3201
|
{ ifscCode },
|
|
2755
3202
|
{ abortEarly: false, allowUnknown: true }
|
|
2756
3203
|
);
|
|
@@ -2759,16 +3206,17 @@ class Payment {
|
|
|
2759
3206
|
}
|
|
2760
3207
|
|
|
2761
3208
|
// Showing warrnings if extra unknown parameters are found
|
|
2762
|
-
const {
|
|
3209
|
+
const {
|
|
3210
|
+
error: warrning,
|
|
3211
|
+
} = PaymentApplicationValidator.verifyIfscCode().validate(
|
|
2763
3212
|
{ ifscCode },
|
|
2764
3213
|
{ abortEarly: false, allowUnknown: false }
|
|
2765
3214
|
);
|
|
2766
3215
|
if (warrning) {
|
|
2767
3216
|
Logger({
|
|
2768
3217
|
level: "WARN",
|
|
2769
|
-
message:
|
|
3218
|
+
message: `Parameter Validation warrnings for application > Payment > verifyIfscCode \n ${warrning}`,
|
|
2770
3219
|
});
|
|
2771
|
-
Logger({ level: "WARN", message: warrning });
|
|
2772
3220
|
}
|
|
2773
3221
|
|
|
2774
3222
|
const query_params = {};
|
|
@@ -2785,12 +3233,18 @@ class Payment {
|
|
|
2785
3233
|
}),
|
|
2786
3234
|
query_params,
|
|
2787
3235
|
undefined,
|
|
2788
|
-
xHeaders
|
|
3236
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3237
|
+
{ responseHeaders }
|
|
2789
3238
|
);
|
|
2790
3239
|
|
|
3240
|
+
let responseData = response;
|
|
3241
|
+
if (responseHeaders) {
|
|
3242
|
+
responseData = response[0];
|
|
3243
|
+
}
|
|
3244
|
+
|
|
2791
3245
|
const {
|
|
2792
3246
|
error: res_error,
|
|
2793
|
-
} =
|
|
3247
|
+
} = PaymentApplicationModel.IfscCodeResponse().validate(responseData, {
|
|
2794
3248
|
abortEarly: false,
|
|
2795
3249
|
allowUnknown: false,
|
|
2796
3250
|
});
|
|
@@ -2798,25 +3252,33 @@ class Payment {
|
|
|
2798
3252
|
if (res_error) {
|
|
2799
3253
|
Logger({
|
|
2800
3254
|
level: "WARN",
|
|
2801
|
-
message:
|
|
3255
|
+
message: `Response Validation Warnnings for application > Payment > verifyIfscCode \n ${res_error}`,
|
|
2802
3256
|
});
|
|
2803
|
-
Logger({ level: "WARN", message: res_error });
|
|
2804
3257
|
}
|
|
2805
3258
|
|
|
2806
3259
|
return response;
|
|
2807
3260
|
}
|
|
2808
3261
|
|
|
2809
3262
|
/**
|
|
2810
|
-
* @param {
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
3263
|
+
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForBankParam} arg
|
|
3264
|
+
* - Arg object.
|
|
3265
|
+
*
|
|
3266
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3267
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3268
|
+
* @returns {Promise<PaymentApplicationModel.AddBeneficiaryViaOtpVerificationResponse>}
|
|
3269
|
+
* - Success response
|
|
3270
|
+
*
|
|
3271
|
+
* @name verifyOtpAndAddBeneficiaryForBank
|
|
2813
3272
|
* @summary: Verify the beneficiary details using OTP
|
|
2814
|
-
* @description: Use this API to perform an OTP validation before saving the beneficiary details added for a refund.
|
|
3273
|
+
* @description: Use this API to perform an OTP validation before saving the beneficiary details added for a refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/).
|
|
2815
3274
|
*/
|
|
2816
|
-
async verifyOtpAndAddBeneficiaryForBank(
|
|
3275
|
+
async verifyOtpAndAddBeneficiaryForBank(
|
|
3276
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3277
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3278
|
+
) {
|
|
2817
3279
|
const {
|
|
2818
3280
|
error,
|
|
2819
|
-
} =
|
|
3281
|
+
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForBank().validate(
|
|
2820
3282
|
{ body },
|
|
2821
3283
|
{ abortEarly: false, allowUnknown: true }
|
|
2822
3284
|
);
|
|
@@ -2827,17 +3289,15 @@ class Payment {
|
|
|
2827
3289
|
// Showing warrnings if extra unknown parameters are found
|
|
2828
3290
|
const {
|
|
2829
3291
|
error: warrning,
|
|
2830
|
-
} =
|
|
3292
|
+
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForBank().validate(
|
|
2831
3293
|
{ body },
|
|
2832
3294
|
{ abortEarly: false, allowUnknown: false }
|
|
2833
3295
|
);
|
|
2834
3296
|
if (warrning) {
|
|
2835
3297
|
Logger({
|
|
2836
3298
|
level: "WARN",
|
|
2837
|
-
message:
|
|
2838
|
-
"Parameter Validation warrnings for verifyOtpAndAddBeneficiaryForBank",
|
|
3299
|
+
message: `Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${warrning}`,
|
|
2839
3300
|
});
|
|
2840
|
-
Logger({ level: "WARN", message: warrning });
|
|
2841
3301
|
}
|
|
2842
3302
|
|
|
2843
3303
|
const query_params = {};
|
|
@@ -2853,39 +3313,50 @@ class Payment {
|
|
|
2853
3313
|
}),
|
|
2854
3314
|
query_params,
|
|
2855
3315
|
body,
|
|
2856
|
-
xHeaders
|
|
3316
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3317
|
+
{ responseHeaders }
|
|
2857
3318
|
);
|
|
2858
3319
|
|
|
3320
|
+
let responseData = response;
|
|
3321
|
+
if (responseHeaders) {
|
|
3322
|
+
responseData = response[0];
|
|
3323
|
+
}
|
|
3324
|
+
|
|
2859
3325
|
const {
|
|
2860
3326
|
error: res_error,
|
|
2861
|
-
} =
|
|
2862
|
-
|
|
3327
|
+
} = PaymentApplicationModel.AddBeneficiaryViaOtpVerificationResponse().validate(
|
|
3328
|
+
responseData,
|
|
2863
3329
|
{ abortEarly: false, allowUnknown: false }
|
|
2864
3330
|
);
|
|
2865
3331
|
|
|
2866
3332
|
if (res_error) {
|
|
2867
3333
|
Logger({
|
|
2868
3334
|
level: "WARN",
|
|
2869
|
-
message:
|
|
2870
|
-
"Response Validation Warnnings for verifyOtpAndAddBeneficiaryForBank",
|
|
3335
|
+
message: `Response Validation Warnnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${res_error}`,
|
|
2871
3336
|
});
|
|
2872
|
-
Logger({ level: "WARN", message: res_error });
|
|
2873
3337
|
}
|
|
2874
3338
|
|
|
2875
3339
|
return response;
|
|
2876
3340
|
}
|
|
2877
3341
|
|
|
2878
3342
|
/**
|
|
2879
|
-
* @param {
|
|
2880
|
-
*
|
|
2881
|
-
*
|
|
3343
|
+
* @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam} arg
|
|
3344
|
+
* - Arg object.
|
|
3345
|
+
*
|
|
3346
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3347
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3348
|
+
* @returns {Promise<PaymentApplicationModel.WalletOtpResponse>} - Success response
|
|
3349
|
+
* @name verifyOtpAndAddBeneficiaryForWallet
|
|
2882
3350
|
* @summary: Send OTP on adding a wallet beneficiary
|
|
2883
|
-
* @description: Use this API to send an OTP while adding a wallet beneficiary by mobile no. verification.
|
|
3351
|
+
* @description: Use this API to send an OTP while adding a wallet beneficiary by mobile no. verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/).
|
|
2884
3352
|
*/
|
|
2885
|
-
async verifyOtpAndAddBeneficiaryForWallet(
|
|
3353
|
+
async verifyOtpAndAddBeneficiaryForWallet(
|
|
3354
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3355
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3356
|
+
) {
|
|
2886
3357
|
const {
|
|
2887
3358
|
error,
|
|
2888
|
-
} =
|
|
3359
|
+
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForWallet().validate(
|
|
2889
3360
|
{ body },
|
|
2890
3361
|
{ abortEarly: false, allowUnknown: true }
|
|
2891
3362
|
);
|
|
@@ -2896,17 +3367,15 @@ class Payment {
|
|
|
2896
3367
|
// Showing warrnings if extra unknown parameters are found
|
|
2897
3368
|
const {
|
|
2898
3369
|
error: warrning,
|
|
2899
|
-
} =
|
|
3370
|
+
} = PaymentApplicationValidator.verifyOtpAndAddBeneficiaryForWallet().validate(
|
|
2900
3371
|
{ body },
|
|
2901
3372
|
{ abortEarly: false, allowUnknown: false }
|
|
2902
3373
|
);
|
|
2903
3374
|
if (warrning) {
|
|
2904
3375
|
Logger({
|
|
2905
3376
|
level: "WARN",
|
|
2906
|
-
message:
|
|
2907
|
-
"Parameter Validation warrnings for verifyOtpAndAddBeneficiaryForWallet",
|
|
3377
|
+
message: `Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${warrning}`,
|
|
2908
3378
|
});
|
|
2909
|
-
Logger({ level: "WARN", message: warrning });
|
|
2910
3379
|
}
|
|
2911
3380
|
|
|
2912
3381
|
const query_params = {};
|
|
@@ -2922,12 +3391,18 @@ class Payment {
|
|
|
2922
3391
|
}),
|
|
2923
3392
|
query_params,
|
|
2924
3393
|
body,
|
|
2925
|
-
xHeaders
|
|
3394
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3395
|
+
{ responseHeaders }
|
|
2926
3396
|
);
|
|
2927
3397
|
|
|
3398
|
+
let responseData = response;
|
|
3399
|
+
if (responseHeaders) {
|
|
3400
|
+
responseData = response[0];
|
|
3401
|
+
}
|
|
3402
|
+
|
|
2928
3403
|
const {
|
|
2929
3404
|
error: res_error,
|
|
2930
|
-
} =
|
|
3405
|
+
} = PaymentApplicationModel.WalletOtpResponse().validate(responseData, {
|
|
2931
3406
|
abortEarly: false,
|
|
2932
3407
|
allowUnknown: false,
|
|
2933
3408
|
});
|
|
@@ -2935,10 +3410,8 @@ class Payment {
|
|
|
2935
3410
|
if (res_error) {
|
|
2936
3411
|
Logger({
|
|
2937
3412
|
level: "WARN",
|
|
2938
|
-
message:
|
|
2939
|
-
"Response Validation Warnnings for verifyOtpAndAddBeneficiaryForWallet",
|
|
3413
|
+
message: `Response Validation Warnnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${res_error}`,
|
|
2940
3414
|
});
|
|
2941
|
-
Logger({ level: "WARN", message: res_error });
|
|
2942
3415
|
}
|
|
2943
3416
|
|
|
2944
3417
|
return response;
|