@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.
Files changed (104) hide show
  1. package/documentation/application/CATALOG.md +371 -371
  2. package/documentation/application/ORDER.md +272 -272
  3. package/documentation/application/PAYMENT.md +269 -269
  4. package/documentation/platform/CATALOG.md +1678 -1664
  5. package/documentation/platform/COMPANYPROFILE.md +201 -201
  6. package/documentation/platform/ORDER.md +1442 -1323
  7. package/documentation/platform/PAYMENT.md +88 -88
  8. package/index.js +7 -1
  9. package/package.json +1 -1
  10. package/sdk/application/Cart/CartApplicationClient.js +302 -0
  11. package/sdk/application/Cart/CartApplicationValidator.js +1 -0
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
  16. package/sdk/application/Common/CommonApplicationClient.js +22 -0
  17. package/sdk/application/Common/CommonApplicationValidator.js +1 -0
  18. package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
  19. package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
  20. package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
  21. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  22. package/sdk/application/Content/ContentApplicationClient.js +215 -0
  23. package/sdk/application/Content/ContentApplicationValidator.js +1 -0
  24. package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
  25. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
  26. package/sdk/application/Lead/LeadApplicationClient.js +81 -0
  27. package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
  28. package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
  29. package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
  30. package/sdk/application/Order/OrderApplicationClient.js +146 -0
  31. package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
  32. package/sdk/application/Order/OrderApplicationModel.js +329 -329
  33. package/sdk/application/Order/OrderApplicationValidator.js +1 -0
  34. package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
  35. package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
  36. package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
  37. package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
  38. package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
  39. package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
  40. package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
  41. package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
  42. package/sdk/application/Share/ShareApplicationClient.js +87 -0
  43. package/sdk/application/Share/ShareApplicationValidator.js +1 -0
  44. package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
  45. package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
  46. package/sdk/application/User/UserApplicationClient.js +405 -0
  47. package/sdk/application/User/UserApplicationValidator.js +1 -0
  48. package/sdk/common/AxiosHelper.js +1 -1
  49. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
  51. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
  52. package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
  54. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
  55. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
  56. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
  57. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
  58. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
  59. package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
  60. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
  61. package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
  62. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
  63. package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
  64. package/sdk/platform/Common/CommonPlatformClient.js +26 -0
  65. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
  66. package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
  69. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
  70. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
  71. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
  73. package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
  74. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
  75. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
  76. package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
  77. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
  78. package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
  79. package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
  80. package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
  81. package/sdk/platform/Order/OrderPlatformClient.js +674 -15
  82. package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
  83. package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
  84. package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
  85. package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
  86. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
  87. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
  88. package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
  89. package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
  90. package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
  91. package/sdk/platform/PlatformApplicationClient.js +2514 -2524
  92. package/sdk/platform/PlatformClient.d.ts +2217 -2243
  93. package/sdk/platform/PlatformClient.js +2514 -2524
  94. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
  95. package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
  96. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
  97. package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
  98. package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
  99. package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
  100. package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
  101. package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
  102. package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
  103. package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
  104. 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
- created: Joi.boolean().required(),
12
+ success: Joi.boolean().required(),
13
13
 
14
14
  app_id: Joi.string().allow("").required(),
15
15
 
16
- success: Joi.boolean().required(),
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
- app_id: Joi.string().allow("").required(),
46
+ aggregator_name: PaymentModel.PaymentGatewayConfig(),
47
47
 
48
48
  is_active: Joi.boolean().allow(null),
49
49
 
50
- aggregator_name: PaymentModel.PaymentGatewayConfig(),
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
- logos: PaymentModel.PaymentModeLogo(),
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
- exp_year: Joi.number().allow(null),
109
-
110
- card_reference: Joi.string().allow("").allow(null),
108
+ merchant_code: Joi.string().allow("").allow(null),
111
109
 
112
- intent_app: Joi.array().items(PaymentModel.IntentApp()),
110
+ card_token: Joi.string().allow("").allow(null),
113
111
 
114
- cod_limit: Joi.number().allow(null),
112
+ nickname: Joi.string().allow("").allow(null),
115
113
 
116
- fynd_vpa: Joi.string().allow("").allow(null),
114
+ intent_app: Joi.array().items(PaymentModel.IntentApp()),
117
115
 
118
116
  timeout: Joi.number().allow(null),
119
117
 
120
- aggregator_name: Joi.string().allow("").required(),
118
+ card_isin: Joi.string().allow("").allow(null),
121
119
 
122
- card_issuer: Joi.string().allow("").allow(null),
120
+ intent_flow: Joi.boolean().allow(null),
123
121
 
124
- display_name: Joi.string().allow("").allow(null),
122
+ cod_limit_per_order: Joi.number().allow(null),
125
123
 
126
- name: Joi.string().allow("").allow(null),
124
+ intent_app_error_dict_list: Joi.array().items(
125
+ PaymentModel.IntentAppErrorList()
126
+ ),
127
127
 
128
- card_fingerprint: Joi.string().allow("").allow(null),
128
+ cod_limit: Joi.number().allow(null),
129
129
 
130
- code: Joi.string().allow("").allow(null),
130
+ expired: Joi.boolean().allow(null),
131
131
 
