@gofynd/fdk-client-javascript 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation/application/CART.md +251 -251
- package/documentation/application/CATALOG.md +393 -393
- package/documentation/application/CONTENT.md +15 -1
- package/documentation/application/ORDER.md +268 -268
- package/documentation/application/PAYMENT.md +249 -249
- package/documentation/application/POSCART.md +297 -297
- package/documentation/platform/CART.md +499 -499
- package/documentation/platform/CATALOG.md +3497 -3097
- package/documentation/platform/COMPANYPROFILE.md +207 -207
- package/documentation/platform/CONTENT.md +123 -1
- package/documentation/platform/ORDER.md +1518 -1324
- package/documentation/platform/PARTNER.md +7 -7
- package/documentation/platform/PAYMENT.md +96 -96
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +865 -52
- package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationModel.js +335 -335
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +1034 -60
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationModel.js +532 -532
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +66 -4
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +108 -6
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +558 -32
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +621 -38
- package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +11 -1
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +101 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +229 -14
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +134 -8
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +403 -24
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +334 -334
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +1381 -78
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +350 -350
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +914 -54
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
- package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +235 -14
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +226 -14
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +130 -8
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +1133 -70
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +287 -16
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +153 -8
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +141 -8
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +429 -24
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +617 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
- package/sdk/platform/Cart/CartPlatformModel.js +617 -617
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +191 -138
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2202 -302
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +45 -45
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +344 -226
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3282 -488
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +110 -100
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2073 -1795
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +23 -21
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +103 -84
- package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
- package/sdk/platform/Common/CommonPlatformClient.js +73 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1499 -80
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +41 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +486 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +9 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +274 -274
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1022 -56
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +693 -36
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2446 -140
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
- package/sdk/platform/Content/ContentPlatformModel.js +43 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
- package/sdk/platform/Discount/DiscountPlatformClient.js +400 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +148 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +214 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
- package/sdk/platform/Inventory/InventoryPlatformClient.js +449 -24
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +447 -26
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +384 -22
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +125 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +108 -47
- package/sdk/platform/Order/OrderPlatformClient.js +1641 -100
- package/sdk/platform/Order/OrderPlatformModel.d.ts +69 -58
- package/sdk/platform/Order/OrderPlatformModel.js +1485 -1493
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -4
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +418 -22
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
- package/sdk/platform/Payment/PaymentPlatformClient.js +374 -20
- package/sdk/platform/Payment/PaymentPlatformModel.js +139 -139
- package/sdk/platform/PlatformApplicationClient.d.ts +2973 -2827
- package/sdk/platform/PlatformApplicationClient.js +3461 -3263
- package/sdk/platform/PlatformClient.d.ts +2973 -2827
- package/sdk/platform/PlatformClient.js +3461 -3263
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +449 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +139 -8
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +816 -48
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +417 -24
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +229 -12
- package/sdk/public/Configuration/ConfigurationPublicClient.js +72 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +210 -12
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +74 -4
- 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
|
-
|
|
6
|
+
created: Joi.boolean().required(),
|
|
7
7
|
|
|
8
8
|
excluded_fields: Joi.array().items(Joi.string().allow("")).required(),
|
|
9
9
|
|
|
10
|
+
success: Joi.boolean().required(),
|
|
11
|
+
|
|
10
12
|
aggregators: Joi.array().items(Joi.any()),
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
display_fields: Joi.array().items(Joi.string().allow("")).required(),
|
|
13
15
|
|
|
14
16
|
app_id: Joi.string().allow("").required(),
|
|
15
|
-
|
|
16
|
-
success: Joi.boolean().required(),
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,15 +21,15 @@ 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
|
-
|
|
32
|
+
config_type: Joi.string().allow("").required(),
|
|
33
33
|
|
|
34
34
|
merchant_salt: Joi.string().allow("").required(),
|
|
35
35
|
|
|
@@ -37,17 +37,17 @@ class PaymentModel {
|
|
|
37
37
|
|
|
38
38
|
is_active: Joi.boolean().allow(null),
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
key: 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,139 +61,139 @@ 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
|
|
|
78
78
|
static PaymentModeLogo() {
|
|
79
79
|
return Joi.object({
|
|
80
|
-
small: Joi.string().allow("").required(),
|
|
81
|
-
|
|
82
80
|
large: Joi.string().allow("").required(),
|
|
81
|
+
|
|
82
|
+
small: Joi.string().allow("").required(),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
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
|
|
|
92
90
|
package_name: Joi.string().allow("").allow(null),
|
|
93
91
|
|
|
94
92
|
logos: PaymentModel.PaymentModeLogo(),
|
|
93
|
+
|
|
94
|
+
display_name: Joi.string().allow("").allow(null),
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
static IntentAppErrorList() {
|
|
99
99
|
return Joi.object({
|
|
100
|
-
code: Joi.string().allow("").allow(null),
|
|
101
|
-
|
|
102
100
|
package_name: Joi.string().allow("").allow(null),
|
|
101
|
+
|
|
102
|
+
code: Joi.string().allow("").allow(null),
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
static PaymentModeList() {
|
|
107
107
|
return Joi.object({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
card_reference: Joi.string().allow("").allow(null),
|
|
108
|
+
card_brand_image: Joi.string().allow("").allow(null),
|
|
111
109
|
|
|
112
|
-
|
|
110
|
+
aggregator_name: Joi.string().allow("").required(),
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
remaining_limit: Joi.number().allow(null),
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
logo_url: PaymentModel.PaymentModeLogo(),
|
|
117
115
|
|
|
118
|
-
|
|
116
|
+
retry_count: Joi.number().allow(null),
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
merchant_code: Joi.string().allow("").allow(null),
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
card_type: Joi.string().allow("").allow(null),
|
|
123
121
|
|
|
124
122
|
display_name: Joi.string().allow("").allow(null),
|
|
125
123
|
|
|
126
|
-
|
|
124
|
+
card_issuer: Joi.string().allow("").allow(null),
|
|
127
125
|
|
|
128
|
-
|
|
126
|
+
cod_limit: Joi.number().allow(null),
|
|
129
127
|
|
|
130
|
-
|
|
128
|
+
expired: Joi.boolean().allow(null),
|
|
131
129
|
|
|
132
|
-
|
|
130
|
+
intent_app: Joi.array().items(PaymentModel.IntentApp()),
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
name: Joi.string().allow("").allow(null),
|
|
135
133
|
|
|
136
|
-
|
|
134
|
+
card_fingerprint: Joi.string().allow("").allow(null),
|
|
137
135
|
|
|
138
|
-
|
|
136
|
+
intent_flow: Joi.boolean().allow(null),
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
fynd_vpa: Joi.string().allow("").allow(null),
|
|
141
139
|
|
|
142
140
|
nickname: Joi.string().allow("").allow(null),
|
|
143
141
|
|
|
144
|
-
|
|
142
|
+
display_priority: Joi.number().allow(null),
|
|
145
143
|
|
|
146
144
|
card_number: Joi.string().allow("").allow(null),
|
|
147
145
|
|
|
148
146
|
card_id: Joi.string().allow("").allow(null),
|
|
149
147
|
|
|
148
|
+
intent_app_error_dict_list: Joi.array().items(
|
|
149
|
+
PaymentModel.IntentAppErrorList()
|
|
150
|
+
),
|
|
151
|
+
|
|
150
152
|
card_name: Joi.string().allow("").allow(null),
|
|
151
153
|
|
|
152
|
-
|
|
154
|
+
cod_limit_per_order: Joi.number().allow(null),
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
code: Joi.string().allow("").allow(null),
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
card_reference: Joi.string().allow("").allow(null),
|
|
157
159
|
|
|
158
|
-
|
|
159
|
-
PaymentModel.IntentAppErrorList()
|
|
160
|
-
),
|
|
160
|
+
compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
card_brand: Joi.string().allow("").allow(null),
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
exp_year: Joi.number().allow(null),
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
exp_month: Joi.number().allow(null),
|
|
167
167
|
|
|
168
168
|
card_token: Joi.string().allow("").allow(null),
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
intent_app_error_list: Joi.array().items(Joi.string().allow("")),
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
card_isin: Joi.string().allow("").allow(null),
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
timeout: Joi.number().allow(null),
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
static RootPaymentMode() {
|
|
179
179
|
return Joi.object({
|
|
180
|
-
|
|
180
|
+
aggregator_name: Joi.string().allow("").allow(null),
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
list: Joi.array().items(PaymentModel.PaymentModeList()),
|
|
183
|
+
|
|
184
|
+
anonymous_enable: Joi.boolean().allow(null),
|
|
183
185
|
|
|
184
186
|
save_card: Joi.boolean().allow(null),
|
|
185
187
|
|
|
186
188
|
add_card_enabled: Joi.boolean().allow(null),
|
|
187
189
|
|
|
188
|
-
|
|
190
|
+
name: Joi.string().allow("").required(),
|
|
189
191
|
|
|
190
|
-
|
|
192
|
+
display_priority: Joi.number().required(),
|
|
191
193
|
|
|
192
194
|
display_name: Joi.string().allow("").required(),
|
|
193
195
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
anonymous_enable: Joi.boolean().allow(null),
|
|
196
|
+
is_pay_by_card_pl: Joi.boolean().allow(null),
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -215,83 +215,83 @@ class PaymentModel {
|
|
|
215
215
|
|
|
216
216
|
static PayoutsResponse() {
|
|
217
217
|
return Joi.object({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
transfer_type: Joi.string().allow("").required(),
|
|
218
|
+
is_default: Joi.boolean().required(),
|
|
221
219
|
|
|
222
220
|
unique_transfer_no: Joi.any().required(),
|
|
223
221
|
|
|
224
|
-
|
|
222
|
+
transfer_type: Joi.string().allow("").required(),
|
|
223
|
+
|
|
224
|
+
is_active: Joi.boolean().required(),
|
|
225
225
|
|
|
226
226
|
payouts_aggregators: Joi.array().items(Joi.any()).required(),
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
more_attributes: Joi.any().required(),
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
customers: Joi.any().required(),
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
static PayoutBankDetails() {
|
|
235
235
|
return Joi.object({
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
ifsc_code: Joi.string().allow("").required(),
|
|
236
|
+
state: Joi.string().allow(""),
|
|
239
237
|
|
|
240
|
-
|
|
238
|
+
pincode: Joi.number(),
|
|
241
239
|
|
|
242
|
-
|
|
240
|
+
branch_name: Joi.string().allow(""),
|
|
243
241
|
|
|
244
242
|
account_holder: Joi.string().allow(""),
|
|
245
243
|
|
|
246
|
-
pincode: Joi.number(),
|
|
247
|
-
|
|
248
244
|
city: Joi.string().allow(""),
|
|
249
245
|
|
|
250
|
-
|
|
246
|
+
bank_name: Joi.string().allow(""),
|
|
251
247
|
|
|
252
|
-
|
|
248
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
253
249
|
|
|
254
|
-
|
|
250
|
+
country: Joi.string().allow(""),
|
|
251
|
+
|
|
252
|
+
account_no: Joi.string().allow(""),
|
|
253
|
+
|
|
254
|
+
account_type: Joi.string().allow("").required(),
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
static PayoutRequest() {
|
|
259
259
|
return Joi.object({
|
|
260
|
+
bank_details: PaymentModel.PayoutBankDetails().required(),
|
|
261
|
+
|
|
262
|
+
unique_external_id: Joi.string().allow("").required(),
|
|
263
|
+
|
|
260
264
|
transfer_type: Joi.string().allow("").required(),
|
|
261
265
|
|
|
262
266
|
aggregator: Joi.string().allow("").required(),
|
|
263
267
|
|
|
264
|
-
bank_details: PaymentModel.PayoutBankDetails().required(),
|
|
265
|
-
|
|
266
268
|
users: Joi.any().required(),
|
|
267
269
|
|
|
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
|
-
|
|
276
|
+
bank_details: Joi.any().required(),
|
|
277
277
|
|
|
278
|
-
|
|
278
|
+
payouts: Joi.any().required(),
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
created: Joi.boolean().required(),
|
|
281
281
|
|
|
282
282
|
unique_transfer_no: Joi.string().allow("").required(),
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
payment_status: Joi.string().allow("").required(),
|
|
284
|
+
transfer_type: Joi.string().allow("").required(),
|
|
287
285
|
|
|
288
|
-
|
|
286
|
+
success: Joi.boolean().required(),
|
|
289
287
|
|
|
290
288
|
users: Joi.any().required(),
|
|
291
289
|
|
|
290
|
+
aggregator: Joi.string().allow("").required(),
|
|
291
|
+
|
|
292
292
|
is_active: Joi.boolean().required(),
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
payment_status: Joi.string().allow("").required(),
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -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
|
|
|
@@ -337,11 +337,11 @@ class PaymentModel {
|
|
|
337
337
|
|
|
338
338
|
static SubscriptionConfigResponse() {
|
|
339
339
|
return Joi.object({
|
|
340
|
+
config: Joi.any().required(),
|
|
341
|
+
|
|
340
342
|
aggregator: Joi.string().allow("").required(),
|
|
341
343
|
|
|
342
344
|
success: Joi.boolean().required(),
|
|
343
|
-
|
|
344
|
-
config: Joi.any().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,23 +375,23 @@ 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
|
-
|
|
387
|
-
|
|
388
|
-
ifsc_code: Joi.string().allow("").required(),
|
|
386
|
+
branch_name: Joi.string().allow("").required(),
|
|
389
387
|
|
|
390
388
|
account_holder: Joi.string().allow("").required(),
|
|
391
389
|
|
|
392
|
-
branch_name: Joi.string().allow("").required(),
|
|
393
|
-
|
|
394
390
|
bank_name: Joi.string().allow("").required(),
|
|
391
|
+
|
|
392
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
393
|
+
|
|
394
|
+
account_no: Joi.string().allow("").required(),
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
|
|
@@ -405,53 +405,53 @@ class PaymentModel {
|
|
|
405
405
|
|
|
406
406
|
static IfscCodeResponse() {
|
|
407
407
|
return Joi.object({
|
|
408
|
-
branch_name: Joi.string().allow("").required(),
|
|
409
|
-
|
|
410
408
|
success: Joi.boolean(),
|
|
411
409
|
|
|
410
|
+
branch_name: Joi.string().allow("").required(),
|
|
411
|
+
|
|
412
412
|
bank_name: Joi.string().allow("").required(),
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
static OrderBeneficiaryDetails() {
|
|
417
417
|
return Joi.object({
|
|
418
|
-
|
|
418
|
+
transfer_mode: Joi.string().allow("").required(),
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
address: Joi.string().allow("").required(),
|
|
421
421
|
|
|
422
|
-
|
|
422
|
+
display_name: Joi.string().allow("").required(),
|
|
423
423
|
|
|
424
|
-
|
|
424
|
+
delights_user_name: Joi.string().allow("").allow(null),
|
|
425
425
|
|
|
426
|
-
|
|
426
|
+
created_on: Joi.string().allow("").required(),
|
|
427
427
|
|
|
428
|
-
|
|
428
|
+
email: Joi.string().allow("").required(),
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
comment: Joi.string().allow(""),
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
branch_name: Joi.string().allow(""),
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
account_no: Joi.string().allow("").required(),
|
|
435
435
|
|
|
436
|
-
|
|
436
|
+
subtitle: Joi.string().allow("").required(),
|
|
437
437
|
|
|
438
|
-
|
|
438
|
+
modified_on: Joi.string().allow("").required(),
|
|
439
439
|
|
|
440
|
-
|
|
440
|
+
bank_name: Joi.string().allow("").required(),
|
|
441
441
|
|
|
442
442
|
mobile: Joi.string().allow(""),
|
|
443
443
|
|
|
444
|
-
|
|
444
|
+
account_holder: Joi.string().allow("").required(),
|
|
445
445
|
|
|
446
|
-
|
|
446
|
+
beneficiary_id: Joi.string().allow("").required(),
|
|
447
447
|
|
|
448
|
-
|
|
448
|
+
id: Joi.number().required(),
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
is_active: Joi.boolean().required(),
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
ifsc_code: Joi.string().allow("").required(),
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
title: Joi.string().allow("").required(),
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
|
|
@@ -465,37 +465,37 @@ 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
470
|
payment_gateway: Joi.string().allow(""),
|
|
473
471
|
|
|
474
|
-
order_id: Joi.string().allow(""),
|
|
475
|
-
|
|
476
472
|
current_status: Joi.string().allow(""),
|
|
473
|
+
|
|
474
|
+
payment_id: Joi.string().allow(""),
|
|
475
|
+
|
|
476
|
+
order_id: Joi.string().allow(""),
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
static MultiTenderPaymentMethod() {
|
|
481
481
|
return Joi.object({
|
|
482
|
-
|
|
482
|
+
name: Joi.string().allow(""),
|
|
483
483
|
|
|
484
484
|
amount: Joi.number().required(),
|
|
485
485
|
|
|
486
|
-
name: Joi.string().allow(""),
|
|
487
|
-
|
|
488
486
|
mode: Joi.string().allow("").required(),
|
|
487
|
+
|
|
488
|
+
meta: PaymentModel.MultiTenderPaymentMeta(),
|
|
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
|
|
|
@@ -503,41 +503,41 @@ class PaymentModel {
|
|
|
503
503
|
return Joi.object({
|
|
504
504
|
message: Joi.string().allow("").required(),
|
|
505
505
|
|
|
506
|
-
order_id: Joi.string().allow("").required(),
|
|
507
|
-
|
|
508
506
|
success: Joi.boolean().required(),
|
|
507
|
+
|
|
508
|
+
order_id: Joi.string().allow("").required(),
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
static CODdata() {
|
|
513
513
|
return Joi.object({
|
|
514
|
-
|
|
514
|
+
remaining_limit: Joi.number().required(),
|
|
515
515
|
|
|
516
516
|
user_id: Joi.string().allow("").required(),
|
|
517
517
|
|
|
518
|
-
remaining_limit: Joi.number().required(),
|
|
519
|
-
|
|
520
518
|
usages: Joi.number().required(),
|
|
521
519
|
|
|
522
520
|
is_active: Joi.boolean().required(),
|
|
521
|
+
|
|
522
|
+
limit: Joi.number().required(),
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
static GetUserCODLimitResponse() {
|
|
527
527
|
return Joi.object({
|
|
528
|
-
user_cod_data: PaymentModel.CODdata().required(),
|
|
529
|
-
|
|
530
528
|
success: Joi.boolean().required(),
|
|
529
|
+
|
|
530
|
+
user_cod_data: PaymentModel.CODdata().required(),
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
static SetCODForUserRequest() {
|
|
535
535
|
return Joi.object({
|
|
536
|
-
|
|
536
|
+
merchant_user_id: Joi.string().allow("").required(),
|
|
537
537
|
|
|
538
538
|
is_active: Joi.boolean().required(),
|
|
539
539
|
|
|
540
|
-
|
|
540
|
+
mobileno: Joi.string().allow("").required(),
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
|