@gofynd/fdk-client-javascript 1.0.0 → 1.0.1
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/CATALOG.md +371 -371
- package/documentation/application/ORDER.md +272 -272
- package/documentation/application/PAYMENT.md +269 -269
- package/documentation/platform/CATALOG.md +1678 -1664
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/ORDER.md +1442 -1323
- package/documentation/platform/PAYMENT.md +88 -88
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +302 -0
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
- package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +22 -0
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +215 -0
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +81 -0
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.js +146 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +329 -329
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +87 -0
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +405 -0
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
- package/sdk/platform/Common/CommonPlatformClient.js +26 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
- package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
- package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
- package/sdk/platform/Order/OrderPlatformClient.js +674 -15
- package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
- package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
- package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
- package/sdk/platform/PlatformApplicationClient.js +2514 -2524
- package/sdk/platform/PlatformClient.d.ts +2217 -2243
- package/sdk/platform/PlatformClient.js +2514 -2524
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -3,17 +3,17 @@ const Joi = require("joi");
|
|
|
3
3
|
class PaymentModel {
|
|
4
4
|
static PaymentGatewayConfigResponse() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
display_fields: Joi.array().items(Joi.string().allow("")).required(),
|
|
7
|
-
|
|
8
6
|
excluded_fields: Joi.array().items(Joi.string().allow("")).required(),
|
|
9
7
|
|
|
8
|
+
created: Joi.boolean().required(),
|
|
9
|
+
|
|
10
10
|
aggregators: Joi.array().items(Joi.any()),
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
success: Joi.boolean().required(),
|
|
13
13
|
|
|
14
14
|
app_id: Joi.string().allow("").required(),
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
display_fields: Joi.array().items(Joi.string().allow("")).required(),
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,33 +21,33 @@ class PaymentModel {
|
|
|
21
21
|
return Joi.object({
|
|
22
22
|
code: Joi.string().allow("").required(),
|
|
23
23
|
|
|
24
|
-
success: Joi.boolean().required(),
|
|
25
|
-
|
|
26
24
|
description: Joi.string().allow("").required(),
|
|
25
|
+
|
|
26
|
+
success: Joi.boolean().required(),
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
static PaymentGatewayConfig() {
|
|
31
31
|
return Joi.object({
|
|
32
|
+
secret: Joi.string().allow("").required(),
|
|
33
|
+
|
|
34
|
+
config_type: Joi.string().allow("").required(),
|
|
35
|
+
|
|
32
36
|
key: Joi.string().allow("").required(),
|
|
33
37
|
|
|
34
38
|
merchant_salt: Joi.string().allow("").required(),
|
|
35
39
|
|
|
36
|
-
secret: Joi.string().allow("").required(),
|
|
37
|
-
|
|
38
40
|
is_active: Joi.boolean().allow(null),
|
|
39
|
-
|
|
40
|
-
config_type: Joi.string().allow("").required(),
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
static PaymentGatewayConfigRequest() {
|
|
45
45
|
return Joi.object({
|
|
46
|
-
|
|
46
|
+
aggregator_name: PaymentModel.PaymentGatewayConfig(),
|
|
47
47
|
|
|
48
48
|
is_active: Joi.boolean().allow(null),
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
app_id: Joi.string().allow("").required(),
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -61,17 +61,17 @@ class PaymentModel {
|
|
|
61
61
|
|
|
62
62
|
static ErrorCodeAndDescription() {
|
|
63
63
|
return Joi.object({
|
|
64
|
-
description: Joi.string().allow("").required(),
|
|
65
|
-
|
|
66
64
|
code: Joi.string().allow("").required(),
|
|
65
|
+
|
|
66
|
+
description: Joi.string().allow("").required(),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
static HttpErrorCodeAndResponse() {
|
|
71
71
|
return Joi.object({
|
|
72
|
-
success: Joi.boolean().required(),
|
|
73
|
-
|
|
74
72
|
error: PaymentModel.ErrorCodeAndDescription().required(),
|
|
73
|
+
|
|
74
|
+
success: Joi.boolean().required(),
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -85,13 +85,13 @@ class PaymentModel {
|
|
|
85
85
|
|
|
86
86
|
static IntentApp() {
|
|
87
87
|
return Joi.object({
|
|
88
|
-
display_name: Joi.string().allow("").allow(null),
|
|
89
|
-
|
|
90
88
|
code: Joi.string().allow("").allow(null),
|
|
91
89
|
|
|
90
|
+
logos: PaymentModel.PaymentModeLogo(),
|
|
91
|
+
|
|
92
92
|
package_name: Joi.string().allow("").allow(null),
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
display_name: Joi.string().allow("").allow(null),
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -105,95 +105,95 @@ class PaymentModel {
|
|
|
105
105
|
|
|
106
106
|
static PaymentModeList() {
|
|
107
107
|
return Joi.object({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
card_reference: Joi.string().allow("").allow(null),
|
|
108
|
+
merchant_code: Joi.string().allow("").allow(null),
|
|
111
109
|
|
|
112
|
-
|
|
110
|
+
card_token: Joi.string().allow("").allow(null),
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
nickname: Joi.string().allow("").allow(null),
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
intent_app: Joi.array().items(PaymentModel.IntentApp()),
|
|
117
115
|
|
|
118
116
|
timeout: Joi.number().allow(null),
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
card_isin: Joi.string().allow("").allow(null),
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
intent_flow: Joi.boolean().allow(null),
|
|
123
121
|
|
|
124
|
-
|
|
122
|
+
cod_limit_per_order: Joi.number().allow(null),
|
|
125
123
|
|
|
126
|
-
|
|
124
|
+
intent_app_error_dict_list: Joi.array().items(
|
|
125
|
+
PaymentModel.IntentAppErrorList()
|
|
126
|
+
),
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
cod_limit: Joi.number().allow(null),
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
expired: Joi.boolean().allow(null),
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
exp_year: Joi.number().allow(null),
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
retry_count: Joi.number().allow(null),
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
card_number: Joi.string().allow("").allow(null),
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
card_name: Joi.string().allow("").allow(null),
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
card_brand: Joi.string().allow("").allow(null),
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
code: Joi.string().allow("").allow(null),
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
aggregator_name: Joi.string().allow("").required(),
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
card_fingerprint: Joi.string().allow("").allow(null),
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
card_reference: Joi.string().allow("").allow(null),
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
card_issuer: Joi.string().allow("").allow(null),
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
exp_month: Joi.number().allow(null),
|
|
155
155
|
|
|
156
156
|
card_type: Joi.string().allow("").allow(null),
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
PaymentModel.IntentAppErrorList()
|
|
160
|
-
),
|
|
158
|
+
intent_app_error_list: Joi.array().items(Joi.string().allow("")),
|
|
161
159
|
|
|
162
|
-
|
|
160
|
+
card_brand_image: Joi.string().allow("").allow(null),
|
|
163
161
|
|
|
164
|
-
|
|
162
|
+
display_priority: Joi.number().allow(null),
|
|
165
163
|
|
|
166
|
-
|
|
164
|
+
remaining_limit: Joi.number().allow(null),
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
display_name: Joi.string().allow("").allow(null),
|
|
169
167
|
|
|
170
|
-
|
|
168
|
+
fynd_vpa: Joi.string().allow("").allow(null),
|
|
171
169
|
|
|
172
|
-
|
|
170
|
+
logo_url: PaymentModel.PaymentModeLogo(),
|
|
173
171
|
|
|
174
|
-
|
|
172
|
+
name: Joi.string().allow("").allow(null),
|
|
173
|
+
|
|
174
|
+
card_id: Joi.string().allow("").allow(null),
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
static RootPaymentMode() {
|
|
179
179
|
return Joi.object({
|
|
180
|
-
|
|
180
|
+
add_card_enabled: Joi.boolean().allow(null),
|
|
181
181
|
|
|
182
182
|
display_priority: Joi.number().required(),
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
anonymous_enable: Joi.boolean().allow(null),
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
save_card: Joi.boolean().allow(null),
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
display_name: Joi.string().allow("").required(),
|
|
189
189
|
|
|
190
190
|
aggregator_name: Joi.string().allow("").allow(null),
|
|
191
191
|
|
|
192
|
-
display_name: Joi.string().allow("").required(),
|
|
193
|
-
|
|
194
192
|
name: Joi.string().allow("").required(),
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
is_pay_by_card_pl: Joi.boolean().allow(null),
|
|
195
|
+
|
|
196
|
+
list: Joi.array().items(PaymentModel.PaymentModeList()),
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -207,49 +207,49 @@ class PaymentModel {
|
|
|
207
207
|
|
|
208
208
|
static PaymentOptionsResponse() {
|
|
209
209
|
return Joi.object({
|
|
210
|
-
success: Joi.boolean().required(),
|
|
211
|
-
|
|
212
210
|
payment_options: PaymentModel.PaymentOptions().required(),
|
|
211
|
+
|
|
212
|
+
success: Joi.boolean().required(),
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
static PayoutsResponse() {
|
|
217
217
|
return Joi.object({
|
|
218
|
-
|
|
218
|
+
is_default: Joi.boolean().required(),
|
|
219
219
|
|
|
220
220
|
transfer_type: Joi.string().allow("").required(),
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
customers: Joi.any().required(),
|
|
223
223
|
|
|
224
224
|
more_attributes: Joi.any().required(),
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
is_default: Joi.boolean().required(),
|
|
226
|
+
unique_transfer_no: Joi.any().required(),
|
|
229
227
|
|
|
230
228
|
is_active: Joi.boolean().required(),
|
|
229
|
+
|
|
230
|
+
payouts_aggregators: Joi.array().items(Joi.any()).required(),
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
static PayoutBankDetails() {
|
|
235
235
|
return Joi.object({
|
|
236
|
-
|
|
236
|
+
account_type: Joi.string().allow("").required(),
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
city: Joi.string().allow(""),
|
|
239
239
|
|
|
240
240
|
country: Joi.string().allow(""),
|
|
241
241
|
|
|
242
|
+
account_holder: Joi.string().allow(""),
|
|
243
|
+
|
|
242
244
|
state: Joi.string().allow(""),
|
|
243
245
|
|
|
244
|
-
|
|
246
|
+
account_no: Joi.string().allow(""),
|
|
245
247
|
|
|
246
248
|
pincode: Joi.number(),
|
|
247
249
|
|
|
248
|
-
city: Joi.string().allow(""),
|
|
249
|
-
|
|
250
250
|
branch_name: Joi.string().allow(""),
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
253
253
|
|
|
254
254
|
bank_name: Joi.string().allow(""),
|
|
255
255
|
});
|
|
@@ -257,38 +257,38 @@ class PaymentModel {
|
|
|
257
257
|
|
|
258
258
|
static PayoutRequest() {
|
|
259
259
|
return Joi.object({
|
|
260
|
+
unique_external_id: Joi.string().allow("").required(),
|
|
261
|
+
|
|
262
|
+
users: Joi.any().required(),
|
|
263
|
+
|
|
260
264
|
transfer_type: Joi.string().allow("").required(),
|
|
261
265
|
|
|
262
266
|
aggregator: Joi.string().allow("").required(),
|
|
263
267
|
|
|
264
268
|
bank_details: PaymentModel.PayoutBankDetails().required(),
|
|
265
269
|
|
|
266
|
-
users: Joi.any().required(),
|
|
267
|
-
|
|
268
270
|
is_active: Joi.boolean().required(),
|
|
269
|
-
|
|
270
|
-
unique_external_id: Joi.string().allow("").required(),
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
static PayoutResponse() {
|
|
275
275
|
return Joi.object({
|
|
276
|
+
payment_status: Joi.string().allow("").required(),
|
|
277
|
+
|
|
276
278
|
payouts: Joi.any().required(),
|
|
277
279
|
|
|
280
|
+
users: Joi.any().required(),
|
|
281
|
+
|
|
278
282
|
transfer_type: Joi.string().allow("").required(),
|
|
279
283
|
|
|
284
|
+
created: Joi.boolean().required(),
|
|
285
|
+
|
|
280
286
|
aggregator: Joi.string().allow("").required(),
|
|
281
287
|
|
|
282
288
|
unique_transfer_no: Joi.string().allow("").required(),
|
|
283
289
|
|
|
284
|
-
created: Joi.boolean().required(),
|
|
285
|
-
|
|
286
|
-
payment_status: Joi.string().allow("").required(),
|
|
287
|
-
|
|
288
290
|
bank_details: Joi.any().required(),
|
|
289
291
|
|
|
290
|
-
users: Joi.any().required(),
|
|
291
|
-
|
|
292
292
|
is_active: Joi.boolean().required(),
|
|
293
293
|
|
|
294
294
|
success: Joi.boolean().required(),
|
|
@@ -307,11 +307,11 @@ class PaymentModel {
|
|
|
307
307
|
|
|
308
308
|
static UpdatePayoutRequest() {
|
|
309
309
|
return Joi.object({
|
|
310
|
+
unique_external_id: Joi.string().allow("").required(),
|
|
311
|
+
|
|
310
312
|
is_default: Joi.boolean().required(),
|
|
311
313
|
|
|
312
314
|
is_active: Joi.boolean().required(),
|
|
313
|
-
|
|
314
|
-
unique_external_id: Joi.string().allow("").required(),
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
|
|
@@ -323,9 +323,9 @@ class PaymentModel {
|
|
|
323
323
|
|
|
324
324
|
static SubscriptionPaymentMethodResponse() {
|
|
325
325
|
return Joi.object({
|
|
326
|
-
success: Joi.boolean().required(),
|
|
327
|
-
|
|
328
326
|
data: Joi.array().items(Joi.any()).required(),
|
|
327
|
+
|
|
328
|
+
success: Joi.boolean().required(),
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -339,9 +339,9 @@ class PaymentModel {
|
|
|
339
339
|
return Joi.object({
|
|
340
340
|
aggregator: Joi.string().allow("").required(),
|
|
341
341
|
|
|
342
|
-
success: Joi.boolean().required(),
|
|
343
|
-
|
|
344
342
|
config: Joi.any().required(),
|
|
343
|
+
|
|
344
|
+
success: Joi.boolean().required(),
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
|
|
@@ -353,21 +353,21 @@ class PaymentModel {
|
|
|
353
353
|
|
|
354
354
|
static SaveSubscriptionSetupIntentResponse() {
|
|
355
355
|
return Joi.object({
|
|
356
|
-
success: Joi.boolean().required(),
|
|
357
|
-
|
|
358
356
|
data: Joi.any().required(),
|
|
357
|
+
|
|
358
|
+
success: Joi.boolean().required(),
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
static RefundAccountResponse() {
|
|
363
363
|
return Joi.object({
|
|
364
|
-
message: Joi.string().allow("").required(),
|
|
365
|
-
|
|
366
364
|
is_verified_flag: Joi.boolean(),
|
|
367
365
|
|
|
368
|
-
|
|
366
|
+
message: Joi.string().allow("").required(),
|
|
369
367
|
|
|
370
368
|
data: Joi.any(),
|
|
369
|
+
|
|
370
|
+
success: Joi.boolean().required(),
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
|
|
@@ -375,22 +375,22 @@ class PaymentModel {
|
|
|
375
375
|
return Joi.object({
|
|
376
376
|
code: Joi.string().allow("").required(),
|
|
377
377
|
|
|
378
|
-
success: Joi.boolean().required(),
|
|
379
|
-
|
|
380
378
|
description: Joi.string().allow("").required(),
|
|
379
|
+
|
|
380
|
+
success: Joi.boolean().required(),
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
static BankDetailsForOTP() {
|
|
385
385
|
return Joi.object({
|
|
386
|
-
account_no: Joi.string().allow("").required(),
|
|
387
|
-
|
|
388
|
-
ifsc_code: Joi.string().allow("").required(),
|
|
389
|
-
|
|
390
386
|
account_holder: Joi.string().allow("").required(),
|
|
391
387
|
|
|
388
|
+
account_no: Joi.string().allow("").required(),
|
|
389
|
+
|
|
392
390
|
branch_name: Joi.string().allow("").required(),
|
|
393
391
|
|
|
392
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
393
|
+
|
|
394
394
|
bank_name: Joi.string().allow("").required(),
|
|
395
395
|
});
|
|
396
396
|
}
|
|
@@ -405,53 +405,53 @@ class PaymentModel {
|
|
|
405
405
|
|
|
406
406
|
static IfscCodeResponse() {
|
|
407
407
|
return Joi.object({
|
|
408
|
+
bank_name: Joi.string().allow("").required(),
|
|
409
|
+
|
|
408
410
|
branch_name: Joi.string().allow("").required(),
|
|
409
411
|
|
|
410
412
|
success: Joi.boolean(),
|
|
411
|
-
|
|
412
|
-
bank_name: Joi.string().allow("").required(),
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
static OrderBeneficiaryDetails() {
|
|
417
417
|
return Joi.object({
|
|
418
|
-
account_no: Joi.string().allow("").required(),
|
|
419
|
-
|
|
420
|
-
beneficiary_id: Joi.string().allow("").required(),
|
|
421
|
-
|
|
422
|
-
account_holder: Joi.string().allow("").required(),
|
|
423
|
-
|
|
424
418
|
title: Joi.string().allow("").required(),
|
|
425
419
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
display_name: Joi.string().allow("").required(),
|
|
420
|
+
email: Joi.string().allow("").required(),
|
|
429
421
|
|
|
430
|
-
|
|
422
|
+
beneficiary_id: Joi.string().allow("").required(),
|
|
431
423
|
|
|
432
424
|
id: Joi.number().required(),
|
|
433
425
|
|
|
434
426
|
delights_user_name: Joi.string().allow("").allow(null),
|
|
435
427
|
|
|
436
|
-
|
|
428
|
+
transfer_mode: Joi.string().allow("").required(),
|
|
437
429
|
|
|
438
|
-
|
|
430
|
+
mobile: Joi.string().allow(""),
|
|
439
431
|
|
|
440
|
-
|
|
432
|
+
comment: Joi.string().allow(""),
|
|
441
433
|
|
|
442
|
-
|
|
434
|
+
account_no: Joi.string().allow("").required(),
|
|
443
435
|
|
|
444
|
-
|
|
436
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
445
437
|
|
|
446
438
|
subtitle: Joi.string().allow("").required(),
|
|
447
439
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
comment: Joi.string().allow(""),
|
|
440
|
+
account_holder: Joi.string().allow("").required(),
|
|
451
441
|
|
|
452
442
|
created_on: Joi.string().allow("").required(),
|
|
453
443
|
|
|
454
|
-
|
|
444
|
+
display_name: Joi.string().allow("").required(),
|
|
445
|
+
|
|
446
|
+
address: Joi.string().allow("").required(),
|
|
447
|
+
|
|
448
|
+
modified_on: Joi.string().allow("").required(),
|
|
449
|
+
|
|
450
|
+
branch_name: Joi.string().allow(""),
|
|
451
|
+
|
|
452
|
+
is_active: Joi.boolean().required(),
|
|
453
|
+
|
|
454
|
+
bank_name: Joi.string().allow("").required(),
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
|
|
@@ -465,61 +465,61 @@ class PaymentModel {
|
|
|
465
465
|
|
|
466
466
|
static MultiTenderPaymentMeta() {
|
|
467
467
|
return Joi.object({
|
|
468
|
-
payment_id: Joi.string().allow(""),
|
|
469
|
-
|
|
470
468
|
extra_meta: Joi.any().allow(null),
|
|
471
469
|
|
|
472
|
-
payment_gateway: Joi.string().allow(""),
|
|
473
|
-
|
|
474
470
|
order_id: Joi.string().allow(""),
|
|
475
471
|
|
|
472
|
+
payment_id: Joi.string().allow(""),
|
|
473
|
+
|
|
476
474
|
current_status: Joi.string().allow(""),
|
|
475
|
+
|
|
476
|
+
payment_gateway: Joi.string().allow(""),
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
static MultiTenderPaymentMethod() {
|
|
481
481
|
return Joi.object({
|
|
482
|
+
name: Joi.string().allow(""),
|
|
483
|
+
|
|
482
484
|
meta: PaymentModel.MultiTenderPaymentMeta(),
|
|
483
485
|
|
|
484
486
|
amount: Joi.number().required(),
|
|
485
487
|
|
|
486
|
-
name: Joi.string().allow(""),
|
|
487
|
-
|
|
488
488
|
mode: Joi.string().allow("").required(),
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
static PaymentConfirmationRequest() {
|
|
493
493
|
return Joi.object({
|
|
494
|
-
order_id: Joi.string().allow("").required(),
|
|
495
|
-
|
|
496
494
|
payment_methods: Joi.array()
|
|
497
495
|
.items(PaymentModel.MultiTenderPaymentMethod())
|
|
498
496
|
.required(),
|
|
497
|
+
|
|
498
|
+
order_id: Joi.string().allow("").required(),
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
static PaymentConfirmationResponse() {
|
|
503
503
|
return Joi.object({
|
|
504
|
-
message: Joi.string().allow("").required(),
|
|
505
|
-
|
|
506
504
|
order_id: Joi.string().allow("").required(),
|
|
507
505
|
|
|
506
|
+
message: Joi.string().allow("").required(),
|
|
507
|
+
|
|
508
508
|
success: Joi.boolean().required(),
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
static CODdata() {
|
|
513
513
|
return Joi.object({
|
|
514
|
-
limit: Joi.number().required(),
|
|
515
|
-
|
|
516
514
|
user_id: Joi.string().allow("").required(),
|
|
517
515
|
|
|
518
|
-
remaining_limit: Joi.number().required(),
|
|
519
|
-
|
|
520
516
|
usages: Joi.number().required(),
|
|
521
517
|
|
|
518
|
+
remaining_limit: Joi.number().required(),
|
|
519
|
+
|
|
522
520
|
is_active: Joi.boolean().required(),
|
|
521
|
+
|
|
522
|
+
limit: Joi.number().required(),
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
|
|
@@ -535,9 +535,9 @@ class PaymentModel {
|
|
|
535
535
|
return Joi.object({
|
|
536
536
|
mobileno: Joi.string().allow("").required(),
|
|
537
537
|
|
|
538
|
-
is_active: Joi.boolean().required(),
|
|
539
|
-
|
|
540
538
|
merchant_user_id: Joi.string().allow("").required(),
|
|
539
|
+
|
|
540
|
+
is_active: Joi.boolean().required(),
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
|