132
- card_brand: Joi.string().allow("").allow(null),
132
+ exp_year: Joi.number().allow(null),
133
133
 
134
- intent_flow: Joi.boolean().allow(null),
134
+ retry_count: Joi.number().allow(null),
135
135
 
136
- display_priority: Joi.number().allow(null),
136
+ card_number: Joi.string().allow("").allow(null),
137
137
 
138
- intent_app_error_list: Joi.array().items(Joi.string().allow("")),
138
+ card_name: Joi.string().allow("").allow(null),
139
139
 
140
- retry_count: Joi.number().allow(null),
140
+ card_brand: Joi.string().allow("").allow(null),
141
141
 
142
- nickname: Joi.string().allow("").allow(null),
142
+ compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
143
143
 
144
- cod_limit_per_order: Joi.number().allow(null),
144
+ code: Joi.string().allow("").allow(null),
145
145
 
146
- card_number: Joi.string().allow("").allow(null),
146
+ aggregator_name: Joi.string().allow("").required(),
147
147
 
148
- card_id: Joi.string().allow("").allow(null),
148
+ card_fingerprint: Joi.string().allow("").allow(null),
149
149
 
150
- card_name: Joi.string().allow("").allow(null),
150
+ card_reference: Joi.string().allow("").allow(null),
151
151
 
152
- remaining_limit: Joi.number().allow(null),
152
+ card_issuer: Joi.string().allow("").allow(null),
153
153
 
154
- card_isin: Joi.string().allow("").allow(null),
154
+ exp_month: Joi.number().allow(null),
155
155
 
156
156
  card_type: Joi.string().allow("").allow(null),
157
157
 
158
- intent_app_error_dict_list: Joi.array().items(
159
- PaymentModel.IntentAppErrorList()
160
- ),
158
+ intent_app_error_list: Joi.array().items(Joi.string().allow("")),
161
159
 
162
- logo_url: PaymentModel.PaymentModeLogo(),
160
+ card_brand_image: Joi.string().allow("").allow(null),
163
161
 
164
- exp_month: Joi.number().allow(null),
162
+ display_priority: Joi.number().allow(null),
165
163
 
166
- card_brand_image: Joi.string().allow("").allow(null),
164
+ remaining_limit: Joi.number().allow(null),
167
165
 
168
- card_token: Joi.string().allow("").allow(null),
166
+ display_name: Joi.string().allow("").allow(null),
169
167
 
170
- compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
168
+ fynd_vpa: Joi.string().allow("").allow(null),
171
169
 
172
- merchant_code: Joi.string().allow("").allow(null),
170
+ logo_url: PaymentModel.PaymentModeLogo(),
173
171
 
174
- expired: Joi.boolean().allow(null),
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
- is_pay_by_card_pl: Joi.boolean().allow(null),
180
+ add_card_enabled: Joi.boolean().allow(null),
181
181
 
182
182
  display_priority: Joi.number().required(),
183
183
 
184
- save_card: Joi.boolean().allow(null),
184
+ anonymous_enable: Joi.boolean().allow(null),
185
185
 
186
- add_card_enabled: Joi.boolean().allow(null),
186
+ save_card: Joi.boolean().allow(null),
187
187
 
188
- list: Joi.array().items(PaymentModel.PaymentModeList()),
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
- anonymous_enable: Joi.boolean().allow(null),
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
- customers: Joi.any().required(),
218
+ is_default: Joi.boolean().required(),
219
219
 
220
220
  transfer_type: Joi.string().allow("").required(),
221
221
 
222
- unique_transfer_no: Joi.any().required(),
222
+ customers: Joi.any().required(),
223
223
 
224
224
  more_attributes: Joi.any().required(),
225
225
 
226
- payouts_aggregators: Joi.array().items(Joi.any()).required(),
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
- account_no: Joi.string().allow(""),
236
+ account_type: Joi.string().allow("").required(),
237
237
 
238
- ifsc_code: Joi.string().allow("").required(),
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
- account_holder: Joi.string().allow(""),
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
- account_type: Joi.string().allow("").required(),
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
- success: Joi.boolean().required(),
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
- is_active: Joi.boolean().required(),
427
-
428
- display_name: Joi.string().allow("").required(),
420
+ email: Joi.string().allow("").required(),
429
421
 
430
- modified_on: Joi.string().allow("").required(),
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
- bank_name: Joi.string().allow("").required(),
428
+ transfer_mode: Joi.string().allow("").required(),
437
429
 
438
- address: Joi.string().allow("").required(),
430
+ mobile: Joi.string().allow(""),
439
431
 
440
- ifsc_code: Joi.string().allow("").required(),
432
+ comment: Joi.string().allow(""),
441
433
 
442
- mobile: Joi.string().allow(""),
434
+ account_no: Joi.string().allow("").required(),
443
435
 
444
- branch_name: Joi.string().allow(""),
436
+ ifsc_code: Joi.string().allow("").required(),
445
437
 
446
438
  subtitle: Joi.string().allow("").required(),
447
439
 
448
- transfer_mode: Joi.string().allow("").required(),
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
- email: Joi.string().allow("").required(),
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