@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
|
@@ -12,15 +12,17 @@ class Payment {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @param {Object} arg - Arg object.
|
|
15
|
-
* @param {string}
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
15
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
16
|
+
* @param {UpdatePayoutRequest} arg.body
|
|
17
|
+
* @returns {Promise<UpdatePayoutResponse>} - Success response
|
|
18
|
+
* @summary: Partial Update Payout
|
|
19
|
+
* @description: Partial Update Payout
|
|
19
20
|
*/
|
|
20
|
-
async
|
|
21
|
-
const { error } = PaymentValidator.
|
|
21
|
+
async activateAndDectivatePayout({ uniqueTransferNo, body } = {}) {
|
|
22
|
+
const { error } = PaymentValidator.activateAndDectivatePayout().validate(
|
|
22
23
|
{
|
|
23
|
-
|
|
24
|
+
uniqueTransferNo,
|
|
25
|
+
body,
|
|
24
26
|
},
|
|
25
27
|
{ abortEarly: false, allowUnknown: true }
|
|
26
28
|
);
|
|
@@ -29,37 +31,40 @@ class Payment {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
// Showing warrnings if extra unknown parameters are found
|
|
32
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
error: warrning,
|
|
36
|
+
} = PaymentValidator.activateAndDectivatePayout().validate(
|
|
33
37
|
{
|
|
34
|
-
|
|
38
|
+
uniqueTransferNo,
|
|
39
|
+
body,
|
|
35
40
|
},
|
|
36
41
|
{ abortEarly: false, allowUnknown: false }
|
|
37
42
|
);
|
|
38
43
|
if (warrning) {
|
|
39
44
|
Logger({
|
|
40
45
|
level: "WARN",
|
|
41
|
-
message:
|
|
46
|
+
message:
|
|
47
|
+
"Parameter Validation warrnings for activateAndDectivatePayout",
|
|
42
48
|
});
|
|
43
49
|
Logger({ level: "WARN", message: warrning });
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
const query_params = {};
|
|
47
|
-
query_params["unique_external_id"] = uniqueExternalId;
|
|
48
53
|
|
|
49
54
|
const xHeaders = {};
|
|
50
55
|
|
|
51
56
|
const response = await PlatformAPIClient.execute(
|
|
52
57
|
this.config,
|
|
53
|
-
"
|
|
54
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
58
|
+
"patch",
|
|
59
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
55
60
|
query_params,
|
|
56
|
-
|
|
61
|
+
body,
|
|
57
62
|
xHeaders
|
|
58
63
|
);
|
|
59
64
|
|
|
60
65
|
const {
|
|
61
66
|
error: res_error,
|
|
62
|
-
} = PaymentModel.
|
|
67
|
+
} = PaymentModel.UpdatePayoutResponse().validate(response, {
|
|
63
68
|
abortEarly: false,
|
|
64
69
|
allowUnknown: false,
|
|
65
70
|
});
|
|
@@ -67,7 +72,7 @@ class Payment {
|
|
|
67
72
|
if (res_error) {
|
|
68
73
|
Logger({
|
|
69
74
|
level: "WARN",
|
|
70
|
-
message: "Response Validation Warnnings for
|
|
75
|
+
message: "Response Validation Warnnings for activateAndDectivatePayout",
|
|
71
76
|
});
|
|
72
77
|
Logger({ level: "WARN", message: res_error });
|
|
73
78
|
}
|
|
@@ -77,15 +82,15 @@ class Payment {
|
|
|
77
82
|
|
|
78
83
|
/**
|
|
79
84
|
* @param {Object} arg - Arg object.
|
|
80
|
-
* @param {
|
|
81
|
-
* @returns {Promise<
|
|
82
|
-
* @summary:
|
|
83
|
-
* @description:
|
|
85
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
86
|
+
* @returns {Promise<DeletePayoutResponse>} - Success response
|
|
87
|
+
* @summary: Delete Payout
|
|
88
|
+
* @description: Delete Payout
|
|
84
89
|
*/
|
|
85
|
-
async
|
|
86
|
-
const { error } = PaymentValidator.
|
|
90
|
+
async deletePayout({ uniqueTransferNo } = {}) {
|
|
91
|
+
const { error } = PaymentValidator.deletePayout().validate(
|
|
87
92
|
{
|
|
88
|
-
|
|
93
|
+
uniqueTransferNo,
|
|
89
94
|
},
|
|
90
95
|
{ abortEarly: false, allowUnknown: true }
|
|
91
96
|
);
|
|
@@ -94,16 +99,16 @@ class Payment {
|
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
// Showing warrnings if extra unknown parameters are found
|
|
97
|
-
const { error: warrning } = PaymentValidator.
|
|
102
|
+
const { error: warrning } = PaymentValidator.deletePayout().validate(
|
|
98
103
|
{
|
|
99
|
-
|
|
104
|
+
uniqueTransferNo,
|
|
100
105
|
},
|
|
101
106
|
{ abortEarly: false, allowUnknown: false }
|
|
102
107
|
);
|
|
103
108
|
if (warrning) {
|
|
104
109
|
Logger({
|
|
105
110
|
level: "WARN",
|
|
106
|
-
message: "Parameter Validation warrnings for
|
|
111
|
+
message: "Parameter Validation warrnings for deletePayout",
|
|
107
112
|
});
|
|
108
113
|
Logger({ level: "WARN", message: warrning });
|
|
109
114
|
}
|
|
@@ -114,16 +119,16 @@ class Payment {
|
|
|
114
119
|
|
|
115
120
|
const response = await PlatformAPIClient.execute(
|
|
116
121
|
this.config,
|
|
117
|
-
"
|
|
118
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
122
|
+
"delete",
|
|
123
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
119
124
|
query_params,
|
|
120
|
-
|
|
125
|
+
undefined,
|
|
121
126
|
xHeaders
|
|
122
127
|
);
|
|
123
128
|
|
|
124
129
|
const {
|
|
125
130
|
error: res_error,
|
|
126
|
-
} = PaymentModel.
|
|
131
|
+
} = PaymentModel.DeletePayoutResponse().validate(response, {
|
|
127
132
|
abortEarly: false,
|
|
128
133
|
allowUnknown: false,
|
|
129
134
|
});
|
|
@@ -131,7 +136,7 @@ class Payment {
|
|
|
131
136
|
if (res_error) {
|
|
132
137
|
Logger({
|
|
133
138
|
level: "WARN",
|
|
134
|
-
message: "Response Validation Warnnings for
|
|
139
|
+
message: "Response Validation Warnnings for deletePayout",
|
|
135
140
|
});
|
|
136
141
|
Logger({ level: "WARN", message: res_error });
|
|
137
142
|
}
|
|
@@ -141,17 +146,22 @@ class Payment {
|
|
|
141
146
|
|
|
142
147
|
/**
|
|
143
148
|
* @param {Object} arg - Arg object.
|
|
144
|
-
* @param {string} arg.
|
|
145
|
-
* @param {
|
|
146
|
-
* @returns {Promise<
|
|
147
|
-
* @summary:
|
|
148
|
-
* @description:
|
|
149
|
+
* @param {string} arg.uniqueExternalId -
|
|
150
|
+
* @param {string} arg.paymentMethodId -
|
|
151
|
+
* @returns {Promise<DeleteSubscriptionPaymentMethodResponse>} - Success response
|
|
152
|
+
* @summary: Delete Subscription Payment Method
|
|
153
|
+
* @description: Uses this api to Delete Subscription Payment Method
|
|
149
154
|
*/
|
|
150
|
-
async
|
|
151
|
-
|
|
155
|
+
async deleteSubscriptionPaymentMethod({
|
|
156
|
+
uniqueExternalId,
|
|
157
|
+
paymentMethodId,
|
|
158
|
+
} = {}) {
|
|
159
|
+
const {
|
|
160
|
+
error,
|
|
161
|
+
} = PaymentValidator.deleteSubscriptionPaymentMethod().validate(
|
|
152
162
|
{
|
|
153
|
-
|
|
154
|
-
|
|
163
|
+
uniqueExternalId,
|
|
164
|
+
paymentMethodId,
|
|
155
165
|
},
|
|
156
166
|
{ abortEarly: false, allowUnknown: true }
|
|
157
167
|
);
|
|
@@ -160,45 +170,51 @@ class Payment {
|
|
|
160
170
|
}
|
|
161
171
|
|
|
162
172
|
// Showing warrnings if extra unknown parameters are found
|
|
163
|
-
const {
|
|
173
|
+
const {
|
|
174
|
+
error: warrning,
|
|
175
|
+
} = PaymentValidator.deleteSubscriptionPaymentMethod().validate(
|
|
164
176
|
{
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
uniqueExternalId,
|
|
178
|
+
paymentMethodId,
|
|
167
179
|
},
|
|
168
180
|
{ abortEarly: false, allowUnknown: false }
|
|
169
181
|
);
|
|
170
182
|
if (warrning) {
|
|
171
183
|
Logger({
|
|
172
184
|
level: "WARN",
|
|
173
|
-
message:
|
|
185
|
+
message:
|
|
186
|
+
"Parameter Validation warrnings for deleteSubscriptionPaymentMethod",
|
|
174
187
|
});
|
|
175
188
|
Logger({ level: "WARN", message: warrning });
|
|
176
189
|
}
|
|
177
190
|
|
|
178
191
|
const query_params = {};
|
|
192
|
+
query_params["unique_external_id"] = uniqueExternalId;
|
|
193
|
+
query_params["payment_method_id"] = paymentMethodId;
|
|
179
194
|
|
|
180
195
|
const xHeaders = {};
|
|
181
196
|
|
|
182
197
|
const response = await PlatformAPIClient.execute(
|
|
183
198
|
this.config,
|
|
184
|
-
"
|
|
185
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/
|
|
199
|
+
"delete",
|
|
200
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/methods`,
|
|
186
201
|
query_params,
|
|
187
|
-
|
|
202
|
+
undefined,
|
|
188
203
|
xHeaders
|
|
189
204
|
);
|
|
190
205
|
|
|
191
206
|
const {
|
|
192
207
|
error: res_error,
|
|
193
|
-
} = PaymentModel.
|
|
194
|
-
|
|
195
|
-
allowUnknown: false
|
|
196
|
-
|
|
208
|
+
} = PaymentModel.DeleteSubscriptionPaymentMethodResponse().validate(
|
|
209
|
+
response,
|
|
210
|
+
{ abortEarly: false, allowUnknown: false }
|
|
211
|
+
);
|
|
197
212
|
|
|
198
213
|
if (res_error) {
|
|
199
214
|
Logger({
|
|
200
215
|
level: "WARN",
|
|
201
|
-
message:
|
|
216
|
+
message:
|
|
217
|
+
"Response Validation Warnnings for deleteSubscriptionPaymentMethod",
|
|
202
218
|
});
|
|
203
219
|
Logger({ level: "WARN", message: res_error });
|
|
204
220
|
}
|
|
@@ -208,17 +224,15 @@ class Payment {
|
|
|
208
224
|
|
|
209
225
|
/**
|
|
210
226
|
* @param {Object} arg - Arg object.
|
|
211
|
-
* @param {string} arg.
|
|
212
|
-
* @
|
|
213
|
-
* @
|
|
214
|
-
* @
|
|
215
|
-
* @description: Partial Update Payout
|
|
227
|
+
* @param {string} [arg.uniqueExternalId] - Fetch payouts using unique external id
|
|
228
|
+
* @returns {Promise<PayoutsResponse>} - Success response
|
|
229
|
+
* @summary: Get All Payouts
|
|
230
|
+
* @description: Get All Payouts
|
|
216
231
|
*/
|
|
217
|
-
async
|
|
218
|
-
const { error } = PaymentValidator.
|
|
232
|
+
async getAllPayouts({ uniqueExternalId } = {}) {
|
|
233
|
+
const { error } = PaymentValidator.getAllPayouts().validate(
|
|
219
234
|
{
|
|
220
|
-
|
|
221
|
-
body,
|
|
235
|
+
uniqueExternalId,
|
|
222
236
|
},
|
|
223
237
|
{ abortEarly: false, allowUnknown: true }
|
|
224
238
|
);
|
|
@@ -227,40 +241,37 @@ class Payment {
|
|
|
227
241
|
}
|
|
228
242
|
|
|
229
243
|
// Showing warrnings if extra unknown parameters are found
|
|
230
|
-
const {
|
|
231
|
-
error: warrning,
|
|
232
|
-
} = PaymentValidator.activateAndDectivatePayout().validate(
|
|
244
|
+
const { error: warrning } = PaymentValidator.getAllPayouts().validate(
|
|
233
245
|
{
|
|
234
|
-
|
|
235
|
-
body,
|
|
246
|
+
uniqueExternalId,
|
|
236
247
|
},
|
|
237
248
|
{ abortEarly: false, allowUnknown: false }
|
|
238
249
|
);
|
|
239
250
|
if (warrning) {
|
|
240
251
|
Logger({
|
|
241
252
|
level: "WARN",
|
|
242
|
-
message:
|
|
243
|
-
"Parameter Validation warrnings for activateAndDectivatePayout",
|
|
253
|
+
message: "Parameter Validation warrnings for getAllPayouts",
|
|
244
254
|
});
|
|
245
255
|
Logger({ level: "WARN", message: warrning });
|
|
246
256
|
}
|
|
247
257
|
|
|
248
258
|
const query_params = {};
|
|
259
|
+
query_params["unique_external_id"] = uniqueExternalId;
|
|
249
260
|
|
|
250
261
|
const xHeaders = {};
|
|
251
262
|
|
|
252
263
|
const response = await PlatformAPIClient.execute(
|
|
253
264
|
this.config,
|
|
254
|
-
"
|
|
255
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts
|
|
265
|
+
"get",
|
|
266
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
256
267
|
query_params,
|
|
257
|
-
|
|
268
|
+
undefined,
|
|
258
269
|
xHeaders
|
|
259
270
|
);
|
|
260
271
|
|
|
261
272
|
const {
|
|
262
273
|
error: res_error,
|
|
263
|
-
} = PaymentModel.
|
|
274
|
+
} = PaymentModel.PayoutsResponse().validate(response, {
|
|
264
275
|
abortEarly: false,
|
|
265
276
|
allowUnknown: false,
|
|
266
277
|
});
|
|
@@ -268,7 +279,7 @@ class Payment {
|
|
|
268
279
|
if (res_error) {
|
|
269
280
|
Logger({
|
|
270
281
|
level: "WARN",
|
|
271
|
-
message: "Response Validation Warnnings for
|
|
282
|
+
message: "Response Validation Warnnings for getAllPayouts",
|
|
272
283
|
});
|
|
273
284
|
Logger({ level: "WARN", message: res_error });
|
|
274
285
|
}
|
|
@@ -278,16 +289,13 @@ class Payment {
|
|
|
278
289
|
|
|
279
290
|
/**
|
|
280
291
|
* @param {Object} arg - Arg object.
|
|
281
|
-
* @
|
|
282
|
-
* @
|
|
283
|
-
* @
|
|
284
|
-
* @description: Delete Payout
|
|
292
|
+
* @returns {Promise<SubscriptionConfigResponse>} - Success response
|
|
293
|
+
* @summary: List Subscription Config
|
|
294
|
+
* @description: Get all Subscription Config details
|
|
285
295
|
*/
|
|
286
|
-
async
|
|
287
|
-
const { error } = PaymentValidator.
|
|
288
|
-
{
|
|
289
|
-
uniqueTransferNo,
|
|
290
|
-
},
|
|
296
|
+
async getSubscriptionConfig({} = {}) {
|
|
297
|
+
const { error } = PaymentValidator.getSubscriptionConfig().validate(
|
|
298
|
+
{},
|
|
291
299
|
{ abortEarly: false, allowUnknown: true }
|
|
292
300
|
);
|
|
293
301
|
if (error) {
|
|
@@ -295,16 +303,16 @@ class Payment {
|
|
|
295
303
|
}
|
|
296
304
|
|
|
297
305
|
// Showing warrnings if extra unknown parameters are found
|
|
298
|
-
const {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
},
|
|
306
|
+
const {
|
|
307
|
+
error: warrning,
|
|
308
|
+
} = PaymentValidator.getSubscriptionConfig().validate(
|
|
309
|
+
{},
|
|
302
310
|
{ abortEarly: false, allowUnknown: false }
|
|
303
311
|
);
|
|
304
312
|
if (warrning) {
|
|
305
313
|
Logger({
|
|
306
314
|
level: "WARN",
|
|
307
|
-
message: "Parameter Validation warrnings for
|
|
315
|
+
message: "Parameter Validation warrnings for getSubscriptionConfig",
|
|
308
316
|
});
|
|
309
317
|
Logger({ level: "WARN", message: warrning });
|
|
310
318
|
}
|
|
@@ -315,8 +323,8 @@ class Payment {
|
|
|
315
323
|
|
|
316
324
|
const response = await PlatformAPIClient.execute(
|
|
317
325
|
this.config,
|
|
318
|
-
"
|
|
319
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/
|
|
326
|
+
"get",
|
|
327
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/configs`,
|
|
320
328
|
query_params,
|
|
321
329
|
undefined,
|
|
322
330
|
xHeaders
|
|
@@ -324,7 +332,7 @@ class Payment {
|
|
|
324
332
|
|
|
325
333
|
const {
|
|
326
334
|
error: res_error,
|
|
327
|
-
} = PaymentModel.
|
|
335
|
+
} = PaymentModel.SubscriptionConfigResponse().validate(response, {
|
|
328
336
|
abortEarly: false,
|
|
329
337
|
allowUnknown: false,
|
|
330
338
|
});
|
|
@@ -332,7 +340,7 @@ class Payment {
|
|
|
332
340
|
if (res_error) {
|
|
333
341
|
Logger({
|
|
334
342
|
level: "WARN",
|
|
335
|
-
message: "Response Validation Warnnings for
|
|
343
|
+
message: "Response Validation Warnnings for getSubscriptionConfig",
|
|
336
344
|
});
|
|
337
345
|
Logger({ level: "WARN", message: res_error });
|
|
338
346
|
}
|
|
@@ -411,22 +419,15 @@ class Payment {
|
|
|
411
419
|
|
|
412
420
|
/**
|
|
413
421
|
* @param {Object} arg - Arg object.
|
|
414
|
-
* @param {
|
|
415
|
-
* @
|
|
416
|
-
* @
|
|
417
|
-
* @
|
|
418
|
-
* @description: Uses this api to Delete Subscription Payment Method
|
|
422
|
+
* @param {PayoutRequest} arg.body
|
|
423
|
+
* @returns {Promise<PayoutResponse>} - Success response
|
|
424
|
+
* @summary: Save Payout
|
|
425
|
+
* @description: Save Payout
|
|
419
426
|
*/
|
|
420
|
-
async
|
|
421
|
-
|
|
422
|
-
paymentMethodId,
|
|
423
|
-
} = {}) {
|
|
424
|
-
const {
|
|
425
|
-
error,
|
|
426
|
-
} = PaymentValidator.deleteSubscriptionPaymentMethod().validate(
|
|
427
|
+
async savePayout({ body } = {}) {
|
|
428
|
+
const { error } = PaymentValidator.savePayout().validate(
|
|
427
429
|
{
|
|
428
|
-
|
|
429
|
-
paymentMethodId,
|
|
430
|
+
body,
|
|
430
431
|
},
|
|
431
432
|
{ abortEarly: false, allowUnknown: true }
|
|
432
433
|
);
|
|
@@ -435,51 +436,44 @@ class Payment {
|
|
|
435
436
|
}
|
|
436
437
|
|
|
437
438
|
// Showing warrnings if extra unknown parameters are found
|
|
438
|
-
const {
|
|
439
|
-
error: warrning,
|
|
440
|
-
} = PaymentValidator.deleteSubscriptionPaymentMethod().validate(
|
|
439
|
+
const { error: warrning } = PaymentValidator.savePayout().validate(
|
|
441
440
|
{
|
|
442
|
-
|
|
443
|
-
paymentMethodId,
|
|
441
|
+
body,
|
|
444
442
|
},
|
|
445
443
|
{ abortEarly: false, allowUnknown: false }
|
|
446
444
|
);
|
|
447
445
|
if (warrning) {
|
|
448
446
|
Logger({
|
|
449
447
|
level: "WARN",
|
|
450
|
-
message:
|
|
451
|
-
"Parameter Validation warrnings for deleteSubscriptionPaymentMethod",
|
|
448
|
+
message: "Parameter Validation warrnings for savePayout",
|
|
452
449
|
});
|
|
453
450
|
Logger({ level: "WARN", message: warrning });
|
|
454
451
|
}
|
|
455
452
|
|
|
456
453
|
const query_params = {};
|
|
457
|
-
query_params["unique_external_id"] = uniqueExternalId;
|
|
458
|
-
query_params["payment_method_id"] = paymentMethodId;
|
|
459
454
|
|
|
460
455
|
const xHeaders = {};
|
|
461
456
|
|
|
462
457
|
const response = await PlatformAPIClient.execute(
|
|
463
458
|
this.config,
|
|
464
|
-
"
|
|
465
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/
|
|
459
|
+
"post",
|
|
460
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts`,
|
|
466
461
|
query_params,
|
|
467
|
-
|
|
462
|
+
body,
|
|
468
463
|
xHeaders
|
|
469
464
|
);
|
|
470
465
|
|
|
471
466
|
const {
|
|
472
467
|
error: res_error,
|
|
473
|
-
} = PaymentModel.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
);
|
|
468
|
+
} = PaymentModel.PayoutResponse().validate(response, {
|
|
469
|
+
abortEarly: false,
|
|
470
|
+
allowUnknown: false,
|
|
471
|
+
});
|
|
477
472
|
|
|
478
473
|
if (res_error) {
|
|
479
474
|
Logger({
|
|
480
475
|
level: "WARN",
|
|
481
|
-
message:
|
|
482
|
-
"Response Validation Warnnings for deleteSubscriptionPaymentMethod",
|
|
476
|
+
message: "Response Validation Warnnings for savePayout",
|
|
483
477
|
});
|
|
484
478
|
Logger({ level: "WARN", message: res_error });
|
|
485
479
|
}
|
|
@@ -489,13 +483,16 @@ class Payment {
|
|
|
489
483
|
|
|
490
484
|
/**
|
|
491
485
|
* @param {Object} arg - Arg object.
|
|
492
|
-
* @
|
|
493
|
-
* @
|
|
494
|
-
* @
|
|
486
|
+
* @param {SaveSubscriptionSetupIntentRequest} arg.body
|
|
487
|
+
* @returns {Promise<SaveSubscriptionSetupIntentResponse>} - Success response
|
|
488
|
+
* @summary: Save Subscription Setup Intent
|
|
489
|
+
* @description: Uses this api to Save Subscription Setup Intent
|
|
495
490
|
*/
|
|
496
|
-
async
|
|
497
|
-
const { error } = PaymentValidator.
|
|
498
|
-
{
|
|
491
|
+
async saveSubscriptionSetupIntent({ body } = {}) {
|
|
492
|
+
const { error } = PaymentValidator.saveSubscriptionSetupIntent().validate(
|
|
493
|
+
{
|
|
494
|
+
body,
|
|
495
|
+
},
|
|
499
496
|
{ abortEarly: false, allowUnknown: true }
|
|
500
497
|
);
|
|
501
498
|
if (error) {
|
|
@@ -505,14 +502,17 @@ class Payment {
|
|
|
505
502
|
// Showing warrnings if extra unknown parameters are found
|
|
506
503
|
const {
|
|
507
504
|
error: warrning,
|
|
508
|
-
} = PaymentValidator.
|
|
509
|
-
{
|
|
505
|
+
} = PaymentValidator.saveSubscriptionSetupIntent().validate(
|
|
506
|
+
{
|
|
507
|
+
body,
|
|
508
|
+
},
|
|
510
509
|
{ abortEarly: false, allowUnknown: false }
|
|
511
510
|
);
|
|
512
511
|
if (warrning) {
|
|
513
512
|
Logger({
|
|
514
513
|
level: "WARN",
|
|
515
|
-
message:
|
|
514
|
+
message:
|
|
515
|
+
"Parameter Validation warrnings for saveSubscriptionSetupIntent",
|
|
516
516
|
});
|
|
517
517
|
Logger({ level: "WARN", message: warrning });
|
|
518
518
|
}
|
|
@@ -523,16 +523,16 @@ class Payment {
|
|
|
523
523
|
|
|
524
524
|
const response = await PlatformAPIClient.execute(
|
|
525
525
|
this.config,
|
|
526
|
-
"
|
|
527
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/
|
|
526
|
+
"post",
|
|
527
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/subscription/setup/intent`,
|
|
528
528
|
query_params,
|
|
529
|
-
|
|
529
|
+
body,
|
|
530
530
|
xHeaders
|
|
531
531
|
);
|
|
532
532
|
|
|
533
533
|
const {
|
|
534
534
|
error: res_error,
|
|
535
|
-
} = PaymentModel.
|
|
535
|
+
} = PaymentModel.SaveSubscriptionSetupIntentResponse().validate(response, {
|
|
536
536
|
abortEarly: false,
|
|
537
537
|
allowUnknown: false,
|
|
538
538
|
});
|
|
@@ -540,7 +540,8 @@ class Payment {
|
|
|
540
540
|
if (res_error) {
|
|
541
541
|
Logger({
|
|
542
542
|
level: "WARN",
|
|
543
|
-
message:
|
|
543
|
+
message:
|
|
544
|
+
"Response Validation Warnnings for saveSubscriptionSetupIntent",
|
|
544
545
|
});
|
|
545
546
|
Logger({ level: "WARN", message: res_error });
|
|
546
547
|
}
|
|
@@ -550,14 +551,16 @@ class Payment {
|
|
|
550
551
|
|
|
551
552
|
/**
|
|
552
553
|
* @param {Object} arg - Arg object.
|
|
553
|
-
* @param {
|
|
554
|
-
* @
|
|
555
|
-
* @
|
|
556
|
-
* @
|
|
554
|
+
* @param {string} arg.uniqueTransferNo - Unique transfer id
|
|
555
|
+
* @param {PayoutRequest} arg.body
|
|
556
|
+
* @returns {Promise<UpdatePayoutResponse>} - Success response
|
|
557
|
+
* @summary: Update Payout
|
|
558
|
+
* @description: Update Payout
|
|
557
559
|
*/
|
|
558
|
-
async
|
|
559
|
-
const { error } = PaymentValidator.
|
|
560
|
+
async updatePayout({ uniqueTransferNo, body } = {}) {
|
|
561
|
+
const { error } = PaymentValidator.updatePayout().validate(
|
|
560
562
|
{
|
|
563
|
+
uniqueTransferNo,
|
|
561
564
|
body,
|
|
562
565
|
},
|
|
563
566
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -567,10 +570,9 @@ class Payment {
|
|
|
567
570
|
}
|
|
568
571
|
|
|
569
572
|
// Showing warrnings if extra unknown parameters are found
|
|
570
|
-
const {
|
|
571
|
-
error: warrning,
|
|
572
|
-
} = PaymentValidator.saveSubscriptionSetupIntent().validate(
|
|
573
|
+
const { error: warrning } = PaymentValidator.updatePayout().validate(
|
|
573
574
|
{
|
|
575
|
+
uniqueTransferNo,
|
|
574
576
|
body,
|
|
575
577
|
},
|
|
576
578
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -578,8 +580,7 @@ class Payment {
|
|
|
578
580
|
if (warrning) {
|
|
579
581
|
Logger({
|
|
580
582
|
level: "WARN",
|
|
581
|
-
message:
|
|
582
|
-
"Parameter Validation warrnings for saveSubscriptionSetupIntent",
|
|
583
|
+
message: "Parameter Validation warrnings for updatePayout",
|
|
583
584
|
});
|
|
584
585
|
Logger({ level: "WARN", message: warrning });
|
|
585
586
|
}
|
|
@@ -590,8 +591,8 @@ class Payment {
|
|
|
590
591
|
|
|
591
592
|
const response = await PlatformAPIClient.execute(
|
|
592
593
|
this.config,
|
|
593
|
-
"
|
|
594
|
-
`/service/platform/payment/v1.0/company/${this.config.companyId}/
|
|
594
|
+
"put",
|
|
595
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/payouts/${uniqueTransferNo}`,
|
|
595
596
|
query_params,
|
|
596
597
|
body,
|
|
597
598
|
xHeaders
|
|
@@ -599,7 +600,7 @@ class Payment {
|
|
|
599
600
|
|
|
600
601
|
const {
|
|
601
602
|
error: res_error,
|
|
602
|
-
} = PaymentModel.
|
|
603
|
+
} = PaymentModel.UpdatePayoutResponse().validate(response, {
|
|
603
604
|
abortEarly: false,
|
|
604
605
|
allowUnknown: false,
|
|
605
606
|
});
|
|
@@ -607,8 +608,7 @@ class Payment {
|
|
|
607
608
|
if (res_error) {
|
|
608
609
|
Logger({
|
|
609
610
|
level: "WARN",
|
|
610
|
-
message:
|
|
611
|
-
"Response Validation Warnnings for saveSubscriptionSetupIntent",
|
|
611
|
+
message: "Response Validation Warnnings for updatePayout",
|
|
612
612
|
});
|
|
613
613
|
Logger({ level: "WARN", message: res_error });
|
|
614
614
|
}
|