@gofynd/fdk-client-javascript 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
- package/sdk/platform/Cart/CartPlatformModel.js +580 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
- package/sdk/platform/Order/OrderPlatformClient.js +541 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
- package/sdk/platform/PlatformApplicationClient.js +1259 -1035
- package/sdk/platform/PlatformClient.d.ts +9888 -8286
- package/sdk/platform/PlatformClient.js +10960 -9038
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -16,6 +16,18 @@ class PaymentModel {
|
|
|
16
16
|
ifsc_code: Joi.string().allow("").required(),
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
+
static CancelOrResendPaymentLinkRequest() {
|
|
20
|
+
return Joi.object({
|
|
21
|
+
payment_link_id: Joi.string().allow("").required(),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
static CancelPaymentLinkResponse() {
|
|
25
|
+
return Joi.object({
|
|
26
|
+
message: Joi.string().allow("").required(),
|
|
27
|
+
status_code: Joi.number().required(),
|
|
28
|
+
success: Joi.boolean().required(),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
19
31
|
static CODdata() {
|
|
20
32
|
return Joi.object({
|
|
21
33
|
is_active: Joi.boolean().required(),
|
|
@@ -25,6 +37,42 @@ class PaymentModel {
|
|
|
25
37
|
user_id: Joi.string().allow("").required(),
|
|
26
38
|
});
|
|
27
39
|
}
|
|
40
|
+
static Code() {
|
|
41
|
+
return Joi.object({
|
|
42
|
+
code: Joi.string().allow("").required(),
|
|
43
|
+
merchant_code: Joi.string().allow("").required(),
|
|
44
|
+
name: Joi.string().allow("").required(),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
static CreatePaymentLinkMeta() {
|
|
48
|
+
return Joi.object({
|
|
49
|
+
amount: Joi.string().allow("").required(),
|
|
50
|
+
assign_card_id: Joi.string().allow("").allow(null),
|
|
51
|
+
cart_id: Joi.string().allow("").required(),
|
|
52
|
+
checkout_mode: Joi.string().allow("").required(),
|
|
53
|
+
pincode: Joi.string().allow("").required(),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
static CreatePaymentLinkRequest() {
|
|
57
|
+
return Joi.object({
|
|
58
|
+
amount: Joi.number().required(),
|
|
59
|
+
description: Joi.string().allow("").allow(null),
|
|
60
|
+
email: Joi.string().allow("").required(),
|
|
61
|
+
external_order_id: Joi.string().allow("").required(),
|
|
62
|
+
meta: PaymentModel.CreatePaymentLinkMeta().required(),
|
|
63
|
+
mobile_number: Joi.string().allow("").required(),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
static CreatePaymentLinkResponse() {
|
|
67
|
+
return Joi.object({
|
|
68
|
+
message: Joi.string().allow("").required(),
|
|
69
|
+
payment_link_id: Joi.string().allow("").allow(null),
|
|
70
|
+
payment_link_url: Joi.string().allow("").allow(null),
|
|
71
|
+
polling_timeout: Joi.number().allow(null),
|
|
72
|
+
status_code: Joi.number().required(),
|
|
73
|
+
success: Joi.boolean().required(),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
28
76
|
static DeletePayoutResponse() {
|
|
29
77
|
return Joi.object({
|
|
30
78
|
success: Joi.boolean().required(),
|
|
@@ -35,6 +83,85 @@ class PaymentModel {
|
|
|
35
83
|
success: Joi.boolean().required(),
|
|
36
84
|
});
|
|
37
85
|
}
|
|
86
|
+
static EdcAddRequest() {
|
|
87
|
+
return Joi.object({
|
|
88
|
+
aggregator_id: Joi.number().required(),
|
|
89
|
+
device_tag: Joi.string().allow("").allow(null),
|
|
90
|
+
edc_device_serial_no: Joi.string().allow("").required(),
|
|
91
|
+
edc_model: Joi.string().allow("").required(),
|
|
92
|
+
store_id: Joi.number().required(),
|
|
93
|
+
terminal_serial_no: Joi.string().allow("").required(),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
static EdcAggregatorAndModelListResponse() {
|
|
97
|
+
return Joi.object({
|
|
98
|
+
data: Joi.array().items(PaymentModel.EdcModelData()).required(),
|
|
99
|
+
success: Joi.boolean().required(),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
static EdcDevice() {
|
|
103
|
+
return Joi.object({
|
|
104
|
+
aggregator_id: Joi.number().required(),
|
|
105
|
+
aggregator_name: Joi.string().allow(""),
|
|
106
|
+
application_id: Joi.string().allow("").required(),
|
|
107
|
+
device_tag: Joi.string().allow("").required(),
|
|
108
|
+
edc_device_serial_no: Joi.string().allow("").required(),
|
|
109
|
+
edc_model: Joi.string().allow(""),
|
|
110
|
+
is_active: Joi.boolean().required(),
|
|
111
|
+
merchant_store_pos_code: Joi.string().allow("").allow(null),
|
|
112
|
+
store_id: Joi.number().required(),
|
|
113
|
+
terminal_serial_no: Joi.string().allow("").required(),
|
|
114
|
+
terminal_unique_identifier: Joi.string().allow("").required(),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
static EdcDeviceAddResponse() {
|
|
118
|
+
return Joi.object({
|
|
119
|
+
data: PaymentModel.EdcDevice().required(),
|
|
120
|
+
success: Joi.boolean().required(),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
static EdcDeviceDetailsResponse() {
|
|
124
|
+
return Joi.object({
|
|
125
|
+
data: PaymentModel.EdcDevice().required(),
|
|
126
|
+
success: Joi.boolean().required(),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
static EdcDeviceListResponse() {
|
|
130
|
+
return Joi.object({
|
|
131
|
+
items: Joi.array().items(PaymentModel.EdcDevice()).required(),
|
|
132
|
+
page: PaymentModel.Page().required(),
|
|
133
|
+
success: Joi.boolean().required(),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
static EdcDeviceStatsResponse() {
|
|
137
|
+
return Joi.object({
|
|
138
|
+
statistics: PaymentModel.StatisticsData().required(),
|
|
139
|
+
success: Joi.boolean().required(),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
static EdcDeviceUpdateResponse() {
|
|
143
|
+
return Joi.object({
|
|
144
|
+
success: Joi.boolean().required(),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
static EdcModelData() {
|
|
148
|
+
return Joi.object({
|
|
149
|
+
aggregator: Joi.string().allow("").required(),
|
|
150
|
+
aggregator_id: Joi.number().required(),
|
|
151
|
+
models: Joi.array().items(Joi.string().allow("")).required(),
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
static EdcUpdateRequest() {
|
|
155
|
+
return Joi.object({
|
|
156
|
+
aggregator_id: Joi.number(),
|
|
157
|
+
device_tag: Joi.string().allow("").allow(null),
|
|
158
|
+
edc_device_serial_no: Joi.string().allow(""),
|
|
159
|
+
edc_model: Joi.string().allow(""),
|
|
160
|
+
is_active: Joi.boolean(),
|
|
161
|
+
merchant_store_pos_code: Joi.string().allow(""),
|
|
162
|
+
store_id: Joi.number(),
|
|
163
|
+
});
|
|
164
|
+
}
|
|
38
165
|
static ErrorCodeAndDescription() {
|
|
39
166
|
return Joi.object({
|
|
40
167
|
code: Joi.string().allow("").required(),
|
|
@@ -48,12 +175,56 @@ class PaymentModel {
|
|
|
48
175
|
success: Joi.boolean().required(),
|
|
49
176
|
});
|
|
50
177
|
}
|
|
178
|
+
static ErrorDescription() {
|
|
179
|
+
return Joi.object({
|
|
180
|
+
amount: Joi.number().allow(null),
|
|
181
|
+
cancelled: Joi.boolean().allow(null),
|
|
182
|
+
expired: Joi.boolean().allow(null),
|
|
183
|
+
invalid_id: Joi.boolean().allow(null),
|
|
184
|
+
merchant_name: Joi.string().allow("").allow(null),
|
|
185
|
+
merchant_order_id: Joi.string().allow("").allow(null),
|
|
186
|
+
msg: Joi.string().allow("").allow(null),
|
|
187
|
+
payment_transaction_id: Joi.string().allow("").allow(null),
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
static ErrorResponse() {
|
|
191
|
+
return Joi.object({
|
|
192
|
+
error: PaymentModel.ErrorDescription(),
|
|
193
|
+
message: Joi.string().allow("").required(),
|
|
194
|
+
status_code: Joi.number().required(),
|
|
195
|
+
success: Joi.boolean().required(),
|
|
196
|
+
});
|
|
197
|
+
}
|
|
51
198
|
static GetOauthUrlResponse() {
|
|
52
199
|
return Joi.object({
|
|
53
200
|
success: Joi.boolean().required(),
|
|
54
201
|
url: Joi.string().allow("").required(),
|
|
55
202
|
});
|
|
56
203
|
}
|
|
204
|
+
static GetPaymentCode() {
|
|
205
|
+
return Joi.object({
|
|
206
|
+
method_code: PaymentModel.PaymentCode().required(),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
static GetPaymentCodeResponse() {
|
|
210
|
+
return Joi.object({
|
|
211
|
+
data: PaymentModel.GetPaymentCode().required(),
|
|
212
|
+
success: Joi.boolean().required(),
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
static GetPaymentLinkResponse() {
|
|
216
|
+
return Joi.object({
|
|
217
|
+
amount: Joi.number().allow(null),
|
|
218
|
+
external_order_id: Joi.string().allow("").allow(null),
|
|
219
|
+
merchant_name: Joi.string().allow("").allow(null),
|
|
220
|
+
message: Joi.string().allow("").required(),
|
|
221
|
+
payment_link_current_status: Joi.string().allow("").allow(null),
|
|
222
|
+
payment_link_url: Joi.string().allow("").allow(null),
|
|
223
|
+
polling_timeout: Joi.number().allow(null),
|
|
224
|
+
status_code: Joi.number().required(),
|
|
225
|
+
success: Joi.boolean().required(),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
57
228
|
static GetUserCODLimitResponse() {
|
|
58
229
|
return Joi.object({
|
|
59
230
|
success: Joi.boolean().required(),
|
|
@@ -87,6 +258,27 @@ class PaymentModel {
|
|
|
87
258
|
package_name: Joi.string().allow("").allow(null),
|
|
88
259
|
});
|
|
89
260
|
}
|
|
261
|
+
static LinkStatus() {
|
|
262
|
+
return Joi.object({
|
|
263
|
+
message: Joi.string().allow("").required(),
|
|
264
|
+
status: Joi.boolean().required(),
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
static MerchantOnBoardingRequest() {
|
|
268
|
+
return Joi.object({
|
|
269
|
+
aggregator: Joi.string().allow("").required(),
|
|
270
|
+
app_id: Joi.string().allow("").required(),
|
|
271
|
+
credit_line_id: Joi.string().allow("").required(),
|
|
272
|
+
status: Joi.string().allow("").required(),
|
|
273
|
+
user_id: Joi.string().allow("").required(),
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
static MerchantOnBoardingResponse() {
|
|
277
|
+
return Joi.object({
|
|
278
|
+
data: Joi.any().required(),
|
|
279
|
+
success: Joi.boolean().required(),
|
|
280
|
+
});
|
|
281
|
+
}
|
|
90
282
|
static MultiTenderPaymentMeta() {
|
|
91
283
|
return Joi.object({
|
|
92
284
|
current_status: Joi.string().allow(""),
|
|
@@ -140,6 +332,25 @@ class PaymentModel {
|
|
|
140
332
|
show_beneficiary_details: Joi.boolean(),
|
|
141
333
|
});
|
|
142
334
|
}
|
|
335
|
+
static Page() {
|
|
336
|
+
return Joi.object({
|
|
337
|
+
current: Joi.number(),
|
|
338
|
+
has_next: Joi.boolean(),
|
|
339
|
+
has_previous: Joi.boolean(),
|
|
340
|
+
item_total: Joi.number(),
|
|
341
|
+
next_id: Joi.string().allow(""),
|
|
342
|
+
size: Joi.number(),
|
|
343
|
+
type: Joi.string().allow("").required(),
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
static PaymentCode() {
|
|
347
|
+
return Joi.object({
|
|
348
|
+
codes: PaymentModel.Code().required(),
|
|
349
|
+
name: Joi.string().allow("").required(),
|
|
350
|
+
networks: Joi.string().allow("").required(),
|
|
351
|
+
types: Joi.string().allow("").required(),
|
|
352
|
+
});
|
|
353
|
+
}
|
|
143
354
|
static PaymentConfirmationRequest() {
|
|
144
355
|
return Joi.object({
|
|
145
356
|
order_id: Joi.string().allow("").required(),
|
|
@@ -187,6 +398,44 @@ class PaymentModel {
|
|
|
187
398
|
success: Joi.boolean().required(),
|
|
188
399
|
});
|
|
189
400
|
}
|
|
401
|
+
static PaymentInitializationRequest() {
|
|
402
|
+
return Joi.object({
|
|
403
|
+
aggregator: Joi.string().allow("").required(),
|
|
404
|
+
amount: Joi.number().allow(null).required(),
|
|
405
|
+
contact: Joi.string().allow("").required(),
|
|
406
|
+
currency: Joi.string().allow("").required(),
|
|
407
|
+
customer_id: Joi.string().allow("").required(),
|
|
408
|
+
device_id: Joi.string().allow("").allow(null),
|
|
409
|
+
email: Joi.string().allow("").required(),
|
|
410
|
+
merchant_order_id: Joi.string().allow("").required(),
|
|
411
|
+
method: Joi.string().allow("").required(),
|
|
412
|
+
order_id: Joi.string().allow("").required(),
|
|
413
|
+
razorpay_payment_id: Joi.string().allow("").allow(null),
|
|
414
|
+
timeout: Joi.number().allow(null),
|
|
415
|
+
vpa: Joi.string().allow("").allow(null),
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
static PaymentInitializationResponse() {
|
|
419
|
+
return Joi.object({
|
|
420
|
+
aggregator: Joi.string().allow("").required(),
|
|
421
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
422
|
+
amount: Joi.number().allow(null),
|
|
423
|
+
bqr_image: Joi.string().allow("").allow(null),
|
|
424
|
+
currency: Joi.string().allow("").allow(null),
|
|
425
|
+
customer_id: Joi.string().allow("").allow(null),
|
|
426
|
+
device_id: Joi.string().allow("").allow(null),
|
|
427
|
+
merchant_order_id: Joi.string().allow("").required(),
|
|
428
|
+
method: Joi.string().allow("").required(),
|
|
429
|
+
polling_url: Joi.string().allow("").required(),
|
|
430
|
+
razorpay_payment_id: Joi.string().allow("").allow(null),
|
|
431
|
+
status: Joi.string().allow(""),
|
|
432
|
+
success: Joi.boolean().required(),
|
|
433
|
+
timeout: Joi.number().allow(null),
|
|
434
|
+
upi_poll_url: Joi.string().allow("").allow(null),
|
|
435
|
+
virtual_id: Joi.string().allow("").allow(null),
|
|
436
|
+
vpa: Joi.string().allow("").allow(null),
|
|
437
|
+
});
|
|
438
|
+
}
|
|
190
439
|
static PaymentModeList() {
|
|
191
440
|
return Joi.object({
|
|
192
441
|
aggregator_name: Joi.string().allow("").required(),
|
|
@@ -232,6 +481,28 @@ class PaymentModel {
|
|
|
232
481
|
small: Joi.string().allow("").required(),
|
|
233
482
|
});
|
|
234
483
|
}
|
|
484
|
+
static PaymentObjectListSerializer() {
|
|
485
|
+
return Joi.object({
|
|
486
|
+
aggregator_payment_object: Joi.any().allow(null),
|
|
487
|
+
all_status: Joi.array().items(Joi.string().allow("")).required(),
|
|
488
|
+
amount_in_paisa: Joi.string().allow("").required(),
|
|
489
|
+
application_id: Joi.string().allow("").required(),
|
|
490
|
+
collected_by: Joi.string().allow("").required(),
|
|
491
|
+
company_id: Joi.string().allow("").required(),
|
|
492
|
+
created_on: Joi.string().allow("").required(),
|
|
493
|
+
currency: Joi.string().allow("").required(),
|
|
494
|
+
current_status: Joi.string().allow("").required(),
|
|
495
|
+
id: Joi.string().allow("").required(),
|
|
496
|
+
modified_on: Joi.string().allow("").required(),
|
|
497
|
+
payment_gateway: Joi.string().allow("").required(),
|
|
498
|
+
payment_id: Joi.string().allow("").allow(null),
|
|
499
|
+
payment_mode: Joi.string().allow("").required(),
|
|
500
|
+
payment_mode_identifier: Joi.string().allow("").required(),
|
|
501
|
+
refund_object: Joi.any().allow(null),
|
|
502
|
+
refunded_by: Joi.string().allow("").required(),
|
|
503
|
+
user_object: Joi.any().required(),
|
|
504
|
+
});
|
|
505
|
+
}
|
|
235
506
|
static PaymentOptions() {
|
|
236
507
|
return Joi.object({
|
|
237
508
|
payment_option: Joi.array()
|
|
@@ -245,6 +516,54 @@ class PaymentModel {
|
|
|
245
516
|
success: Joi.boolean().required(),
|
|
246
517
|
});
|
|
247
518
|
}
|
|
519
|
+
static PaymentStatusBulkHandlerRequest() {
|
|
520
|
+
return Joi.object({
|
|
521
|
+
merchant_order_id: Joi.array().items(Joi.string().allow("")).required(),
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
static PaymentStatusBulkHandlerResponse() {
|
|
525
|
+
return Joi.object({
|
|
526
|
+
count: Joi.number(),
|
|
527
|
+
data: Joi.array().items(PaymentModel.PaymentStatusObject()),
|
|
528
|
+
error: Joi.string().allow(""),
|
|
529
|
+
status: Joi.number().required(),
|
|
530
|
+
success: Joi.string().allow("").required(),
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
static PaymentStatusObject() {
|
|
534
|
+
return Joi.object({
|
|
535
|
+
merchant_order_id: Joi.string().allow("").required(),
|
|
536
|
+
payment_object_list: Joi.array().items(
|
|
537
|
+
PaymentModel.PaymentObjectListSerializer()
|
|
538
|
+
),
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
static PaymentStatusUpdateRequest() {
|
|
542
|
+
return Joi.object({
|
|
543
|
+
aggregator: Joi.string().allow("").required(),
|
|
544
|
+
amount: Joi.number().allow(null).required(),
|
|
545
|
+
contact: Joi.string().allow("").required(),
|
|
546
|
+
currency: Joi.string().allow("").required(),
|
|
547
|
+
customer_id: Joi.string().allow("").required(),
|
|
548
|
+
device_id: Joi.string().allow("").allow(null),
|
|
549
|
+
email: Joi.string().allow("").required(),
|
|
550
|
+
merchant_order_id: Joi.string().allow("").required(),
|
|
551
|
+
merchant_transaction_id: Joi.string().allow("").required(),
|
|
552
|
+
method: Joi.string().allow("").required(),
|
|
553
|
+
order_id: Joi.string().allow("").required(),
|
|
554
|
+
status: Joi.string().allow("").required(),
|
|
555
|
+
vpa: Joi.string().allow(""),
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
static PaymentStatusUpdateResponse() {
|
|
559
|
+
return Joi.object({
|
|
560
|
+
aggregator_name: Joi.string().allow("").required(),
|
|
561
|
+
redirect_url: Joi.string().allow("").allow(null),
|
|
562
|
+
retry: Joi.boolean().required(),
|
|
563
|
+
status: Joi.string().allow("").required(),
|
|
564
|
+
success: Joi.boolean().allow(null),
|
|
565
|
+
});
|
|
566
|
+
}
|
|
248
567
|
static PayoutBankDetails() {
|
|
249
568
|
return Joi.object({
|
|
250
569
|
account_holder: Joi.string().allow(""),
|
|
@@ -294,6 +613,20 @@ class PaymentModel {
|
|
|
294
613
|
unique_transfer_no: Joi.any().required(),
|
|
295
614
|
});
|
|
296
615
|
}
|
|
616
|
+
static PollingPaymentLinkResponse() {
|
|
617
|
+
return Joi.object({
|
|
618
|
+
aggregator_name: Joi.string().allow("").allow(null),
|
|
619
|
+
amount: Joi.number().allow(null),
|
|
620
|
+
http_status: Joi.number().allow(null),
|
|
621
|
+
message: Joi.string().allow("").allow(null),
|
|
622
|
+
order_id: Joi.string().allow("").allow(null),
|
|
623
|
+
payment_link_id: Joi.string().allow("").allow(null),
|
|
624
|
+
redirect_url: Joi.string().allow("").allow(null),
|
|
625
|
+
status: Joi.string().allow("").allow(null),
|
|
626
|
+
status_code: Joi.number().allow(null),
|
|
627
|
+
success: Joi.boolean().allow(null),
|
|
628
|
+
});
|
|
629
|
+
}
|
|
297
630
|
static RefundAccountResponse() {
|
|
298
631
|
return Joi.object({
|
|
299
632
|
data: Joi.any(),
|
|
@@ -302,6 +635,58 @@ class PaymentModel {
|
|
|
302
635
|
success: Joi.boolean().required(),
|
|
303
636
|
});
|
|
304
637
|
}
|
|
638
|
+
static RepaymentDetailsSerialiserPayAll() {
|
|
639
|
+
return Joi.object({
|
|
640
|
+
aggregator_order_id: Joi.string().allow("").required(),
|
|
641
|
+
aggregator_transaction_id: Joi.string().allow("").required(),
|
|
642
|
+
extension_order_id: Joi.string().allow("").allow(null).required(),
|
|
643
|
+
shipment_details: Joi.array().items(
|
|
644
|
+
PaymentModel.RepaymentRequestDetails()
|
|
645
|
+
),
|
|
646
|
+
total_amount: Joi.number().required(),
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
static RepaymentRequestDetails() {
|
|
650
|
+
return Joi.object({
|
|
651
|
+
aggregator: Joi.string().allow("").required(),
|
|
652
|
+
aggregator_order_id: Joi.string().allow("").required(),
|
|
653
|
+
aggregator_transaction_id: Joi.string().allow("").required(),
|
|
654
|
+
amount: Joi.number().required(),
|
|
655
|
+
current_status: Joi.string().allow("").required(),
|
|
656
|
+
fwd_shipment_id: Joi.string().allow("").required(),
|
|
657
|
+
merchant_order_id: Joi.string().allow("").required(),
|
|
658
|
+
outstanding_details_id: Joi.number().required(),
|
|
659
|
+
payment_mode: Joi.string().allow("").required(),
|
|
660
|
+
payment_mode_identifier: Joi.string().allow("").required(),
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
static RepaymentResponse() {
|
|
664
|
+
return Joi.object({
|
|
665
|
+
data: Joi.any().required(),
|
|
666
|
+
success: Joi.boolean().required(),
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
static ResendOrCancelPaymentRequest() {
|
|
670
|
+
return Joi.object({
|
|
671
|
+
device_id: Joi.string().allow("").allow(null),
|
|
672
|
+
order_id: Joi.string().allow("").required(),
|
|
673
|
+
request_type: Joi.string().allow("").required(),
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
static ResendOrCancelPaymentResponse() {
|
|
677
|
+
return Joi.object({
|
|
678
|
+
data: PaymentModel.LinkStatus().required(),
|
|
679
|
+
success: Joi.boolean().required(),
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
static ResendPaymentLinkResponse() {
|
|
683
|
+
return Joi.object({
|
|
684
|
+
message: Joi.string().allow("").required(),
|
|
685
|
+
polling_timeout: Joi.number().allow(null),
|
|
686
|
+
status_code: Joi.number().required(),
|
|
687
|
+
success: Joi.boolean().required(),
|
|
688
|
+
});
|
|
689
|
+
}
|
|
305
690
|
static RevokeOAuthToken() {
|
|
306
691
|
return Joi.object({
|
|
307
692
|
message: Joi.string().allow("").required(),
|
|
@@ -345,6 +730,12 @@ class PaymentModel {
|
|
|
345
730
|
success: Joi.boolean().required(),
|
|
346
731
|
});
|
|
347
732
|
}
|
|
733
|
+
static StatisticsData() {
|
|
734
|
+
return Joi.object({
|
|
735
|
+
active_device_count: Joi.number().required(),
|
|
736
|
+
inactive_device_count: Joi.number().required(),
|
|
737
|
+
});
|
|
738
|
+
}
|
|
348
739
|
static SubscriptionConfigResponse() {
|
|
349
740
|
return Joi.object({
|
|
350
741
|
aggregator: Joi.string().allow("").required(),
|
|
@@ -372,5 +763,24 @@ class PaymentModel {
|
|
|
372
763
|
success: Joi.boolean().required(),
|
|
373
764
|
});
|
|
374
765
|
}
|
|
766
|
+
static ValidateCustomerRequest() {
|
|
767
|
+
return Joi.object({
|
|
768
|
+
aggregator: Joi.string().allow("").required(),
|
|
769
|
+
billing_address: Joi.any(),
|
|
770
|
+
delivery_address: Joi.any(),
|
|
771
|
+
merchant_params: Joi.any(),
|
|
772
|
+
order_items: Joi.array().items(Joi.any()),
|
|
773
|
+
payload: Joi.string().allow("").allow(null),
|
|
774
|
+
phone_number: Joi.string().allow("").required(),
|
|
775
|
+
transaction_amount_in_paise: Joi.number().required(),
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
static ValidateCustomerResponse() {
|
|
779
|
+
return Joi.object({
|
|
780
|
+
data: Joi.any().required(),
|
|
781
|
+
message: Joi.string().allow("").required(),
|
|
782
|
+
success: Joi.boolean().required(),
|
|
783
|
+
});
|
|
784
|
+
}
|
|
375
785
|
}
|
|
376
786
|
module.exports = PaymentModel;
|