@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,857 +0,0 @@
|
|
|
1
|
-
const PartnerAPIClient = require("../PartnerAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
|
-
const Paginator = require("../../common/Paginator");
|
|
7
|
-
const PaymentPartnerValidator = require("./PaymentPartnerValidator");
|
|
8
|
-
const PaymentPartnerModel = require("./PaymentPartnerModel");
|
|
9
|
-
const { Logger } = require("./../../common/Logger");
|
|
10
|
-
const Joi = require("joi");
|
|
11
|
-
|
|
12
|
-
class Payment {
|
|
13
|
-
constructor(config) {
|
|
14
|
-
this.config = config;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @param {PaymentPartnerValidator.GetPaymentconfigParam} arg - Arg object.
|
|
19
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<PaymentPartnerModel.PaymentConfigResponse>} - Success response
|
|
22
|
-
* @name getPaymentconfig
|
|
23
|
-
* @summary: Fetch payment configs.
|
|
24
|
-
* @description: Get partner Payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/getPaymentconfig/).
|
|
25
|
-
*/
|
|
26
|
-
async getPaymentconfig(
|
|
27
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
28
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
29
|
-
) {
|
|
30
|
-
const { error } = PaymentPartnerValidator.getPaymentconfig().validate(
|
|
31
|
-
{},
|
|
32
|
-
{ abortEarly: false, allowUnknown: true }
|
|
33
|
-
);
|
|
34
|
-
if (error) {
|
|
35
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Showing warrnings if extra unknown parameters are found
|
|
39
|
-
const {
|
|
40
|
-
error: warrning,
|
|
41
|
-
} = PaymentPartnerValidator.getPaymentconfig().validate(
|
|
42
|
-
{},
|
|
43
|
-
{ abortEarly: false, allowUnknown: false }
|
|
44
|
-
);
|
|
45
|
-
if (warrning) {
|
|
46
|
-
Logger({
|
|
47
|
-
level: "WARN",
|
|
48
|
-
message: `Parameter Validation warrnings for partner > Payment > getPaymentconfig \n ${warrning}`,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const query_params = {};
|
|
53
|
-
|
|
54
|
-
const response = await PartnerAPIClient.execute(
|
|
55
|
-
this.config,
|
|
56
|
-
"get",
|
|
57
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payment/methods/configs`,
|
|
58
|
-
query_params,
|
|
59
|
-
undefined,
|
|
60
|
-
requestHeaders,
|
|
61
|
-
{ responseHeaders }
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
let responseData = response;
|
|
65
|
-
if (responseHeaders) {
|
|
66
|
-
responseData = response[0];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const {
|
|
70
|
-
error: res_error,
|
|
71
|
-
} = PaymentPartnerModel.PaymentConfigResponse().validate(responseData, {
|
|
72
|
-
abortEarly: false,
|
|
73
|
-
allowUnknown: true,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
if (res_error) {
|
|
77
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
78
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
79
|
-
} else {
|
|
80
|
-
Logger({
|
|
81
|
-
level: "WARN",
|
|
82
|
-
message: `Response Validation Warnings for partner > Payment > getPaymentconfig \n ${res_error}`,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return response;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @param {PaymentPartnerValidator.GetPayoutParam} arg - Arg object.
|
|
92
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
93
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
94
|
-
* @returns {Promise<PaymentPartnerModel.PayoutResponse>} - Success response
|
|
95
|
-
* @name getPayout
|
|
96
|
-
* @summary: Fetch payment gatewats.
|
|
97
|
-
* @description: Get partner Payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/getPayout/).
|
|
98
|
-
*/
|
|
99
|
-
async getPayout(
|
|
100
|
-
{ uniqueExternalId, requestHeaders } = { requestHeaders: {} },
|
|
101
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
102
|
-
) {
|
|
103
|
-
const { error } = PaymentPartnerValidator.getPayout().validate(
|
|
104
|
-
{
|
|
105
|
-
uniqueExternalId,
|
|
106
|
-
},
|
|
107
|
-
{ abortEarly: false, allowUnknown: true }
|
|
108
|
-
);
|
|
109
|
-
if (error) {
|
|
110
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Showing warrnings if extra unknown parameters are found
|
|
114
|
-
const { error: warrning } = PaymentPartnerValidator.getPayout().validate(
|
|
115
|
-
{
|
|
116
|
-
uniqueExternalId,
|
|
117
|
-
},
|
|
118
|
-
{ abortEarly: false, allowUnknown: false }
|
|
119
|
-
);
|
|
120
|
-
if (warrning) {
|
|
121
|
-
Logger({
|
|
122
|
-
level: "WARN",
|
|
123
|
-
message: `Parameter Validation warrnings for partner > Payment > getPayout \n ${warrning}`,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const query_params = {};
|
|
128
|
-
query_params["unique_external_id"] = uniqueExternalId;
|
|
129
|
-
|
|
130
|
-
const response = await PartnerAPIClient.execute(
|
|
131
|
-
this.config,
|
|
132
|
-
"get",
|
|
133
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts`,
|
|
134
|
-
query_params,
|
|
135
|
-
undefined,
|
|
136
|
-
requestHeaders,
|
|
137
|
-
{ responseHeaders }
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
let responseData = response;
|
|
141
|
-
if (responseHeaders) {
|
|
142
|
-
responseData = response[0];
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const {
|
|
146
|
-
error: res_error,
|
|
147
|
-
} = PaymentPartnerModel.PayoutResponse().validate(responseData, {
|
|
148
|
-
abortEarly: false,
|
|
149
|
-
allowUnknown: true,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
if (res_error) {
|
|
153
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
154
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
155
|
-
} else {
|
|
156
|
-
Logger({
|
|
157
|
-
level: "WARN",
|
|
158
|
-
message: `Response Validation Warnings for partner > Payment > getPayout \n ${res_error}`,
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return response;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @param {PaymentPartnerValidator.PostPayoutParam} arg - Arg object.
|
|
168
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
169
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
170
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
171
|
-
* @name postPayout
|
|
172
|
-
* @summary: save payout details.
|
|
173
|
-
* @description: save payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/postPayout/).
|
|
174
|
-
*/
|
|
175
|
-
async postPayout(
|
|
176
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
177
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
178
|
-
) {
|
|
179
|
-
const { error } = PaymentPartnerValidator.postPayout().validate(
|
|
180
|
-
{
|
|
181
|
-
body,
|
|
182
|
-
},
|
|
183
|
-
{ abortEarly: false, allowUnknown: true }
|
|
184
|
-
);
|
|
185
|
-
if (error) {
|
|
186
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// Showing warrnings if extra unknown parameters are found
|
|
190
|
-
const { error: warrning } = PaymentPartnerValidator.postPayout().validate(
|
|
191
|
-
{
|
|
192
|
-
body,
|
|
193
|
-
},
|
|
194
|
-
{ abortEarly: false, allowUnknown: false }
|
|
195
|
-
);
|
|
196
|
-
if (warrning) {
|
|
197
|
-
Logger({
|
|
198
|
-
level: "WARN",
|
|
199
|
-
message: `Parameter Validation warrnings for partner > Payment > postPayout \n ${warrning}`,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const query_params = {};
|
|
204
|
-
|
|
205
|
-
const response = await PartnerAPIClient.execute(
|
|
206
|
-
this.config,
|
|
207
|
-
"post",
|
|
208
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts`,
|
|
209
|
-
query_params,
|
|
210
|
-
body,
|
|
211
|
-
requestHeaders,
|
|
212
|
-
{ responseHeaders }
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
let responseData = response;
|
|
216
|
-
if (responseHeaders) {
|
|
217
|
-
responseData = response[0];
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const {
|
|
221
|
-
error: res_error,
|
|
222
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
223
|
-
abortEarly: false,
|
|
224
|
-
allowUnknown: true,
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
if (res_error) {
|
|
228
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
229
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
230
|
-
} else {
|
|
231
|
-
Logger({
|
|
232
|
-
level: "WARN",
|
|
233
|
-
message: `Response Validation Warnings for partner > Payment > postPayout \n ${res_error}`,
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
return response;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* @param {PaymentPartnerValidator.UpdatePayoutParam} arg - Arg object.
|
|
243
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
244
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
245
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
246
|
-
* @name updatePayout
|
|
247
|
-
* @summary: save payout details.
|
|
248
|
-
* @description: save payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/updatePayout/).
|
|
249
|
-
*/
|
|
250
|
-
async updatePayout(
|
|
251
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
252
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
253
|
-
) {
|
|
254
|
-
const { error } = PaymentPartnerValidator.updatePayout().validate(
|
|
255
|
-
{
|
|
256
|
-
body,
|
|
257
|
-
},
|
|
258
|
-
{ abortEarly: false, allowUnknown: true }
|
|
259
|
-
);
|
|
260
|
-
if (error) {
|
|
261
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// Showing warrnings if extra unknown parameters are found
|
|
265
|
-
const { error: warrning } = PaymentPartnerValidator.updatePayout().validate(
|
|
266
|
-
{
|
|
267
|
-
body,
|
|
268
|
-
},
|
|
269
|
-
{ abortEarly: false, allowUnknown: false }
|
|
270
|
-
);
|
|
271
|
-
if (warrning) {
|
|
272
|
-
Logger({
|
|
273
|
-
level: "WARN",
|
|
274
|
-
message: `Parameter Validation warrnings for partner > Payment > updatePayout \n ${warrning}`,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const query_params = {};
|
|
279
|
-
|
|
280
|
-
const response = await PartnerAPIClient.execute(
|
|
281
|
-
this.config,
|
|
282
|
-
"patch",
|
|
283
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts`,
|
|
284
|
-
query_params,
|
|
285
|
-
body,
|
|
286
|
-
requestHeaders,
|
|
287
|
-
{ responseHeaders }
|
|
288
|
-
);
|
|
289
|
-
|
|
290
|
-
let responseData = response;
|
|
291
|
-
if (responseHeaders) {
|
|
292
|
-
responseData = response[0];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
const {
|
|
296
|
-
error: res_error,
|
|
297
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
298
|
-
abortEarly: false,
|
|
299
|
-
allowUnknown: true,
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
if (res_error) {
|
|
303
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
304
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
305
|
-
} else {
|
|
306
|
-
Logger({
|
|
307
|
-
level: "WARN",
|
|
308
|
-
message: `Response Validation Warnings for partner > Payment > updatePayout \n ${res_error}`,
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return response;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* @param {PaymentPartnerValidator.PutPayoutParam} arg - Arg object.
|
|
318
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
319
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
320
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
321
|
-
* @name putPayout
|
|
322
|
-
* @summary: update payout details.
|
|
323
|
-
* @description: update payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/putPayout/).
|
|
324
|
-
*/
|
|
325
|
-
async putPayout(
|
|
326
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
327
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
328
|
-
) {
|
|
329
|
-
const { error } = PaymentPartnerValidator.putPayout().validate(
|
|
330
|
-
{
|
|
331
|
-
body,
|
|
332
|
-
},
|
|
333
|
-
{ abortEarly: false, allowUnknown: true }
|
|
334
|
-
);
|
|
335
|
-
if (error) {
|
|
336
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Showing warrnings if extra unknown parameters are found
|
|
340
|
-
const { error: warrning } = PaymentPartnerValidator.putPayout().validate(
|
|
341
|
-
{
|
|
342
|
-
body,
|
|
343
|
-
},
|
|
344
|
-
{ abortEarly: false, allowUnknown: false }
|
|
345
|
-
);
|
|
346
|
-
if (warrning) {
|
|
347
|
-
Logger({
|
|
348
|
-
level: "WARN",
|
|
349
|
-
message: `Parameter Validation warrnings for partner > Payment > putPayout \n ${warrning}`,
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
const query_params = {};
|
|
354
|
-
|
|
355
|
-
const response = await PartnerAPIClient.execute(
|
|
356
|
-
this.config,
|
|
357
|
-
"put",
|
|
358
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts`,
|
|
359
|
-
query_params,
|
|
360
|
-
body,
|
|
361
|
-
requestHeaders,
|
|
362
|
-
{ responseHeaders }
|
|
363
|
-
);
|
|
364
|
-
|
|
365
|
-
let responseData = response;
|
|
366
|
-
if (responseHeaders) {
|
|
367
|
-
responseData = response[0];
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
const {
|
|
371
|
-
error: res_error,
|
|
372
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
373
|
-
abortEarly: false,
|
|
374
|
-
allowUnknown: true,
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
if (res_error) {
|
|
378
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
379
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
380
|
-
} else {
|
|
381
|
-
Logger({
|
|
382
|
-
level: "WARN",
|
|
383
|
-
message: `Response Validation Warnings for partner > Payment > putPayout \n ${res_error}`,
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
return response;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* @param {PaymentPartnerValidator.DeletePayoutParam} arg - Arg object.
|
|
393
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
394
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
395
|
-
* @returns {Promise<PaymentPartnerModel.PayoutResponse>} - Success response
|
|
396
|
-
* @name deletePayout
|
|
397
|
-
* @summary: Fetch payment gatewats.
|
|
398
|
-
* @description: Get partner Payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/deletePayout/).
|
|
399
|
-
*/
|
|
400
|
-
async deletePayout(
|
|
401
|
-
{ uniqueExternalId, requestHeaders } = { requestHeaders: {} },
|
|
402
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
403
|
-
) {
|
|
404
|
-
const { error } = PaymentPartnerValidator.deletePayout().validate(
|
|
405
|
-
{
|
|
406
|
-
uniqueExternalId,
|
|
407
|
-
},
|
|
408
|
-
{ abortEarly: false, allowUnknown: true }
|
|
409
|
-
);
|
|
410
|
-
if (error) {
|
|
411
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
// Showing warrnings if extra unknown parameters are found
|
|
415
|
-
const { error: warrning } = PaymentPartnerValidator.deletePayout().validate(
|
|
416
|
-
{
|
|
417
|
-
uniqueExternalId,
|
|
418
|
-
},
|
|
419
|
-
{ abortEarly: false, allowUnknown: false }
|
|
420
|
-
);
|
|
421
|
-
if (warrning) {
|
|
422
|
-
Logger({
|
|
423
|
-
level: "WARN",
|
|
424
|
-
message: `Parameter Validation warrnings for partner > Payment > deletePayout \n ${warrning}`,
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
const query_params = {};
|
|
429
|
-
query_params["unique_external_id"] = uniqueExternalId;
|
|
430
|
-
|
|
431
|
-
const response = await PartnerAPIClient.execute(
|
|
432
|
-
this.config,
|
|
433
|
-
"delete",
|
|
434
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts`,
|
|
435
|
-
query_params,
|
|
436
|
-
undefined,
|
|
437
|
-
requestHeaders,
|
|
438
|
-
{ responseHeaders }
|
|
439
|
-
);
|
|
440
|
-
|
|
441
|
-
let responseData = response;
|
|
442
|
-
if (responseHeaders) {
|
|
443
|
-
responseData = response[0];
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
const {
|
|
447
|
-
error: res_error,
|
|
448
|
-
} = PaymentPartnerModel.PayoutResponse().validate(responseData, {
|
|
449
|
-
abortEarly: false,
|
|
450
|
-
allowUnknown: true,
|
|
451
|
-
});
|
|
452
|
-
|
|
453
|
-
if (res_error) {
|
|
454
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
455
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
456
|
-
} else {
|
|
457
|
-
Logger({
|
|
458
|
-
level: "WARN",
|
|
459
|
-
message: `Response Validation Warnings for partner > Payment > deletePayout \n ${res_error}`,
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
return response;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* @param {PaymentPartnerValidator.GetPayoutsParam} arg - Arg object.
|
|
469
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
470
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
471
|
-
* @returns {Promise<PaymentPartnerModel.PayoutResponse>} - Success response
|
|
472
|
-
* @name getPayouts
|
|
473
|
-
* @summary: Fetch payment gatewats.
|
|
474
|
-
* @description: Get partner Payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/getPayouts/).
|
|
475
|
-
*/
|
|
476
|
-
async getPayouts(
|
|
477
|
-
{ uniqueTransferNo, uniqueExternalId, requestHeaders } = {
|
|
478
|
-
requestHeaders: {},
|
|
479
|
-
},
|
|
480
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
481
|
-
) {
|
|
482
|
-
const { error } = PaymentPartnerValidator.getPayouts().validate(
|
|
483
|
-
{
|
|
484
|
-
uniqueTransferNo,
|
|
485
|
-
uniqueExternalId,
|
|
486
|
-
},
|
|
487
|
-
{ abortEarly: false, allowUnknown: true }
|
|
488
|
-
);
|
|
489
|
-
if (error) {
|
|
490
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// Showing warrnings if extra unknown parameters are found
|
|
494
|
-
const { error: warrning } = PaymentPartnerValidator.getPayouts().validate(
|
|
495
|
-
{
|
|
496
|
-
uniqueTransferNo,
|
|
497
|
-
uniqueExternalId,
|
|
498
|
-
},
|
|
499
|
-
{ abortEarly: false, allowUnknown: false }
|
|
500
|
-
);
|
|
501
|
-
if (warrning) {
|
|
502
|
-
Logger({
|
|
503
|
-
level: "WARN",
|
|
504
|
-
message: `Parameter Validation warrnings for partner > Payment > getPayouts \n ${warrning}`,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const query_params = {};
|
|
509
|
-
query_params["unique_external_id"] = uniqueExternalId;
|
|
510
|
-
|
|
511
|
-
const response = await PartnerAPIClient.execute(
|
|
512
|
-
this.config,
|
|
513
|
-
"get",
|
|
514
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts/${uniqueTransferNo}`,
|
|
515
|
-
query_params,
|
|
516
|
-
undefined,
|
|
517
|
-
requestHeaders,
|
|
518
|
-
{ responseHeaders }
|
|
519
|
-
);
|
|
520
|
-
|
|
521
|
-
let responseData = response;
|
|
522
|
-
if (responseHeaders) {
|
|
523
|
-
responseData = response[0];
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
const {
|
|
527
|
-
error: res_error,
|
|
528
|
-
} = PaymentPartnerModel.PayoutResponse().validate(responseData, {
|
|
529
|
-
abortEarly: false,
|
|
530
|
-
allowUnknown: true,
|
|
531
|
-
});
|
|
532
|
-
|
|
533
|
-
if (res_error) {
|
|
534
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
535
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
536
|
-
} else {
|
|
537
|
-
Logger({
|
|
538
|
-
level: "WARN",
|
|
539
|
-
message: `Response Validation Warnings for partner > Payment > getPayouts \n ${res_error}`,
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
return response;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* @param {PaymentPartnerValidator.PostPayoutsParam} arg - Arg object.
|
|
549
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
550
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
551
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
552
|
-
* @name postPayouts
|
|
553
|
-
* @summary: save payout details.
|
|
554
|
-
* @description: save payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/postPayouts/).
|
|
555
|
-
*/
|
|
556
|
-
async postPayouts(
|
|
557
|
-
{ uniqueTransferNo, body, requestHeaders } = { requestHeaders: {} },
|
|
558
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
559
|
-
) {
|
|
560
|
-
const { error } = PaymentPartnerValidator.postPayouts().validate(
|
|
561
|
-
{
|
|
562
|
-
uniqueTransferNo,
|
|
563
|
-
body,
|
|
564
|
-
},
|
|
565
|
-
{ abortEarly: false, allowUnknown: true }
|
|
566
|
-
);
|
|
567
|
-
if (error) {
|
|
568
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
// Showing warrnings if extra unknown parameters are found
|
|
572
|
-
const { error: warrning } = PaymentPartnerValidator.postPayouts().validate(
|
|
573
|
-
{
|
|
574
|
-
uniqueTransferNo,
|
|
575
|
-
body,
|
|
576
|
-
},
|
|
577
|
-
{ abortEarly: false, allowUnknown: false }
|
|
578
|
-
);
|
|
579
|
-
if (warrning) {
|
|
580
|
-
Logger({
|
|
581
|
-
level: "WARN",
|
|
582
|
-
message: `Parameter Validation warrnings for partner > Payment > postPayouts \n ${warrning}`,
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
const query_params = {};
|
|
587
|
-
|
|
588
|
-
const response = await PartnerAPIClient.execute(
|
|
589
|
-
this.config,
|
|
590
|
-
"post",
|
|
591
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts/${uniqueTransferNo}`,
|
|
592
|
-
query_params,
|
|
593
|
-
body,
|
|
594
|
-
requestHeaders,
|
|
595
|
-
{ responseHeaders }
|
|
596
|
-
);
|
|
597
|
-
|
|
598
|
-
let responseData = response;
|
|
599
|
-
if (responseHeaders) {
|
|
600
|
-
responseData = response[0];
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
const {
|
|
604
|
-
error: res_error,
|
|
605
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
606
|
-
abortEarly: false,
|
|
607
|
-
allowUnknown: true,
|
|
608
|
-
});
|
|
609
|
-
|
|
610
|
-
if (res_error) {
|
|
611
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
612
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
613
|
-
} else {
|
|
614
|
-
Logger({
|
|
615
|
-
level: "WARN",
|
|
616
|
-
message: `Response Validation Warnings for partner > Payment > postPayouts \n ${res_error}`,
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
return response;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* @param {PaymentPartnerValidator.UpdatePayoutsParam} arg - Arg object.
|
|
626
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
627
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
628
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
629
|
-
* @name updatePayouts
|
|
630
|
-
* @summary: save payout details.
|
|
631
|
-
* @description: save payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/updatePayouts/).
|
|
632
|
-
*/
|
|
633
|
-
async updatePayouts(
|
|
634
|
-
{ uniqueTransferNo, body, requestHeaders } = { requestHeaders: {} },
|
|
635
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
636
|
-
) {
|
|
637
|
-
const { error } = PaymentPartnerValidator.updatePayouts().validate(
|
|
638
|
-
{
|
|
639
|
-
uniqueTransferNo,
|
|
640
|
-
body,
|
|
641
|
-
},
|
|
642
|
-
{ abortEarly: false, allowUnknown: true }
|
|
643
|
-
);
|
|
644
|
-
if (error) {
|
|
645
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
// Showing warrnings if extra unknown parameters are found
|
|
649
|
-
const {
|
|
650
|
-
error: warrning,
|
|
651
|
-
} = PaymentPartnerValidator.updatePayouts().validate(
|
|
652
|
-
{
|
|
653
|
-
uniqueTransferNo,
|
|
654
|
-
body,
|
|
655
|
-
},
|
|
656
|
-
{ abortEarly: false, allowUnknown: false }
|
|
657
|
-
);
|
|
658
|
-
if (warrning) {
|
|
659
|
-
Logger({
|
|
660
|
-
level: "WARN",
|
|
661
|
-
message: `Parameter Validation warrnings for partner > Payment > updatePayouts \n ${warrning}`,
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
const query_params = {};
|
|
666
|
-
|
|
667
|
-
const response = await PartnerAPIClient.execute(
|
|
668
|
-
this.config,
|
|
669
|
-
"patch",
|
|
670
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts/${uniqueTransferNo}`,
|
|
671
|
-
query_params,
|
|
672
|
-
body,
|
|
673
|
-
requestHeaders,
|
|
674
|
-
{ responseHeaders }
|
|
675
|
-
);
|
|
676
|
-
|
|
677
|
-
let responseData = response;
|
|
678
|
-
if (responseHeaders) {
|
|
679
|
-
responseData = response[0];
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
const {
|
|
683
|
-
error: res_error,
|
|
684
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
685
|
-
abortEarly: false,
|
|
686
|
-
allowUnknown: true,
|
|
687
|
-
});
|
|
688
|
-
|
|
689
|
-
if (res_error) {
|
|
690
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
691
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
692
|
-
} else {
|
|
693
|
-
Logger({
|
|
694
|
-
level: "WARN",
|
|
695
|
-
message: `Response Validation Warnings for partner > Payment > updatePayouts \n ${res_error}`,
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
return response;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* @param {PaymentPartnerValidator.PutPayoutsParam} arg - Arg object.
|
|
705
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
706
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
707
|
-
* @returns {Promise<PaymentPartnerModel.PostPayoutResponse>} - Success response
|
|
708
|
-
* @name putPayouts
|
|
709
|
-
* @summary: update payout details.
|
|
710
|
-
* @description: update payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/putPayouts/).
|
|
711
|
-
*/
|
|
712
|
-
async putPayouts(
|
|
713
|
-
{ uniqueTransferNo, body, requestHeaders } = { requestHeaders: {} },
|
|
714
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
715
|
-
) {
|
|
716
|
-
const { error } = PaymentPartnerValidator.putPayouts().validate(
|
|
717
|
-
{
|
|
718
|
-
uniqueTransferNo,
|
|
719
|
-
body,
|
|
720
|
-
},
|
|
721
|
-
{ abortEarly: false, allowUnknown: true }
|
|
722
|
-
);
|
|
723
|
-
if (error) {
|
|
724
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// Showing warrnings if extra unknown parameters are found
|
|
728
|
-
const { error: warrning } = PaymentPartnerValidator.putPayouts().validate(
|
|
729
|
-
{
|
|
730
|
-
uniqueTransferNo,
|
|
731
|
-
body,
|
|
732
|
-
},
|
|
733
|
-
{ abortEarly: false, allowUnknown: false }
|
|
734
|
-
);
|
|
735
|
-
if (warrning) {
|
|
736
|
-
Logger({
|
|
737
|
-
level: "WARN",
|
|
738
|
-
message: `Parameter Validation warrnings for partner > Payment > putPayouts \n ${warrning}`,
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
const query_params = {};
|
|
743
|
-
|
|
744
|
-
const response = await PartnerAPIClient.execute(
|
|
745
|
-
this.config,
|
|
746
|
-
"put",
|
|
747
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts/${uniqueTransferNo}`,
|
|
748
|
-
query_params,
|
|
749
|
-
body,
|
|
750
|
-
requestHeaders,
|
|
751
|
-
{ responseHeaders }
|
|
752
|
-
);
|
|
753
|
-
|
|
754
|
-
let responseData = response;
|
|
755
|
-
if (responseHeaders) {
|
|
756
|
-
responseData = response[0];
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
const {
|
|
760
|
-
error: res_error,
|
|
761
|
-
} = PaymentPartnerModel.PostPayoutResponse().validate(responseData, {
|
|
762
|
-
abortEarly: false,
|
|
763
|
-
allowUnknown: true,
|
|
764
|
-
});
|
|
765
|
-
|
|
766
|
-
if (res_error) {
|
|
767
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
768
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
769
|
-
} else {
|
|
770
|
-
Logger({
|
|
771
|
-
level: "WARN",
|
|
772
|
-
message: `Response Validation Warnings for partner > Payment > putPayouts \n ${res_error}`,
|
|
773
|
-
});
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
return response;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* @param {PaymentPartnerValidator.DeletePayoutsParam} arg - Arg object.
|
|
782
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
783
|
-
* @param {import("../PartnerAPIClient").Options} - Options
|
|
784
|
-
* @returns {Promise<PaymentPartnerModel.PayoutResponse>} - Success response
|
|
785
|
-
* @name deletePayouts
|
|
786
|
-
* @summary: Fetch payment gatewats.
|
|
787
|
-
* @description: Get partner Payout details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/payment/deletePayouts/).
|
|
788
|
-
*/
|
|
789
|
-
async deletePayouts(
|
|
790
|
-
{ uniqueTransferNo, requestHeaders } = { requestHeaders: {} },
|
|
791
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
792
|
-
) {
|
|
793
|
-
const { error } = PaymentPartnerValidator.deletePayouts().validate(
|
|
794
|
-
{
|
|
795
|
-
uniqueTransferNo,
|
|
796
|
-
},
|
|
797
|
-
{ abortEarly: false, allowUnknown: true }
|
|
798
|
-
);
|
|
799
|
-
if (error) {
|
|
800
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
// Showing warrnings if extra unknown parameters are found
|
|
804
|
-
const {
|
|
805
|
-
error: warrning,
|
|
806
|
-
} = PaymentPartnerValidator.deletePayouts().validate(
|
|
807
|
-
{
|
|
808
|
-
uniqueTransferNo,
|
|
809
|
-
},
|
|
810
|
-
{ abortEarly: false, allowUnknown: false }
|
|
811
|
-
);
|
|
812
|
-
if (warrning) {
|
|
813
|
-
Logger({
|
|
814
|
-
level: "WARN",
|
|
815
|
-
message: `Parameter Validation warrnings for partner > Payment > deletePayouts \n ${warrning}`,
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
const query_params = {};
|
|
820
|
-
|
|
821
|
-
const response = await PartnerAPIClient.execute(
|
|
822
|
-
this.config,
|
|
823
|
-
"delete",
|
|
824
|
-
`/service/partner/payment/v1.0/organization/${this.config.organizationId}/payouts/${uniqueTransferNo}`,
|
|
825
|
-
query_params,
|
|
826
|
-
undefined,
|
|
827
|
-
requestHeaders,
|
|
828
|
-
{ responseHeaders }
|
|
829
|
-
);
|
|
830
|
-
|
|
831
|
-
let responseData = response;
|
|
832
|
-
if (responseHeaders) {
|
|
833
|
-
responseData = response[0];
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
const {
|
|
837
|
-
error: res_error,
|
|
838
|
-
} = PaymentPartnerModel.PayoutResponse().validate(responseData, {
|
|
839
|
-
abortEarly: false,
|
|
840
|
-
allowUnknown: true,
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
if (res_error) {
|
|
844
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
845
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
846
|
-
} else {
|
|
847
|
-
Logger({
|
|
848
|
-
level: "WARN",
|
|
849
|
-
message: `Response Validation Warnings for partner > Payment > deletePayouts \n ${res_error}`,
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
return response;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
module.exports = Payment;
|