@gofynd/fdk-client-javascript 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +557 -1279
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +14453 -17192
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3438 -4172
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3400 -5361
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +38 -38
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +100 -100
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +84 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +581 -581
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -13,13 +13,16 @@ class Payment {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @param {Object} arg - Arg object.
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
16
|
+
* @param {AddBeneficiaryDetailsOTPRequest} arg.body
|
|
17
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
18
|
+
* @summary: Save bank details for cancelled/returned order
|
|
19
|
+
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account.
|
|
19
20
|
*/
|
|
20
|
-
async
|
|
21
|
-
const { error } = PaymentValidator.
|
|
22
|
-
{
|
|
21
|
+
async addRefundBankAccountUsingOTP({ body } = {}) {
|
|
22
|
+
const { error } = PaymentValidator.addRefundBankAccountUsingOTP().validate(
|
|
23
|
+
{
|
|
24
|
+
body,
|
|
25
|
+
},
|
|
23
26
|
{ abortEarly: false, allowUnknown: true }
|
|
24
27
|
);
|
|
25
28
|
if (error) {
|
|
@@ -29,15 +32,17 @@ class Payment {
|
|
|
29
32
|
// Showing warrnings if extra unknown parameters are found
|
|
30
33
|
const {
|
|
31
34
|
error: warrning,
|
|
32
|
-
} = PaymentValidator.
|
|
33
|
-
{
|
|
35
|
+
} = PaymentValidator.addRefundBankAccountUsingOTP().validate(
|
|
36
|
+
{
|
|
37
|
+
body,
|
|
38
|
+
},
|
|
34
39
|
{ abortEarly: false, allowUnknown: false }
|
|
35
40
|
);
|
|
36
41
|
if (warrning) {
|
|
37
42
|
Logger({
|
|
38
43
|
level: "WARN",
|
|
39
44
|
message:
|
|
40
|
-
"Parameter Validation warrnings for
|
|
45
|
+
"Parameter Validation warrnings for addRefundBankAccountUsingOTP",
|
|
41
46
|
});
|
|
42
47
|
Logger({ level: "WARN", message: warrning });
|
|
43
48
|
}
|
|
@@ -46,15 +51,15 @@ class Payment {
|
|
|
46
51
|
|
|
47
52
|
const response = await PlatformAPIClient.execute(
|
|
48
53
|
this.config,
|
|
49
|
-
"
|
|
50
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
54
|
+
"post",
|
|
55
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
|
|
51
56
|
query_params,
|
|
52
|
-
|
|
57
|
+
body
|
|
53
58
|
);
|
|
54
59
|
|
|
55
60
|
const {
|
|
56
61
|
error: res_error,
|
|
57
|
-
} = PaymentModel.
|
|
62
|
+
} = PaymentModel.RefundAccountResponse().validate(response, {
|
|
58
63
|
abortEarly: false,
|
|
59
64
|
allowUnknown: false,
|
|
60
65
|
});
|
|
@@ -63,7 +68,7 @@ class Payment {
|
|
|
63
68
|
Logger({
|
|
64
69
|
level: "WARN",
|
|
65
70
|
message:
|
|
66
|
-
"Response Validation Warnnings for
|
|
71
|
+
"Response Validation Warnnings for addRefundBankAccountUsingOTP",
|
|
67
72
|
});
|
|
68
73
|
Logger({ level: "WARN", message: res_error });
|
|
69
74
|
}
|
|
@@ -73,13 +78,13 @@ class Payment {
|
|
|
73
78
|
|
|
74
79
|
/**
|
|
75
80
|
* @param {Object} arg - Arg object.
|
|
76
|
-
* @param {
|
|
77
|
-
* @returns {Promise<
|
|
78
|
-
* @summary:
|
|
79
|
-
* @description:
|
|
81
|
+
* @param {PaymentConfirmationRequest} arg.body
|
|
82
|
+
* @returns {Promise<PaymentConfirmationResponse>} - Success response
|
|
83
|
+
* @summary: Confirm payment after successful payment from payment gateway
|
|
84
|
+
* @description: Use this API to confirm payment after payment gateway accepted payment.
|
|
80
85
|
*/
|
|
81
|
-
async
|
|
82
|
-
const { error } = PaymentValidator.
|
|
86
|
+
async confirmPayment({ body } = {}) {
|
|
87
|
+
const { error } = PaymentValidator.confirmPayment().validate(
|
|
83
88
|
{
|
|
84
89
|
body,
|
|
85
90
|
},
|
|
@@ -90,9 +95,7 @@ class Payment {
|
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
// Showing warrnings if extra unknown parameters are found
|
|
93
|
-
const {
|
|
94
|
-
error: warrning,
|
|
95
|
-
} = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
98
|
+
const { error: warrning } = PaymentValidator.confirmPayment().validate(
|
|
96
99
|
{
|
|
97
100
|
body,
|
|
98
101
|
},
|
|
@@ -101,8 +104,7 @@ class Payment {
|
|
|
101
104
|
if (warrning) {
|
|
102
105
|
Logger({
|
|
103
106
|
level: "WARN",
|
|
104
|
-
message:
|
|
105
|
-
"Parameter Validation warrnings for saveBrandPaymentGatewayConfig",
|
|
107
|
+
message: "Parameter Validation warrnings for confirmPayment",
|
|
106
108
|
});
|
|
107
109
|
Logger({ level: "WARN", message: warrning });
|
|
108
110
|
}
|
|
@@ -112,14 +114,14 @@ class Payment {
|
|
|
112
114
|
const response = await PlatformAPIClient.execute(
|
|
113
115
|
this.config,
|
|
114
116
|
"post",
|
|
115
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
117
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/confirm`,
|
|
116
118
|
query_params,
|
|
117
119
|
body
|
|
118
120
|
);
|
|
119
121
|
|
|
120
122
|
const {
|
|
121
123
|
error: res_error,
|
|
122
|
-
} = PaymentModel.
|
|
124
|
+
} = PaymentModel.PaymentConfirmationResponse().validate(response, {
|
|
123
125
|
abortEarly: false,
|
|
124
126
|
allowUnknown: false,
|
|
125
127
|
});
|
|
@@ -127,8 +129,7 @@ class Payment {
|
|
|
127
129
|
if (res_error) {
|
|
128
130
|
Logger({
|
|
129
131
|
level: "WARN",
|
|
130
|
-
message:
|
|
131
|
-
"Response Validation Warnnings for saveBrandPaymentGatewayConfig",
|
|
132
|
+
message: "Response Validation Warnnings for confirmPayment",
|
|
132
133
|
});
|
|
133
134
|
Logger({ level: "WARN", message: res_error });
|
|
134
135
|
}
|
|
@@ -138,17 +139,17 @@ class Payment {
|
|
|
138
139
|
|
|
139
140
|
/**
|
|
140
141
|
* @param {Object} arg - Arg object.
|
|
141
|
-
* @param {
|
|
142
|
-
* @
|
|
143
|
-
* @
|
|
144
|
-
* @
|
|
142
|
+
* @param {string} arg.orderId -
|
|
143
|
+
* @param {string} [arg.requestHash] -
|
|
144
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
145
|
+
* @summary: Get bank details
|
|
146
|
+
* @description: Use this API to get saved bank details for returned/cancelled order using order id.
|
|
145
147
|
*/
|
|
146
|
-
async
|
|
147
|
-
const {
|
|
148
|
-
error,
|
|
149
|
-
} = PaymentValidator.updateBrandPaymentGatewayConfig().validate(
|
|
148
|
+
async getBankAccountDetailsOpenAPI({ orderId, requestHash } = {}) {
|
|
149
|
+
const { error } = PaymentValidator.getBankAccountDetailsOpenAPI().validate(
|
|
150
150
|
{
|
|
151
|
-
|
|
151
|
+
orderId,
|
|
152
|
+
requestHash,
|
|
152
153
|
},
|
|
153
154
|
{ abortEarly: false, allowUnknown: true }
|
|
154
155
|
);
|
|
@@ -159,9 +160,10 @@ class Payment {
|
|
|
159
160
|
// Showing warrnings if extra unknown parameters are found
|
|
160
161
|
const {
|
|
161
162
|
error: warrning,
|
|
162
|
-
} = PaymentValidator.
|
|
163
|
+
} = PaymentValidator.getBankAccountDetailsOpenAPI().validate(
|
|
163
164
|
{
|
|
164
|
-
|
|
165
|
+
orderId,
|
|
166
|
+
requestHash,
|
|
165
167
|
},
|
|
166
168
|
{ abortEarly: false, allowUnknown: false }
|
|
167
169
|
);
|
|
@@ -169,24 +171,26 @@ class Payment {
|
|
|
169
171
|
Logger({
|
|
170
172
|
level: "WARN",
|
|
171
173
|
message:
|
|
172
|
-
"Parameter Validation warrnings for
|
|
174
|
+
"Parameter Validation warrnings for getBankAccountDetailsOpenAPI",
|
|
173
175
|
});
|
|
174
176
|
Logger({ level: "WARN", message: warrning });
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
const query_params = {};
|
|
180
|
+
query_params["order_id"] = orderId;
|
|
181
|
+
query_params["request_hash"] = requestHash;
|
|
178
182
|
|
|
179
183
|
const response = await PlatformAPIClient.execute(
|
|
180
184
|
this.config,
|
|
181
|
-
"
|
|
182
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
185
|
+
"get",
|
|
186
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
|
|
183
187
|
query_params,
|
|
184
|
-
|
|
188
|
+
undefined
|
|
185
189
|
);
|
|
186
190
|
|
|
187
191
|
const {
|
|
188
192
|
error: res_error,
|
|
189
|
-
} = PaymentModel.
|
|
193
|
+
} = PaymentModel.RefundAccountResponse().validate(response, {
|
|
190
194
|
abortEarly: false,
|
|
191
195
|
allowUnknown: false,
|
|
192
196
|
});
|
|
@@ -195,7 +199,7 @@ class Payment {
|
|
|
195
199
|
Logger({
|
|
196
200
|
level: "WARN",
|
|
197
201
|
message:
|
|
198
|
-
"Response Validation Warnnings for
|
|
202
|
+
"Response Validation Warnnings for getBankAccountDetailsOpenAPI",
|
|
199
203
|
});
|
|
200
204
|
Logger({ level: "WARN", message: res_error });
|
|
201
205
|
}
|
|
@@ -205,18 +209,13 @@ class Payment {
|
|
|
205
209
|
|
|
206
210
|
/**
|
|
207
211
|
* @param {Object} arg - Arg object.
|
|
208
|
-
* @
|
|
209
|
-
* @
|
|
210
|
-
* @
|
|
211
|
-
* @summary: Get All Valid Payment Options
|
|
212
|
-
* @description: Use this API to get Get All Valid Payment Options for making payment
|
|
212
|
+
* @returns {Promise<PaymentGatewayConfigResponse>} - Success response
|
|
213
|
+
* @summary: Get All Brand Payment Gateway Config Secret
|
|
214
|
+
* @description: Get All Brand Payment Gateway Config Secret
|
|
213
215
|
*/
|
|
214
|
-
async
|
|
215
|
-
const { error } = PaymentValidator.
|
|
216
|
-
{
|
|
217
|
-
refresh,
|
|
218
|
-
requestType,
|
|
219
|
-
},
|
|
216
|
+
async getBrandPaymentGatewayConfig({} = {}) {
|
|
217
|
+
const { error } = PaymentValidator.getBrandPaymentGatewayConfig().validate(
|
|
218
|
+
{},
|
|
220
219
|
{ abortEarly: false, allowUnknown: true }
|
|
221
220
|
);
|
|
222
221
|
if (error) {
|
|
@@ -226,36 +225,32 @@ class Payment {
|
|
|
226
225
|
// Showing warrnings if extra unknown parameters are found
|
|
227
226
|
const {
|
|
228
227
|
error: warrning,
|
|
229
|
-
} = PaymentValidator.
|
|
230
|
-
{
|
|
231
|
-
refresh,
|
|
232
|
-
requestType,
|
|
233
|
-
},
|
|
228
|
+
} = PaymentValidator.getBrandPaymentGatewayConfig().validate(
|
|
229
|
+
{},
|
|
234
230
|
{ abortEarly: false, allowUnknown: false }
|
|
235
231
|
);
|
|
236
232
|
if (warrning) {
|
|
237
233
|
Logger({
|
|
238
234
|
level: "WARN",
|
|
239
|
-
message:
|
|
235
|
+
message:
|
|
236
|
+
"Parameter Validation warrnings for getBrandPaymentGatewayConfig",
|
|
240
237
|
});
|
|
241
238
|
Logger({ level: "WARN", message: warrning });
|
|
242
239
|
}
|
|
243
240
|
|
|
244
241
|
const query_params = {};
|
|
245
|
-
query_params["refresh"] = refresh;
|
|
246
|
-
query_params["request_type"] = requestType;
|
|
247
242
|
|
|
248
243
|
const response = await PlatformAPIClient.execute(
|
|
249
244
|
this.config,
|
|
250
245
|
"get",
|
|
251
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
246
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
252
247
|
query_params,
|
|
253
248
|
undefined
|
|
254
249
|
);
|
|
255
250
|
|
|
256
251
|
const {
|
|
257
252
|
error: res_error,
|
|
258
|
-
} = PaymentModel.
|
|
253
|
+
} = PaymentModel.PaymentGatewayConfigResponse().validate(response, {
|
|
259
254
|
abortEarly: false,
|
|
260
255
|
allowUnknown: false,
|
|
261
256
|
});
|
|
@@ -263,7 +258,8 @@ class Payment {
|
|
|
263
258
|
if (res_error) {
|
|
264
259
|
Logger({
|
|
265
260
|
level: "WARN",
|
|
266
|
-
message:
|
|
261
|
+
message:
|
|
262
|
+
"Response Validation Warnnings for getBrandPaymentGatewayConfig",
|
|
267
263
|
});
|
|
268
264
|
Logger({ level: "WARN", message: res_error });
|
|
269
265
|
}
|
|
@@ -273,17 +269,17 @@ class Payment {
|
|
|
273
269
|
|
|
274
270
|
/**
|
|
275
271
|
* @param {Object} arg - Arg object.
|
|
276
|
-
* @param {
|
|
277
|
-
* @param {string}
|
|
278
|
-
* @returns {Promise<
|
|
279
|
-
* @summary: Get
|
|
280
|
-
* @description: Use this API to get
|
|
272
|
+
* @param {boolean} arg.refresh -
|
|
273
|
+
* @param {string} arg.requestType -
|
|
274
|
+
* @returns {Promise<PaymentOptionsResponse>} - Success response
|
|
275
|
+
* @summary: Get All Valid Payment Options
|
|
276
|
+
* @description: Use this API to get Get All Valid Payment Options for making payment
|
|
281
277
|
*/
|
|
282
|
-
async
|
|
283
|
-
const { error } = PaymentValidator.
|
|
278
|
+
async getPaymentModeRoutes({ refresh, requestType } = {}) {
|
|
279
|
+
const { error } = PaymentValidator.getPaymentModeRoutes().validate(
|
|
284
280
|
{
|
|
285
|
-
|
|
286
|
-
|
|
281
|
+
refresh,
|
|
282
|
+
requestType,
|
|
287
283
|
},
|
|
288
284
|
{ abortEarly: false, allowUnknown: true }
|
|
289
285
|
);
|
|
@@ -294,37 +290,36 @@ class Payment {
|
|
|
294
290
|
// Showing warrnings if extra unknown parameters are found
|
|
295
291
|
const {
|
|
296
292
|
error: warrning,
|
|
297
|
-
} = PaymentValidator.
|
|
293
|
+
} = PaymentValidator.getPaymentModeRoutes().validate(
|
|
298
294
|
{
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
refresh,
|
|
296
|
+
requestType,
|
|
301
297
|
},
|
|
302
298
|
{ abortEarly: false, allowUnknown: false }
|
|
303
299
|
);
|
|
304
300
|
if (warrning) {
|
|
305
301
|
Logger({
|
|
306
302
|
level: "WARN",
|
|
307
|
-
message:
|
|
308
|
-
"Parameter Validation warrnings for getBankAccountDetailsOpenAPI",
|
|
303
|
+
message: "Parameter Validation warrnings for getPaymentModeRoutes",
|
|
309
304
|
});
|
|
310
305
|
Logger({ level: "WARN", message: warrning });
|
|
311
306
|
}
|
|
312
307
|
|
|
313
308
|
const query_params = {};
|
|
314
|
-
query_params["
|
|
315
|
-
query_params["
|
|
309
|
+
query_params["refresh"] = refresh;
|
|
310
|
+
query_params["request_type"] = requestType;
|
|
316
311
|
|
|
317
312
|
const response = await PlatformAPIClient.execute(
|
|
318
313
|
this.config,
|
|
319
314
|
"get",
|
|
320
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
315
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options`,
|
|
321
316
|
query_params,
|
|
322
317
|
undefined
|
|
323
318
|
);
|
|
324
319
|
|
|
325
320
|
const {
|
|
326
321
|
error: res_error,
|
|
327
|
-
} = PaymentModel.
|
|
322
|
+
} = PaymentModel.PaymentOptionsResponse().validate(response, {
|
|
328
323
|
abortEarly: false,
|
|
329
324
|
allowUnknown: false,
|
|
330
325
|
});
|
|
@@ -332,8 +327,7 @@ class Payment {
|
|
|
332
327
|
if (res_error) {
|
|
333
328
|
Logger({
|
|
334
329
|
level: "WARN",
|
|
335
|
-
message:
|
|
336
|
-
"Response Validation Warnnings for getBankAccountDetailsOpenAPI",
|
|
330
|
+
message: "Response Validation Warnnings for getPaymentModeRoutes",
|
|
337
331
|
});
|
|
338
332
|
Logger({ level: "WARN", message: res_error });
|
|
339
333
|
}
|
|
@@ -343,15 +337,15 @@ class Payment {
|
|
|
343
337
|
|
|
344
338
|
/**
|
|
345
339
|
* @param {Object} arg - Arg object.
|
|
346
|
-
* @param {
|
|
347
|
-
* @returns {Promise<
|
|
348
|
-
* @summary:
|
|
349
|
-
* @description:
|
|
340
|
+
* @param {string} arg.orderId -
|
|
341
|
+
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
342
|
+
* @summary: List User Beneficiary
|
|
343
|
+
* @description: Get all active beneficiary details added by the user for refund
|
|
350
344
|
*/
|
|
351
|
-
async
|
|
352
|
-
const { error } = PaymentValidator.
|
|
345
|
+
async getUserBeneficiaries({ orderId } = {}) {
|
|
346
|
+
const { error } = PaymentValidator.getUserBeneficiaries().validate(
|
|
353
347
|
{
|
|
354
|
-
|
|
348
|
+
orderId,
|
|
355
349
|
},
|
|
356
350
|
{ abortEarly: false, allowUnknown: true }
|
|
357
351
|
);
|
|
@@ -362,34 +356,34 @@ class Payment {
|
|
|
362
356
|
// Showing warrnings if extra unknown parameters are found
|
|
363
357
|
const {
|
|
364
358
|
error: warrning,
|
|
365
|
-
} = PaymentValidator.
|
|
359
|
+
} = PaymentValidator.getUserBeneficiaries().validate(
|
|
366
360
|
{
|
|
367
|
-
|
|
361
|
+
orderId,
|
|
368
362
|
},
|
|
369
363
|
{ abortEarly: false, allowUnknown: false }
|
|
370
364
|
);
|
|
371
365
|
if (warrning) {
|
|
372
366
|
Logger({
|
|
373
367
|
level: "WARN",
|
|
374
|
-
message:
|
|
375
|
-
"Parameter Validation warrnings for addRefundBankAccountUsingOTP",
|
|
368
|
+
message: "Parameter Validation warrnings for getUserBeneficiaries",
|
|
376
369
|
});
|
|
377
370
|
Logger({ level: "WARN", message: warrning });
|
|
378
371
|
}
|
|
379
372
|
|
|
380
373
|
const query_params = {};
|
|
374
|
+
query_params["order_id"] = orderId;
|
|
381
375
|
|
|
382
376
|
const response = await PlatformAPIClient.execute(
|
|
383
377
|
this.config,
|
|
384
|
-
"
|
|
385
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/
|
|
378
|
+
"get",
|
|
379
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/user`,
|
|
386
380
|
query_params,
|
|
387
|
-
|
|
381
|
+
undefined
|
|
388
382
|
);
|
|
389
383
|
|
|
390
384
|
const {
|
|
391
385
|
error: res_error,
|
|
392
|
-
} = PaymentModel.
|
|
386
|
+
} = PaymentModel.OrderBeneficiaryResponse().validate(response, {
|
|
393
387
|
abortEarly: false,
|
|
394
388
|
allowUnknown: false,
|
|
395
389
|
});
|
|
@@ -397,8 +391,7 @@ class Payment {
|
|
|
397
391
|
if (res_error) {
|
|
398
392
|
Logger({
|
|
399
393
|
level: "WARN",
|
|
400
|
-
message:
|
|
401
|
-
"Response Validation Warnnings for addRefundBankAccountUsingOTP",
|
|
394
|
+
message: "Response Validation Warnnings for getUserBeneficiaries",
|
|
402
395
|
});
|
|
403
396
|
Logger({ level: "WARN", message: res_error });
|
|
404
397
|
}
|
|
@@ -408,15 +401,17 @@ class Payment {
|
|
|
408
401
|
|
|
409
402
|
/**
|
|
410
403
|
* @param {Object} arg - Arg object.
|
|
411
|
-
* @param {string} arg.
|
|
412
|
-
* @
|
|
413
|
-
* @
|
|
414
|
-
* @
|
|
404
|
+
* @param {string} arg.merchantUserId -
|
|
405
|
+
* @param {string} arg.mobileNo -
|
|
406
|
+
* @returns {Promise<GetUserCODLimitResponse>} - Success response
|
|
407
|
+
* @summary: Get COD limit for user
|
|
408
|
+
* @description: Use this API to get user cod limit and reamining limit for the payment
|
|
415
409
|
*/
|
|
416
|
-
async
|
|
417
|
-
const { error } = PaymentValidator.
|
|
410
|
+
async getUserCODlimitRoutes({ merchantUserId, mobileNo } = {}) {
|
|
411
|
+
const { error } = PaymentValidator.getUserCODlimitRoutes().validate(
|
|
418
412
|
{
|
|
419
|
-
|
|
413
|
+
merchantUserId,
|
|
414
|
+
mobileNo,
|
|
420
415
|
},
|
|
421
416
|
{ abortEarly: false, allowUnknown: true }
|
|
422
417
|
);
|
|
@@ -427,34 +422,36 @@ class Payment {
|
|
|
427
422
|
// Showing warrnings if extra unknown parameters are found
|
|
428
423
|
const {
|
|
429
424
|
error: warrning,
|
|
430
|
-
} = PaymentValidator.
|
|
425
|
+
} = PaymentValidator.getUserCODlimitRoutes().validate(
|
|
431
426
|
{
|
|
432
|
-
|
|
427
|
+
merchantUserId,
|
|
428
|
+
mobileNo,
|
|
433
429
|
},
|
|
434
430
|
{ abortEarly: false, allowUnknown: false }
|
|
435
431
|
);
|
|
436
432
|
if (warrning) {
|
|
437
433
|
Logger({
|
|
438
434
|
level: "WARN",
|
|
439
|
-
message: "Parameter Validation warrnings for
|
|
435
|
+
message: "Parameter Validation warrnings for getUserCODlimitRoutes",
|
|
440
436
|
});
|
|
441
437
|
Logger({ level: "WARN", message: warrning });
|
|
442
438
|
}
|
|
443
439
|
|
|
444
440
|
const query_params = {};
|
|
445
|
-
query_params["
|
|
441
|
+
query_params["merchant_user_id"] = merchantUserId;
|
|
442
|
+
query_params["mobile_no"] = mobileNo;
|
|
446
443
|
|
|
447
444
|
const response = await PlatformAPIClient.execute(
|
|
448
445
|
this.config,
|
|
449
446
|
"get",
|
|
450
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
447
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
|
|
451
448
|
query_params,
|
|
452
449
|
undefined
|
|
453
450
|
);
|
|
454
451
|
|
|
455
452
|
const {
|
|
456
453
|
error: res_error,
|
|
457
|
-
} = PaymentModel.
|
|
454
|
+
} = PaymentModel.GetUserCODLimitResponse().validate(response, {
|
|
458
455
|
abortEarly: false,
|
|
459
456
|
allowUnknown: false,
|
|
460
457
|
});
|
|
@@ -462,7 +459,7 @@ class Payment {
|
|
|
462
459
|
if (res_error) {
|
|
463
460
|
Logger({
|
|
464
461
|
level: "WARN",
|
|
465
|
-
message: "Response Validation Warnnings for
|
|
462
|
+
message: "Response Validation Warnnings for getUserCODlimitRoutes",
|
|
466
463
|
});
|
|
467
464
|
Logger({ level: "WARN", message: res_error });
|
|
468
465
|
}
|
|
@@ -474,11 +471,11 @@ class Payment {
|
|
|
474
471
|
* @param {Object} arg - Arg object.
|
|
475
472
|
* @param {string} arg.orderId -
|
|
476
473
|
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
477
|
-
* @summary: List
|
|
474
|
+
* @summary: List Order Beneficiary
|
|
478
475
|
* @description: Get all active beneficiary details added by the user for refund
|
|
479
476
|
*/
|
|
480
|
-
async
|
|
481
|
-
const { error } = PaymentValidator.
|
|
477
|
+
async getUserOrderBeneficiaries({ orderId } = {}) {
|
|
478
|
+
const { error } = PaymentValidator.getUserOrderBeneficiaries().validate(
|
|
482
479
|
{
|
|
483
480
|
orderId,
|
|
484
481
|
},
|
|
@@ -491,7 +488,7 @@ class Payment {
|
|
|
491
488
|
// Showing warrnings if extra unknown parameters are found
|
|
492
489
|
const {
|
|
493
490
|
error: warrning,
|
|
494
|
-
} = PaymentValidator.
|
|
491
|
+
} = PaymentValidator.getUserOrderBeneficiaries().validate(
|
|
495
492
|
{
|
|
496
493
|
orderId,
|
|
497
494
|
},
|
|
@@ -500,7 +497,7 @@ class Payment {
|
|
|
500
497
|
if (warrning) {
|
|
501
498
|
Logger({
|
|
502
499
|
level: "WARN",
|
|
503
|
-
message: "Parameter Validation warrnings for
|
|
500
|
+
message: "Parameter Validation warrnings for getUserOrderBeneficiaries",
|
|
504
501
|
});
|
|
505
502
|
Logger({ level: "WARN", message: warrning });
|
|
506
503
|
}
|
|
@@ -511,7 +508,7 @@ class Payment {
|
|
|
511
508
|
const response = await PlatformAPIClient.execute(
|
|
512
509
|
this.config,
|
|
513
510
|
"get",
|
|
514
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/
|
|
511
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/order`,
|
|
515
512
|
query_params,
|
|
516
513
|
undefined
|
|
517
514
|
);
|
|
@@ -526,7 +523,7 @@ class Payment {
|
|
|
526
523
|
if (res_error) {
|
|
527
524
|
Logger({
|
|
528
525
|
level: "WARN",
|
|
529
|
-
message: "Response Validation Warnnings for
|
|
526
|
+
message: "Response Validation Warnnings for getUserOrderBeneficiaries",
|
|
530
527
|
});
|
|
531
528
|
Logger({ level: "WARN", message: res_error });
|
|
532
529
|
}
|
|
@@ -536,13 +533,13 @@ class Payment {
|
|
|
536
533
|
|
|
537
534
|
/**
|
|
538
535
|
* @param {Object} arg - Arg object.
|
|
539
|
-
* @param {
|
|
540
|
-
* @returns {Promise<
|
|
541
|
-
* @summary:
|
|
542
|
-
* @description:
|
|
536
|
+
* @param {PaymentGatewayConfigRequest} arg.body
|
|
537
|
+
* @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
|
|
538
|
+
* @summary: Save Config Secret For Brand Payment Gateway
|
|
539
|
+
* @description: Save Config Secret For Brand Payment Gateway
|
|
543
540
|
*/
|
|
544
|
-
async
|
|
545
|
-
const { error } = PaymentValidator.
|
|
541
|
+
async saveBrandPaymentGatewayConfig({ body } = {}) {
|
|
542
|
+
const { error } = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
546
543
|
{
|
|
547
544
|
body,
|
|
548
545
|
},
|
|
@@ -553,7 +550,9 @@ class Payment {
|
|
|
553
550
|
}
|
|
554
551
|
|
|
555
552
|
// Showing warrnings if extra unknown parameters are found
|
|
556
|
-
const {
|
|
553
|
+
const {
|
|
554
|
+
error: warrning,
|
|
555
|
+
} = PaymentValidator.saveBrandPaymentGatewayConfig().validate(
|
|
557
556
|
{
|
|
558
557
|
body,
|
|
559
558
|
},
|
|
@@ -562,7 +561,8 @@ class Payment {
|
|
|
562
561
|
if (warrning) {
|
|
563
562
|
Logger({
|
|
564
563
|
level: "WARN",
|
|
565
|
-
message:
|
|
564
|
+
message:
|
|
565
|
+
"Parameter Validation warrnings for saveBrandPaymentGatewayConfig",
|
|
566
566
|
});
|
|
567
567
|
Logger({ level: "WARN", message: warrning });
|
|
568
568
|
}
|
|
@@ -572,14 +572,14 @@ class Payment {
|
|
|
572
572
|
const response = await PlatformAPIClient.execute(
|
|
573
573
|
this.config,
|
|
574
574
|
"post",
|
|
575
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
575
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
576
576
|
query_params,
|
|
577
577
|
body
|
|
578
578
|
);
|
|
579
579
|
|
|
580
580
|
const {
|
|
581
581
|
error: res_error,
|
|
582
|
-
} = PaymentModel.
|
|
582
|
+
} = PaymentModel.PaymentGatewayToBeReviewed().validate(response, {
|
|
583
583
|
abortEarly: false,
|
|
584
584
|
allowUnknown: false,
|
|
585
585
|
});
|
|
@@ -587,7 +587,8 @@ class Payment {
|
|
|
587
587
|
if (res_error) {
|
|
588
588
|
Logger({
|
|
589
589
|
level: "WARN",
|
|
590
|
-
message:
|
|
590
|
+
message:
|
|
591
|
+
"Response Validation Warnnings for saveBrandPaymentGatewayConfig",
|
|
591
592
|
});
|
|
592
593
|
Logger({ level: "WARN", message: res_error });
|
|
593
594
|
}
|
|
@@ -597,17 +598,15 @@ class Payment {
|
|
|
597
598
|
|
|
598
599
|
/**
|
|
599
600
|
* @param {Object} arg - Arg object.
|
|
600
|
-
* @param {
|
|
601
|
-
* @
|
|
602
|
-
* @
|
|
603
|
-
* @
|
|
604
|
-
* @description: Use this API to get user cod limit and reamining limit for the payment
|
|
601
|
+
* @param {SetCODForUserRequest} arg.body
|
|
602
|
+
* @returns {Promise<SetCODOptionResponse>} - Success response
|
|
603
|
+
* @summary: Set COD option for user for payment
|
|
604
|
+
* @description: Use this API to set cod option as true or false for the payment
|
|
605
605
|
*/
|
|
606
|
-
async
|
|
607
|
-
const { error } = PaymentValidator.
|
|
606
|
+
async setUserCODlimitRoutes({ body } = {}) {
|
|
607
|
+
const { error } = PaymentValidator.setUserCODlimitRoutes().validate(
|
|
608
608
|
{
|
|
609
|
-
|
|
610
|
-
mobileNo,
|
|
609
|
+
body,
|
|
611
610
|
},
|
|
612
611
|
{ abortEarly: false, allowUnknown: true }
|
|
613
612
|
);
|
|
@@ -618,36 +617,33 @@ class Payment {
|
|
|
618
617
|
// Showing warrnings if extra unknown parameters are found
|
|
619
618
|
const {
|
|
620
619
|
error: warrning,
|
|
621
|
-
} = PaymentValidator.
|
|
620
|
+
} = PaymentValidator.setUserCODlimitRoutes().validate(
|
|
622
621
|
{
|
|
623
|
-
|
|
624
|
-
mobileNo,
|
|
622
|
+
body,
|
|
625
623
|
},
|
|
626
624
|
{ abortEarly: false, allowUnknown: false }
|
|
627
625
|
);
|
|
628
626
|
if (warrning) {
|
|
629
627
|
Logger({
|
|
630
628
|
level: "WARN",
|
|
631
|
-
message: "Parameter Validation warrnings for
|
|
629
|
+
message: "Parameter Validation warrnings for setUserCODlimitRoutes",
|
|
632
630
|
});
|
|
633
631
|
Logger({ level: "WARN", message: warrning });
|
|
634
632
|
}
|
|
635
633
|
|
|
636
634
|
const query_params = {};
|
|
637
|
-
query_params["merchant_user_id"] = merchantUserId;
|
|
638
|
-
query_params["mobile_no"] = mobileNo;
|
|
639
635
|
|
|
640
636
|
const response = await PlatformAPIClient.execute(
|
|
641
637
|
this.config,
|
|
642
|
-
"
|
|
638
|
+
"put",
|
|
643
639
|
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
|
|
644
640
|
query_params,
|
|
645
|
-
|
|
641
|
+
body
|
|
646
642
|
);
|
|
647
643
|
|
|
648
644
|
const {
|
|
649
645
|
error: res_error,
|
|
650
|
-
} = PaymentModel.
|
|
646
|
+
} = PaymentModel.SetCODOptionResponse().validate(response, {
|
|
651
647
|
abortEarly: false,
|
|
652
648
|
allowUnknown: false,
|
|
653
649
|
});
|
|
@@ -655,7 +651,7 @@ class Payment {
|
|
|
655
651
|
if (res_error) {
|
|
656
652
|
Logger({
|
|
657
653
|
level: "WARN",
|
|
658
|
-
message: "Response Validation Warnnings for
|
|
654
|
+
message: "Response Validation Warnnings for setUserCODlimitRoutes",
|
|
659
655
|
});
|
|
660
656
|
Logger({ level: "WARN", message: res_error });
|
|
661
657
|
}
|
|
@@ -665,13 +661,15 @@ class Payment {
|
|
|
665
661
|
|
|
666
662
|
/**
|
|
667
663
|
* @param {Object} arg - Arg object.
|
|
668
|
-
* @param {
|
|
669
|
-
* @returns {Promise<
|
|
670
|
-
* @summary:
|
|
671
|
-
* @description:
|
|
664
|
+
* @param {PaymentGatewayConfigRequest} arg.body
|
|
665
|
+
* @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
|
|
666
|
+
* @summary: Save Config Secret For Brand Payment Gateway
|
|
667
|
+
* @description: Save Config Secret For Brand Payment Gateway
|
|
672
668
|
*/
|
|
673
|
-
async
|
|
674
|
-
const {
|
|
669
|
+
async updateBrandPaymentGatewayConfig({ body } = {}) {
|
|
670
|
+
const {
|
|
671
|
+
error,
|
|
672
|
+
} = PaymentValidator.updateBrandPaymentGatewayConfig().validate(
|
|
675
673
|
{
|
|
676
674
|
body,
|
|
677
675
|
},
|
|
@@ -684,7 +682,7 @@ class Payment {
|
|
|
684
682
|
// Showing warrnings if extra unknown parameters are found
|
|
685
683
|
const {
|
|
686
684
|
error: warrning,
|
|
687
|
-
} = PaymentValidator.
|
|
685
|
+
} = PaymentValidator.updateBrandPaymentGatewayConfig().validate(
|
|
688
686
|
{
|
|
689
687
|
body,
|
|
690
688
|
},
|
|
@@ -693,7 +691,8 @@ class Payment {
|
|
|
693
691
|
if (warrning) {
|
|
694
692
|
Logger({
|
|
695
693
|
level: "WARN",
|
|
696
|
-
message:
|
|
694
|
+
message:
|
|
695
|
+
"Parameter Validation warrnings for updateBrandPaymentGatewayConfig",
|
|
697
696
|
});
|
|
698
697
|
Logger({ level: "WARN", message: warrning });
|
|
699
698
|
}
|
|
@@ -703,14 +702,14 @@ class Payment {
|
|
|
703
702
|
const response = await PlatformAPIClient.execute(
|
|
704
703
|
this.config,
|
|
705
704
|
"put",
|
|
706
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
705
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
|
|
707
706
|
query_params,
|
|
708
707
|
body
|
|
709
708
|
);
|
|
710
709
|
|
|
711
710
|
const {
|
|
712
711
|
error: res_error,
|
|
713
|
-
} = PaymentModel.
|
|
712
|
+
} = PaymentModel.PaymentGatewayToBeReviewed().validate(response, {
|
|
714
713
|
abortEarly: false,
|
|
715
714
|
allowUnknown: false,
|
|
716
715
|
});
|
|
@@ -718,7 +717,8 @@ class Payment {
|
|
|
718
717
|
if (res_error) {
|
|
719
718
|
Logger({
|
|
720
719
|
level: "WARN",
|
|
721
|
-
message:
|
|
720
|
+
message:
|
|
721
|
+
"Response Validation Warnnings for updateBrandPaymentGatewayConfig",
|
|
722
722
|
});
|
|
723
723
|
Logger({ level: "WARN", message: res_error });
|
|
724
724
|
}
|