@gofynd/fdk-client-javascript 1.3.11-beta.6 → 1.3.11-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3630 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +342 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +401 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2000 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1094 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1356 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +238 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +310 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -5
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +18 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1030 -468
- package/sdk/platform/Order/OrderPlatformModel.js +1176 -523
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -20,6 +20,7 @@ const OrderApplicationModel = require("./OrderApplicationModel");
|
|
|
20
20
|
* @typedef GetOrderByIdParam
|
|
21
21
|
* @property {string} orderId - A unique number used for identifying and
|
|
22
22
|
* tracking your orders.
|
|
23
|
+
* @property {boolean} [allowInactive] - Flag to allow inactive shipments
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -32,6 +33,8 @@ const OrderApplicationModel = require("./OrderApplicationModel");
|
|
|
32
33
|
* Default value is 10.
|
|
33
34
|
* @property {string} [fromDate] - The date from which the orders should be retrieved.
|
|
34
35
|
* @property {string} [toDate] - The date till which the orders should be retrieved.
|
|
36
|
+
* @property {string} [startDate] - UTC Start Date in ISO format
|
|
37
|
+
* @property {string} [endDate] - UTC Start Date in ISO format
|
|
35
38
|
* @property {string} [customMeta] - A filter and retrieve data using special
|
|
36
39
|
* fields included for special use-cases
|
|
37
40
|
*/
|
|
@@ -55,6 +58,7 @@ const OrderApplicationModel = require("./OrderApplicationModel");
|
|
|
55
58
|
* @property {string} shipmentId - ID of the shipment. An order may contain
|
|
56
59
|
* multiple items and may get divided into one or more shipment, each having
|
|
57
60
|
* its own ID.
|
|
61
|
+
* @property {boolean} [allowInactive] - Flag to allow inactive shipments
|
|
58
62
|
*/
|
|
59
63
|
|
|
60
64
|
/**
|
|
@@ -118,6 +122,7 @@ class OrderApplicationValidator {
|
|
|
118
122
|
static getOrderById() {
|
|
119
123
|
return Joi.object({
|
|
120
124
|
orderId: Joi.string().allow("").required(),
|
|
125
|
+
allowInactive: Joi.boolean(),
|
|
121
126
|
}).required();
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -129,6 +134,8 @@ class OrderApplicationValidator {
|
|
|
129
134
|
pageSize: Joi.number(),
|
|
130
135
|
fromDate: Joi.string().allow(""),
|
|
131
136
|
toDate: Joi.string().allow(""),
|
|
137
|
+
startDate: Joi.string().allow(""),
|
|
138
|
+
endDate: Joi.string().allow(""),
|
|
132
139
|
customMeta: Joi.string().allow(""),
|
|
133
140
|
});
|
|
134
141
|
}
|
|
@@ -152,6 +159,7 @@ class OrderApplicationValidator {
|
|
|
152
159
|
static getShipmentById() {
|
|
153
160
|
return Joi.object({
|
|
154
161
|
shipmentId: Joi.string().allow("").required(),
|
|
162
|
+
allowInactive: Joi.boolean(),
|
|
155
163
|
}).required();
|
|
156
164
|
}
|
|
157
165
|
|
|
@@ -13,9 +13,11 @@ declare class Payment {
|
|
|
13
13
|
checkCredit: string;
|
|
14
14
|
createOrderHandlerPaymentLink: string;
|
|
15
15
|
createPaymentLink: string;
|
|
16
|
+
createPaymentOrder: string;
|
|
16
17
|
customerCreditSummary: string;
|
|
17
18
|
customerOnboard: string;
|
|
18
19
|
deleteUserCard: string;
|
|
20
|
+
delinkWallet: string;
|
|
19
21
|
enableOrDisableRefundTransferMode: string;
|
|
20
22
|
getActiveCardAggregator: string;
|
|
21
23
|
getActiveRefundTransferModes: string;
|
|
@@ -31,6 +33,7 @@ declare class Payment {
|
|
|
31
33
|
getUserBeneficiariesDetail: string;
|
|
32
34
|
initialisePayment: string;
|
|
33
35
|
initialisePaymentPaymentLink: string;
|
|
36
|
+
linkWallet: string;
|
|
34
37
|
outstandingOrderDetails: string;
|
|
35
38
|
paidOrderDetails: string;
|
|
36
39
|
pollingPaymentLink: string;
|
|
@@ -45,6 +48,7 @@ declare class Payment {
|
|
|
45
48
|
verifyIfscCode: string;
|
|
46
49
|
verifyOtpAndAddBeneficiaryForBank: string;
|
|
47
50
|
verifyOtpAndAddBeneficiaryForWallet: string;
|
|
51
|
+
walletLinkInitate: string;
|
|
48
52
|
};
|
|
49
53
|
_urls: {};
|
|
50
54
|
updateUrls(urls: any): void;
|
|
@@ -165,6 +169,16 @@ declare class Payment {
|
|
|
165
169
|
* @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
|
|
166
170
|
*/
|
|
167
171
|
createPaymentLink({ body, requestHeaders }?: PaymentApplicationValidator.CreatePaymentLinkParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.CreatePaymentLinkResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object.
|
|
174
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
175
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
176
|
+
* @returns {Promise<PaymentApplicationModel.PaymentOrderResponse>} - Success response
|
|
177
|
+
* @name createPaymentOrder
|
|
178
|
+
* @summary: Create Order
|
|
179
|
+
* @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/).
|
|
180
|
+
*/
|
|
181
|
+
createPaymentOrder({ body, requestHeaders }?: PaymentApplicationValidator.CreatePaymentOrderParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.PaymentOrderResponse>;
|
|
168
182
|
/**
|
|
169
183
|
* @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
|
|
170
184
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -198,6 +212,16 @@ declare class Payment {
|
|
|
198
212
|
* @description: Use this API to delete a card added by a user on the payment gateway and clear the cache. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
|
|
199
213
|
*/
|
|
200
214
|
deleteUserCard({ body, requestHeaders }?: PaymentApplicationValidator.DeleteUserCardParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.DeleteCardsResponse>;
|
|
215
|
+
/**
|
|
216
|
+
* @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object.
|
|
217
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
218
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
219
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
220
|
+
* @name delinkWallet
|
|
221
|
+
* @summary: Delink the wallet
|
|
222
|
+
* @description: It Removes already linked wallet - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/).
|
|
223
|
+
*/
|
|
224
|
+
delinkWallet({ body, requestHeaders }?: PaymentApplicationValidator.DelinkWalletParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.WalletResponseSchema>;
|
|
201
225
|
/**
|
|
202
226
|
* @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
|
|
203
227
|
* - Arg object.
|
|
@@ -305,7 +329,7 @@ declare class Payment {
|
|
|
305
329
|
* @summary: Get applicable payment options
|
|
306
330
|
* @description: Use this API to get all valid payment options for doing a payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/).
|
|
307
331
|
*/
|
|
308
|
-
getPaymentModeRoutes({ amount, cartId,
|
|
332
|
+
getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: PaymentApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.PaymentModeRouteResponse>;
|
|
309
333
|
/**
|
|
310
334
|
* @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg
|
|
311
335
|
* - Arg object.
|
|
@@ -329,7 +353,7 @@ declare class Payment {
|
|
|
329
353
|
* @summary: Get applicable payment options for Point-of-Sale (POS)
|
|
330
354
|
* @description: Use this API to get all valid payment options for doing a payment in POS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/).
|
|
331
355
|
*/
|
|
332
|
-
getPosPaymentModeRoutes({ amount,
|
|
356
|
+
getPosPaymentModeRoutes({ amount, pincode, orderType, cartId, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: PaymentApplicationValidator.GetPosPaymentModeRoutesParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.PaymentModeRouteResponse>;
|
|
333
357
|
/**
|
|
334
358
|
* @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object.
|
|
335
359
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -379,6 +403,16 @@ declare class Payment {
|
|
|
379
403
|
* @description: Use this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/).
|
|
380
404
|
*/
|
|
381
405
|
initialisePaymentPaymentLink({ body, requestHeaders }?: PaymentApplicationValidator.InitialisePaymentPaymentLinkParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.PaymentInitializationResponse>;
|
|
406
|
+
/**
|
|
407
|
+
* @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object.
|
|
408
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
409
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
410
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
411
|
+
* @name linkWallet
|
|
412
|
+
* @summary: OTP verification for linking of wallet
|
|
413
|
+
* @description: It Verifies the linking of wallet using OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/).
|
|
414
|
+
*/
|
|
415
|
+
linkWallet({ body, requestHeaders }?: PaymentApplicationValidator.LinkWalletParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.WalletResponseSchema>;
|
|
382
416
|
/**
|
|
383
417
|
* @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
|
|
384
418
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -540,6 +574,16 @@ declare class Payment {
|
|
|
540
574
|
* @description: Use this API to send an OTP while adding a wallet beneficiary by mobile no. verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/).
|
|
541
575
|
*/
|
|
542
576
|
verifyOtpAndAddBeneficiaryForWallet({ body, requestHeaders }?: PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.WalletOtpResponse>;
|
|
577
|
+
/**
|
|
578
|
+
* @param {PaymentApplicationValidator.WalletLinkInitateParam} arg - Arg object.
|
|
579
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
580
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
581
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
582
|
+
* @name walletLinkInitate
|
|
583
|
+
* @summary: Initiate linking of wallet
|
|
584
|
+
* @description: It will initiate linking of wallet for the aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/walletLinkInitate/).
|
|
585
|
+
*/
|
|
586
|
+
walletLinkInitate({ body, requestHeaders }?: PaymentApplicationValidator.WalletLinkInitateParam, { responseHeaders }?: object): Promise<PaymentApplicationModel.WalletResponseSchema>;
|
|
543
587
|
}
|
|
544
588
|
import PaymentApplicationValidator = require("./PaymentApplicationValidator");
|
|
545
589
|
import PaymentApplicationModel = require("./PaymentApplicationModel");
|
|
@@ -30,10 +30,13 @@ class Payment {
|
|
|
30
30
|
"/service/application/payment/v1.0/create-order/link/",
|
|
31
31
|
createPaymentLink:
|
|
32
32
|
"/service/application/payment/v1.0/create-payment-link/",
|
|
33
|
+
createPaymentOrder: "/service/application/payment/v1.0/payment-orders/",
|
|
33
34
|
customerCreditSummary:
|
|
34
35
|
"/service/application/payment/v1.0/payment/credit-summary/",
|
|
35
36
|
customerOnboard: "/service/application/payment/v1.0/credit-onboard/",
|
|
36
37
|
deleteUserCard: "/service/application/payment/v1.0/card/remove",
|
|
38
|
+
delinkWallet:
|
|
39
|
+
"/service/application/payment/v1.0/payment/options/wallet/delink",
|
|
37
40
|
enableOrDisableRefundTransferMode:
|
|
38
41
|
"/service/application/payment/v1.0/refund/transfer-mode",
|
|
39
42
|
getActiveCardAggregator:
|
|
@@ -59,6 +62,8 @@ class Payment {
|
|
|
59
62
|
initialisePayment: "/service/application/payment/v1.0/payment/request",
|
|
60
63
|
initialisePaymentPaymentLink:
|
|
61
64
|
"/service/application/payment/v1.0/payment/request/link/",
|
|
65
|
+
linkWallet:
|
|
66
|
+
"/service/application/payment/v1.0/payment/options/wallet/verify",
|
|
62
67
|
outstandingOrderDetails:
|
|
63
68
|
"/service/application/payment/v1.0/payment/outstanding-orders/",
|
|
64
69
|
paidOrderDetails:
|
|
@@ -84,6 +89,8 @@ class Payment {
|
|
|
84
89
|
"/service/application/payment/v1.0/refund/verification/bank",
|
|
85
90
|
verifyOtpAndAddBeneficiaryForWallet:
|
|
86
91
|
"/service/application/payment/v1.0/refund/verification/wallet",
|
|
92
|
+
walletLinkInitate:
|
|
93
|
+
"/service/application/payment/v1.0/payment/options/wallet/link",
|
|
87
94
|
};
|
|
88
95
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
89
96
|
(urls, [method, relativeUrl]) => {
|
|
@@ -912,6 +919,84 @@ class Payment {
|
|
|
912
919
|
return response;
|
|
913
920
|
}
|
|
914
921
|
|
|
922
|
+
/**
|
|
923
|
+
* @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object.
|
|
924
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
925
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
926
|
+
* @returns {Promise<PaymentApplicationModel.PaymentOrderResponse>} - Success response
|
|
927
|
+
* @name createPaymentOrder
|
|
928
|
+
* @summary: Create Order
|
|
929
|
+
* @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/).
|
|
930
|
+
*/
|
|
931
|
+
async createPaymentOrder(
|
|
932
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
933
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
934
|
+
) {
|
|
935
|
+
const { error } = PaymentApplicationValidator.createPaymentOrder().validate(
|
|
936
|
+
{ body },
|
|
937
|
+
{ abortEarly: false, allowUnknown: true }
|
|
938
|
+
);
|
|
939
|
+
if (error) {
|
|
940
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
// Showing warrnings if extra unknown parameters are found
|
|
944
|
+
const {
|
|
945
|
+
error: warrning,
|
|
946
|
+
} = PaymentApplicationValidator.createPaymentOrder().validate(
|
|
947
|
+
{ body },
|
|
948
|
+
{ abortEarly: false, allowUnknown: false }
|
|
949
|
+
);
|
|
950
|
+
if (warrning) {
|
|
951
|
+
Logger({
|
|
952
|
+
level: "WARN",
|
|
953
|
+
message: `Parameter Validation warrnings for application > Payment > createPaymentOrder \n ${warrning}`,
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
const query_params = {};
|
|
958
|
+
|
|
959
|
+
const xHeaders = {};
|
|
960
|
+
|
|
961
|
+
const response = await ApplicationAPIClient.execute(
|
|
962
|
+
this._conf,
|
|
963
|
+
"post",
|
|
964
|
+
constructUrl({
|
|
965
|
+
url: this._urls["createPaymentOrder"],
|
|
966
|
+
params: {},
|
|
967
|
+
}),
|
|
968
|
+
query_params,
|
|
969
|
+
body,
|
|
970
|
+
{ ...xHeaders, ...requestHeaders },
|
|
971
|
+
{ responseHeaders }
|
|
972
|
+
);
|
|
973
|
+
|
|
974
|
+
let responseData = response;
|
|
975
|
+
if (responseHeaders) {
|
|
976
|
+
responseData = response[0];
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
const {
|
|
980
|
+
error: res_error,
|
|
981
|
+
} = PaymentApplicationModel.PaymentOrderResponse().validate(responseData, {
|
|
982
|
+
abortEarly: false,
|
|
983
|
+
allowUnknown: true,
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
if (res_error) {
|
|
987
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
988
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
989
|
+
} else {
|
|
990
|
+
Logger({
|
|
991
|
+
level: "WARN",
|
|
992
|
+
message: `Response Validation Warnings for application > Payment > createPaymentOrder \n ${res_error}`,
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
return response;
|
|
998
|
+
}
|
|
999
|
+
|
|
915
1000
|
/**
|
|
916
1001
|
* @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
|
|
917
1002
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1152,6 +1237,84 @@ class Payment {
|
|
|
1152
1237
|
return response;
|
|
1153
1238
|
}
|
|
1154
1239
|
|
|
1240
|
+
/**
|
|
1241
|
+
* @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object.
|
|
1242
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1243
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1244
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
1245
|
+
* @name delinkWallet
|
|
1246
|
+
* @summary: Delink the wallet
|
|
1247
|
+
* @description: It Removes already linked wallet - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/).
|
|
1248
|
+
*/
|
|
1249
|
+
async delinkWallet(
|
|
1250
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1251
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1252
|
+
) {
|
|
1253
|
+
const { error } = PaymentApplicationValidator.delinkWallet().validate(
|
|
1254
|
+
{ body },
|
|
1255
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1256
|
+
);
|
|
1257
|
+
if (error) {
|
|
1258
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1262
|
+
const {
|
|
1263
|
+
error: warrning,
|
|
1264
|
+
} = PaymentApplicationValidator.delinkWallet().validate(
|
|
1265
|
+
{ body },
|
|
1266
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1267
|
+
);
|
|
1268
|
+
if (warrning) {
|
|
1269
|
+
Logger({
|
|
1270
|
+
level: "WARN",
|
|
1271
|
+
message: `Parameter Validation warrnings for application > Payment > delinkWallet \n ${warrning}`,
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
const query_params = {};
|
|
1276
|
+
|
|
1277
|
+
const xHeaders = {};
|
|
1278
|
+
|
|
1279
|
+
const response = await ApplicationAPIClient.execute(
|
|
1280
|
+
this._conf,
|
|
1281
|
+
"post",
|
|
1282
|
+
constructUrl({
|
|
1283
|
+
url: this._urls["delinkWallet"],
|
|
1284
|
+
params: {},
|
|
1285
|
+
}),
|
|
1286
|
+
query_params,
|
|
1287
|
+
body,
|
|
1288
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1289
|
+
{ responseHeaders }
|
|
1290
|
+
);
|
|
1291
|
+
|
|
1292
|
+
let responseData = response;
|
|
1293
|
+
if (responseHeaders) {
|
|
1294
|
+
responseData = response[0];
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
const {
|
|
1298
|
+
error: res_error,
|
|
1299
|
+
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
1300
|
+
abortEarly: false,
|
|
1301
|
+
allowUnknown: true,
|
|
1302
|
+
});
|
|
1303
|
+
|
|
1304
|
+
if (res_error) {
|
|
1305
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
1306
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1307
|
+
} else {
|
|
1308
|
+
Logger({
|
|
1309
|
+
level: "WARN",
|
|
1310
|
+
message: `Response Validation Warnings for application > Payment > delinkWallet \n ${res_error}`,
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
return response;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1155
1318
|
/**
|
|
1156
1319
|
* @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
|
|
1157
1320
|
* - Arg object.
|
|
@@ -1825,11 +1988,14 @@ class Payment {
|
|
|
1825
1988
|
{
|
|
1826
1989
|
amount,
|
|
1827
1990
|
cartId,
|
|
1828
|
-
pincode,
|
|
1829
1991
|
checkoutMode,
|
|
1830
1992
|
refresh,
|
|
1993
|
+
orderId,
|
|
1831
1994
|
cardReference,
|
|
1832
1995
|
userDetails,
|
|
1996
|
+
displaySplit,
|
|
1997
|
+
advancePayment,
|
|
1998
|
+
shipmentId,
|
|
1833
1999
|
requestHeaders,
|
|
1834
2000
|
} = { requestHeaders: {} },
|
|
1835
2001
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -1840,11 +2006,14 @@ class Payment {
|
|
|
1840
2006
|
{
|
|
1841
2007
|
amount,
|
|
1842
2008
|
cartId,
|
|
1843
|
-
pincode,
|
|
1844
2009
|
checkoutMode,
|
|
1845
2010
|
refresh,
|
|
2011
|
+
orderId,
|
|
1846
2012
|
cardReference,
|
|
1847
2013
|
userDetails,
|
|
2014
|
+
displaySplit,
|
|
2015
|
+
advancePayment,
|
|
2016
|
+
shipmentId,
|
|
1848
2017
|
},
|
|
1849
2018
|
{ abortEarly: false, allowUnknown: true }
|
|
1850
2019
|
);
|
|
@@ -1859,11 +2028,14 @@ class Payment {
|
|
|
1859
2028
|
{
|
|
1860
2029
|
amount,
|
|
1861
2030
|
cartId,
|
|
1862
|
-
pincode,
|
|
1863
2031
|
checkoutMode,
|
|
1864
2032
|
refresh,
|
|
2033
|
+
orderId,
|
|
1865
2034
|
cardReference,
|
|
1866
2035
|
userDetails,
|
|
2036
|
+
displaySplit,
|
|
2037
|
+
advancePayment,
|
|
2038
|
+
shipmentId,
|
|
1867
2039
|
},
|
|
1868
2040
|
{ abortEarly: false, allowUnknown: false }
|
|
1869
2041
|
);
|
|
@@ -1877,11 +2049,14 @@ class Payment {
|
|
|
1877
2049
|
const query_params = {};
|
|
1878
2050
|
query_params["amount"] = amount;
|
|
1879
2051
|
query_params["cart_id"] = cartId;
|
|
1880
|
-
query_params["pincode"] = pincode;
|
|
1881
2052
|
query_params["checkout_mode"] = checkoutMode;
|
|
1882
2053
|
query_params["refresh"] = refresh;
|
|
2054
|
+
query_params["order_id"] = orderId;
|
|
1883
2055
|
query_params["card_reference"] = cardReference;
|
|
1884
2056
|
query_params["user_details"] = userDetails;
|
|
2057
|
+
query_params["display_split"] = displaySplit;
|
|
2058
|
+
query_params["advance_payment"] = advancePayment;
|
|
2059
|
+
query_params["shipment_id"] = shipmentId;
|
|
1885
2060
|
|
|
1886
2061
|
const xHeaders = {};
|
|
1887
2062
|
|
|
@@ -2021,10 +2196,10 @@ class Payment {
|
|
|
2021
2196
|
async getPosPaymentModeRoutes(
|
|
2022
2197
|
{
|
|
2023
2198
|
amount,
|
|
2024
|
-
cartId,
|
|
2025
2199
|
pincode,
|
|
2026
|
-
checkoutMode,
|
|
2027
2200
|
orderType,
|
|
2201
|
+
cartId,
|
|
2202
|
+
checkoutMode,
|
|
2028
2203
|
refresh,
|
|
2029
2204
|
cardReference,
|
|
2030
2205
|
userDetails,
|
|
@@ -2037,10 +2212,10 @@ class Payment {
|
|
|
2037
2212
|
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
2038
2213
|
{
|
|
2039
2214
|
amount,
|
|
2040
|
-
cartId,
|
|
2041
2215
|
pincode,
|
|
2042
|
-
checkoutMode,
|
|
2043
2216
|
orderType,
|
|
2217
|
+
cartId,
|
|
2218
|
+
checkoutMode,
|
|
2044
2219
|
refresh,
|
|
2045
2220
|
cardReference,
|
|
2046
2221
|
userDetails,
|
|
@@ -2057,10 +2232,10 @@ class Payment {
|
|
|
2057
2232
|
} = PaymentApplicationValidator.getPosPaymentModeRoutes().validate(
|
|
2058
2233
|
{
|
|
2059
2234
|
amount,
|
|
2060
|
-
cartId,
|
|
2061
2235
|
pincode,
|
|
2062
|
-
checkoutMode,
|
|
2063
2236
|
orderType,
|
|
2237
|
+
cartId,
|
|
2238
|
+
checkoutMode,
|
|
2064
2239
|
refresh,
|
|
2065
2240
|
cardReference,
|
|
2066
2241
|
userDetails,
|
|
@@ -2453,6 +2628,84 @@ class Payment {
|
|
|
2453
2628
|
return response;
|
|
2454
2629
|
}
|
|
2455
2630
|
|
|
2631
|
+
/**
|
|
2632
|
+
* @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object.
|
|
2633
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2634
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
2635
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
2636
|
+
* @name linkWallet
|
|
2637
|
+
* @summary: OTP verification for linking of wallet
|
|
2638
|
+
* @description: It Verifies the linking of wallet using OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/).
|
|
2639
|
+
*/
|
|
2640
|
+
async linkWallet(
|
|
2641
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2642
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2643
|
+
) {
|
|
2644
|
+
const { error } = PaymentApplicationValidator.linkWallet().validate(
|
|
2645
|
+
{ body },
|
|
2646
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2647
|
+
);
|
|
2648
|
+
if (error) {
|
|
2649
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2653
|
+
const {
|
|
2654
|
+
error: warrning,
|
|
2655
|
+
} = PaymentApplicationValidator.linkWallet().validate(
|
|
2656
|
+
{ body },
|
|
2657
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2658
|
+
);
|
|
2659
|
+
if (warrning) {
|
|
2660
|
+
Logger({
|
|
2661
|
+
level: "WARN",
|
|
2662
|
+
message: `Parameter Validation warrnings for application > Payment > linkWallet \n ${warrning}`,
|
|
2663
|
+
});
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
const query_params = {};
|
|
2667
|
+
|
|
2668
|
+
const xHeaders = {};
|
|
2669
|
+
|
|
2670
|
+
const response = await ApplicationAPIClient.execute(
|
|
2671
|
+
this._conf,
|
|
2672
|
+
"post",
|
|
2673
|
+
constructUrl({
|
|
2674
|
+
url: this._urls["linkWallet"],
|
|
2675
|
+
params: {},
|
|
2676
|
+
}),
|
|
2677
|
+
query_params,
|
|
2678
|
+
body,
|
|
2679
|
+
{ ...xHeaders, ...requestHeaders },
|
|
2680
|
+
{ responseHeaders }
|
|
2681
|
+
);
|
|
2682
|
+
|
|
2683
|
+
let responseData = response;
|
|
2684
|
+
if (responseHeaders) {
|
|
2685
|
+
responseData = response[0];
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
const {
|
|
2689
|
+
error: res_error,
|
|
2690
|
+
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
2691
|
+
abortEarly: false,
|
|
2692
|
+
allowUnknown: true,
|
|
2693
|
+
});
|
|
2694
|
+
|
|
2695
|
+
if (res_error) {
|
|
2696
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
2697
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2698
|
+
} else {
|
|
2699
|
+
Logger({
|
|
2700
|
+
level: "WARN",
|
|
2701
|
+
message: `Response Validation Warnings for application > Payment > linkWallet \n ${res_error}`,
|
|
2702
|
+
});
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
return response;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2456
2709
|
/**
|
|
2457
2710
|
* @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
|
|
2458
2711
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3587,6 +3840,84 @@ class Payment {
|
|
|
3587
3840
|
|
|
3588
3841
|
return response;
|
|
3589
3842
|
}
|
|
3843
|
+
|
|
3844
|
+
/**
|
|
3845
|
+
* @param {PaymentApplicationValidator.WalletLinkInitateParam} arg - Arg object.
|
|
3846
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3847
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
3848
|
+
* @returns {Promise<PaymentApplicationModel.WalletResponseSchema>} - Success response
|
|
3849
|
+
* @name walletLinkInitate
|
|
3850
|
+
* @summary: Initiate linking of wallet
|
|
3851
|
+
* @description: It will initiate linking of wallet for the aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/walletLinkInitate/).
|
|
3852
|
+
*/
|
|
3853
|
+
async walletLinkInitate(
|
|
3854
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
3855
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3856
|
+
) {
|
|
3857
|
+
const { error } = PaymentApplicationValidator.walletLinkInitate().validate(
|
|
3858
|
+
{ body },
|
|
3859
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3860
|
+
);
|
|
3861
|
+
if (error) {
|
|
3862
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3865
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3866
|
+
const {
|
|
3867
|
+
error: warrning,
|
|
3868
|
+
} = PaymentApplicationValidator.walletLinkInitate().validate(
|
|
3869
|
+
{ body },
|
|
3870
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3871
|
+
);
|
|
3872
|
+
if (warrning) {
|
|
3873
|
+
Logger({
|
|
3874
|
+
level: "WARN",
|
|
3875
|
+
message: `Parameter Validation warrnings for application > Payment > walletLinkInitate \n ${warrning}`,
|
|
3876
|
+
});
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3879
|
+
const query_params = {};
|
|
3880
|
+
|
|
3881
|
+
const xHeaders = {};
|
|
3882
|
+
|
|
3883
|
+
const response = await ApplicationAPIClient.execute(
|
|
3884
|
+
this._conf,
|
|
3885
|
+
"post",
|
|
3886
|
+
constructUrl({
|
|
3887
|
+
url: this._urls["walletLinkInitate"],
|
|
3888
|
+
params: {},
|
|
3889
|
+
}),
|
|
3890
|
+
query_params,
|
|
3891
|
+
body,
|
|
3892
|
+
{ ...xHeaders, ...requestHeaders },
|
|
3893
|
+
{ responseHeaders }
|
|
3894
|
+
);
|
|
3895
|
+
|
|
3896
|
+
let responseData = response;
|
|
3897
|
+
if (responseHeaders) {
|
|
3898
|
+
responseData = response[0];
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
const {
|
|
3902
|
+
error: res_error,
|
|
3903
|
+
} = PaymentApplicationModel.WalletResponseSchema().validate(responseData, {
|
|
3904
|
+
abortEarly: false,
|
|
3905
|
+
allowUnknown: true,
|
|
3906
|
+
});
|
|
3907
|
+
|
|
3908
|
+
if (res_error) {
|
|
3909
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
3910
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3911
|
+
} else {
|
|
3912
|
+
Logger({
|
|
3913
|
+
level: "WARN",
|
|
3914
|
+
message: `Response Validation Warnings for application > Payment > walletLinkInitate \n ${res_error}`,
|
|
3915
|
+
});
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
return response;
|
|
3920
|
+
}
|
|
3590
3921
|
}
|
|
3591
3922
|
|
|
3592
3923
|
module.exports = Payment;
|