@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.4.0-beta.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/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +3 -15
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3641 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +351 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +410 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2011 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1100 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1362 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +247 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +319 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +18 -19
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -18
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -9,10 +9,11 @@ const Joi = require("joi");
|
|
|
9
9
|
/**
|
|
10
10
|
* @typedef AddressDetail
|
|
11
11
|
* @property {string} address - Address details
|
|
12
|
-
* @property {string} address_type - Address type e.g. home, office
|
|
12
|
+
* @property {string} [address_type] - Address type e.g. home, office
|
|
13
13
|
* @property {string} area - Area details
|
|
14
14
|
* @property {string} area_code - Customer pin/zip code
|
|
15
|
-
* @property {string} area_code_slug - Area slug code, use pin
|
|
15
|
+
* @property {string} area_code_slug - Area slug code, use pin or zip code if
|
|
16
|
+
* not available
|
|
16
17
|
* @property {string} city - City name
|
|
17
18
|
* @property {string} country - Country name
|
|
18
19
|
* @property {string} country_iso_code - Country's code name e.g. `IN`, `GB`
|
|
@@ -29,6 +30,70 @@ const Joi = require("joi");
|
|
|
29
30
|
* @property {Object[]} [tags] - Optional address tag
|
|
30
31
|
*/
|
|
31
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @typedef AdvanceObject
|
|
35
|
+
* @property {string[]} [all_prepayment_type] - All available types of prepayment
|
|
36
|
+
* @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed?
|
|
37
|
+
* @property {number} [amount] - Amount for Payment Breakdown
|
|
38
|
+
* @property {string} [cancellation_type] - Type of cancellation
|
|
39
|
+
* @property {string} [description] - The description for Advance Payment (user
|
|
40
|
+
* configured)
|
|
41
|
+
* @property {string} [display_name] - The display name for Advance payment
|
|
42
|
+
* @property {boolean} [is_active] - Is Advance Payment active
|
|
43
|
+
* @property {string} [prepayment_type] - Type of prepayment value
|
|
44
|
+
* @property {number} [prepayment_value] - Value for prepayment in advance payment
|
|
45
|
+
* @property {number} [refund_time_limit] - Time limit for processing refund
|
|
46
|
+
* @property {string} [time_unit] - Time unit for refunds
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef AdvancePaymentObject
|
|
51
|
+
* @property {AdvanceObject} [advance]
|
|
52
|
+
* @property {string} [display_name] - Display name for Advance Payment Mode
|
|
53
|
+
* @property {number} [display_priority] - Display Priority for Payment Option
|
|
54
|
+
* @property {PaymentModeList[]} [list] - Payment mode
|
|
55
|
+
* @property {string} [name] - Name of Advance Payment Mode
|
|
56
|
+
* @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option
|
|
57
|
+
* @property {SplitObject} [split]
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @typedef AggregatorControlRequest
|
|
62
|
+
* @property {string} [business_unit] - Business unit
|
|
63
|
+
* @property {string} [device] - Device name
|
|
64
|
+
* @property {Object[]} [items] - List of item details with respect to payment_mode
|
|
65
|
+
* @property {AggregatorVersionRequestSchema} [version]
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @typedef AggregatorRoute
|
|
70
|
+
* @property {string} [api_link] - Api_link
|
|
71
|
+
* @property {Object} [data] - Data
|
|
72
|
+
* @property {string} [payment_flow] - Payment_flow
|
|
73
|
+
* @property {string} [payment_flow_data] - Payment_flow_data
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @typedef AggregatorVersionItemSchema
|
|
78
|
+
* @property {string} [is_equal_to]
|
|
79
|
+
* @property {string} [is_greater_than]
|
|
80
|
+
* @property {string} [is_less_than]
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @typedef AggregatorVersionRequestSchema
|
|
85
|
+
* @property {string} [is_equal_to]
|
|
86
|
+
* @property {string} [is_greater_than]
|
|
87
|
+
* @property {string} [is_less_than]
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @typedef AggregatorVersionResponse
|
|
92
|
+
* @property {AggregatorVersionItemSchema} [items]
|
|
93
|
+
* @property {string} message - Message
|
|
94
|
+
* @property {boolean} success - Successful or failure
|
|
95
|
+
*/
|
|
96
|
+
|
|
32
97
|
/**
|
|
33
98
|
* @typedef BankDetailsForOTP
|
|
34
99
|
* @property {string} account_holder
|
|
@@ -50,6 +115,14 @@ const Joi = require("joi");
|
|
|
50
115
|
* @property {boolean} success - Successful or failure
|
|
51
116
|
*/
|
|
52
117
|
|
|
118
|
+
/**
|
|
119
|
+
* @typedef CartDetailsSerializer
|
|
120
|
+
* @property {Object[]} articles - List of articles that are added in cart
|
|
121
|
+
* @property {number} cart_value - Total cart value i.e. amount to be paid
|
|
122
|
+
* @property {Object} items - Items that are added in cart
|
|
123
|
+
* @property {number} [total_quantity] - Total number of items in cart
|
|
124
|
+
*/
|
|
125
|
+
|
|
53
126
|
/**
|
|
54
127
|
* @typedef CODChargesLimitsResponse
|
|
55
128
|
* @property {number} [cod_charge] - Cod charges to be applied on order.
|
|
@@ -79,16 +152,16 @@ const Joi = require("joi");
|
|
|
79
152
|
* @property {string} [assign_card_id]
|
|
80
153
|
* @property {string} cart_id
|
|
81
154
|
* @property {string} checkout_mode
|
|
82
|
-
* @property {string} pincode
|
|
83
155
|
*/
|
|
84
156
|
|
|
85
157
|
/**
|
|
86
158
|
* @typedef CreatePaymentLinkRequest
|
|
87
159
|
* @property {number} amount - Total value of order
|
|
160
|
+
* @property {string} [country_phone_code] - Phone country code for complete mobile number
|
|
88
161
|
* @property {string} [description] - Merchant order id
|
|
89
162
|
* @property {string} email - Email to which the payment link is to be sent
|
|
90
163
|
* @property {string} external_order_id - Merchant order id
|
|
91
|
-
* @property {CreatePaymentLinkMeta} meta
|
|
164
|
+
* @property {CreatePaymentLinkMeta} meta
|
|
92
165
|
* @property {string} mobile_number - Mobile number to which the payment link is
|
|
93
166
|
* to be sent
|
|
94
167
|
*/
|
|
@@ -148,13 +221,13 @@ const Joi = require("joi");
|
|
|
148
221
|
|
|
149
222
|
/**
|
|
150
223
|
* @typedef EdcDeviceAddResponse
|
|
151
|
-
* @property {EdcDevice} data
|
|
224
|
+
* @property {EdcDevice} data
|
|
152
225
|
* @property {boolean} success - Response is successful or not
|
|
153
226
|
*/
|
|
154
227
|
|
|
155
228
|
/**
|
|
156
229
|
* @typedef EdcDeviceDetailsResponse
|
|
157
|
-
* @property {EdcDevice} data
|
|
230
|
+
* @property {EdcDevice} data
|
|
158
231
|
* @property {boolean} success - Response is successful or not
|
|
159
232
|
*/
|
|
160
233
|
|
|
@@ -162,13 +235,13 @@ const Joi = require("joi");
|
|
|
162
235
|
* @typedef EdcDeviceListResponse
|
|
163
236
|
* @property {EdcDevice[]} items - List of all edc mapped to the application
|
|
164
237
|
* options with their Details.
|
|
165
|
-
* @property {Page} page
|
|
238
|
+
* @property {Page} page
|
|
166
239
|
* @property {boolean} success - Response is successful or not
|
|
167
240
|
*/
|
|
168
241
|
|
|
169
242
|
/**
|
|
170
243
|
* @typedef EdcDeviceStatsResponse
|
|
171
|
-
* @property {StatisticsData} statistics
|
|
244
|
+
* @property {StatisticsData} statistics
|
|
172
245
|
* @property {boolean} success - Response is successful or not
|
|
173
246
|
*/
|
|
174
247
|
|
|
@@ -222,12 +295,18 @@ const Joi = require("joi");
|
|
|
222
295
|
|
|
223
296
|
/**
|
|
224
297
|
* @typedef ErrorResponse
|
|
225
|
-
* @property {
|
|
298
|
+
* @property {ErrorDescription} [error]
|
|
226
299
|
* @property {string} message - Message
|
|
227
300
|
* @property {number} status_code - HTTP status code
|
|
228
301
|
* @property {boolean} success - Successful or failure
|
|
229
302
|
*/
|
|
230
303
|
|
|
304
|
+
/**
|
|
305
|
+
* @typedef FromConfig
|
|
306
|
+
* @property {string} business_unit - Business unit name
|
|
307
|
+
* @property {string} device - Device name
|
|
308
|
+
*/
|
|
309
|
+
|
|
231
310
|
/**
|
|
232
311
|
* @typedef GetOauthUrlResponse
|
|
233
312
|
* @property {boolean} success - Response is successful or not
|
|
@@ -236,12 +315,12 @@ const Joi = require("joi");
|
|
|
236
315
|
|
|
237
316
|
/**
|
|
238
317
|
* @typedef GetPaymentCode
|
|
239
|
-
* @property {PaymentCode} method_code
|
|
318
|
+
* @property {PaymentCode} method_code
|
|
240
319
|
*/
|
|
241
320
|
|
|
242
321
|
/**
|
|
243
322
|
* @typedef GetPaymentCodeResponse
|
|
244
|
-
* @property {GetPaymentCode} data
|
|
323
|
+
* @property {GetPaymentCode} data
|
|
245
324
|
* @property {boolean} success - Response is successful or not.
|
|
246
325
|
*/
|
|
247
326
|
|
|
@@ -261,7 +340,7 @@ const Joi = require("joi");
|
|
|
261
340
|
/**
|
|
262
341
|
* @typedef GetUserCODLimitResponse
|
|
263
342
|
* @property {boolean} success - Response is successful or not
|
|
264
|
-
* @property {CODdata} user_cod_data
|
|
343
|
+
* @property {CODdata} user_cod_data
|
|
265
344
|
*/
|
|
266
345
|
|
|
267
346
|
/**
|
|
@@ -281,7 +360,7 @@ const Joi = require("joi");
|
|
|
281
360
|
* @typedef IntentApp
|
|
282
361
|
* @property {string} [code] - Code
|
|
283
362
|
* @property {string} [display_name] - Display_name
|
|
284
|
-
* @property {
|
|
363
|
+
* @property {PaymentModeLogo} [logos]
|
|
285
364
|
* @property {string} [package_name] - Package_name
|
|
286
365
|
*/
|
|
287
366
|
|
|
@@ -294,7 +373,7 @@ const Joi = require("joi");
|
|
|
294
373
|
/**
|
|
295
374
|
* @typedef LinkStatus
|
|
296
375
|
* @property {string} message - Message
|
|
297
|
-
* @property {
|
|
376
|
+
* @property {string} status - Link action status
|
|
298
377
|
*/
|
|
299
378
|
|
|
300
379
|
/**
|
|
@@ -303,7 +382,7 @@ const Joi = require("joi");
|
|
|
303
382
|
* @property {string} app_id - Application id
|
|
304
383
|
* @property {string} credit_line_id - Merchant ID at Ajiodhan's end
|
|
305
384
|
* @property {string} status - Status
|
|
306
|
-
* @property {string} user_id - Deadlock
|
|
385
|
+
* @property {string} user_id - Deadlock or Grimlock user id
|
|
307
386
|
*/
|
|
308
387
|
|
|
309
388
|
/**
|
|
@@ -313,16 +392,16 @@ const Joi = require("joi");
|
|
|
313
392
|
*/
|
|
314
393
|
|
|
315
394
|
/**
|
|
316
|
-
* @typedef
|
|
317
|
-
* @property {
|
|
318
|
-
* @property {Object}
|
|
395
|
+
* @typedef MerchantPaymentModeRequest
|
|
396
|
+
* @property {string} business_unit - Business unit
|
|
397
|
+
* @property {Object} device - List of devices and its activation status
|
|
398
|
+
* @property {Object[]} items - List of item details with respect to payment_mode
|
|
319
399
|
*/
|
|
320
400
|
|
|
321
401
|
/**
|
|
322
|
-
* @typedef
|
|
323
|
-
* @property {Object
|
|
324
|
-
* @property {
|
|
325
|
-
* @property {boolean} success - Response is successful or not.
|
|
402
|
+
* @typedef MerchnatPaymentModeRequest
|
|
403
|
+
* @property {Object} [offline] - Details to be updated for online payment configuration.
|
|
404
|
+
* @property {Object} [online] - Details to be updated for offline payment configuration.
|
|
326
405
|
*/
|
|
327
406
|
|
|
328
407
|
/**
|
|
@@ -404,7 +483,7 @@ const Joi = require("joi");
|
|
|
404
483
|
|
|
405
484
|
/**
|
|
406
485
|
* @typedef PaymentCode
|
|
407
|
-
* @property {Code} codes
|
|
486
|
+
* @property {Code} codes
|
|
408
487
|
* @property {string} name - Name of payment name
|
|
409
488
|
* @property {string} networks - Payment networks
|
|
410
489
|
* @property {string} types - Type of payment mode
|
|
@@ -423,10 +502,109 @@ const Joi = require("joi");
|
|
|
423
502
|
* @property {boolean} success - Payment confirmation updated or not.
|
|
424
503
|
*/
|
|
425
504
|
|
|
505
|
+
/**
|
|
506
|
+
* @typedef PaymentCustomConfigCustomerRequestSchema
|
|
507
|
+
* @property {number[]} [groups] - Customer groups.
|
|
508
|
+
* @property {string} restriction - Customer restriction type.
|
|
509
|
+
*/
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @typedef PaymentCustomConfigCustomerSchema
|
|
513
|
+
* @property {number[]} [groups] - Customer groups.
|
|
514
|
+
* @property {string} restriction - Customer restriction type.
|
|
515
|
+
* @property {string[]} [types] - Customer types.
|
|
516
|
+
*/
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* @typedef PaymentCustomConfigDetailsRequestSchema
|
|
520
|
+
* @property {PaymentCustomConfigCustomerRequestSchema} customer
|
|
521
|
+
* @property {number} min_order_value - The minimum order value for the store
|
|
522
|
+
* @property {PaymentCustomConfigModeSchema} payment_mode
|
|
523
|
+
*/
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* @typedef PaymentCustomConfigDetailsSchema
|
|
527
|
+
* @property {PaymentCustomConfigCustomerSchema} customer
|
|
528
|
+
* @property {number} min_order_value - The minimum order value for the store
|
|
529
|
+
* @property {PaymentCustomConfigModeSchema} payment_mode
|
|
530
|
+
*/
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* @typedef PaymentCustomConfigModeSchema
|
|
534
|
+
* @property {boolean} available - Indicates whether the payment mode is available.
|
|
535
|
+
* @property {string[]} [post_order] - Payment modes available for post-order.
|
|
536
|
+
* @property {string[]} [pre_order] - Payment modes available for pre-order.
|
|
537
|
+
*/
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @typedef PaymentCustomConfigRequestSchema
|
|
541
|
+
* @property {string} business_unit - The business unit to which the store belongs.
|
|
542
|
+
* @property {PaymentCustomConfigDetailsRequestSchema[]} items
|
|
543
|
+
*/
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* @typedef PaymentCustomConfigResponseSchema
|
|
547
|
+
* @property {PaymentModeCustomConfigSchema[]} items
|
|
548
|
+
* @property {string} message
|
|
549
|
+
* @property {boolean} success
|
|
550
|
+
*/
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* @typedef PaymentDetailsSerializer
|
|
554
|
+
* @property {string} [aggregator_customer_id] - Unique customer id generated by
|
|
555
|
+
* payment gateway, not required for standard checkout.
|
|
556
|
+
* @property {string} [aggregator_order_id] - Unique order id or payment request
|
|
557
|
+
* id generated by payment gateway
|
|
558
|
+
* @property {number} amount - Amount paid.
|
|
559
|
+
* @property {number} amount_captured - Amount which is captured or credited to
|
|
560
|
+
* merchant account
|
|
561
|
+
* @property {number} [amount_refunded]
|
|
562
|
+
* @property {string} [cancel_url] - Cancel url sent by Fynd platform at the
|
|
563
|
+
* time of payment creation
|
|
564
|
+
* @property {boolean} [captured] - Whether the payment is captured (credited to
|
|
565
|
+
* merchant account) by payment gateway.
|
|
566
|
+
* @property {string} [created] - Timestamp in epoch
|
|
567
|
+
* @property {string} currency - Currency of the payment.
|
|
568
|
+
* @property {string} g_user_id - Global user identifier - unique user id
|
|
569
|
+
* generated by Fynd platform
|
|
570
|
+
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
571
|
+
* etc.) against which payment_session was initiated. This is generated by
|
|
572
|
+
* Fynd payments platform and is unique.
|
|
573
|
+
* @property {string} [kind] - Optional kind of purchase/payment - one time
|
|
574
|
+
* payment (sale) or subcription. defaults to sale.
|
|
575
|
+
* @property {string} [locale] - User's locale
|
|
576
|
+
* @property {string} [merchant_locale] - Merchant's locale
|
|
577
|
+
* @property {Object} [meta] - Metadata
|
|
578
|
+
* @property {string} mode - Test or live, test mode uses test credentials so
|
|
579
|
+
* that actual payment is not created.
|
|
580
|
+
* @property {string} [payment_id] - Unique transaction id generated by payment gateway
|
|
581
|
+
* @property {Object[]} payment_methods - Method of payment
|
|
582
|
+
* @property {string} status - Stautus of the payment
|
|
583
|
+
* @property {string} [success_url] - Success url sent by Fynd platform at the
|
|
584
|
+
* time of payment creation
|
|
585
|
+
*/
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @typedef PaymentFlow
|
|
589
|
+
* @property {AggregatorRoute} [ajiodhan]
|
|
590
|
+
* @property {AggregatorRoute} [bqr_razorpay]
|
|
591
|
+
* @property {AggregatorRoute} [ccavenue]
|
|
592
|
+
* @property {AggregatorRoute} [epaylater]
|
|
593
|
+
* @property {AggregatorRoute} [fynd]
|
|
594
|
+
* @property {AggregatorRoute} [jiopay]
|
|
595
|
+
* @property {AggregatorRoute} [juspay]
|
|
596
|
+
* @property {AggregatorRoute} [mswipe]
|
|
597
|
+
* @property {AggregatorRoute} [payubiz]
|
|
598
|
+
* @property {AggregatorRoute} [razorpay]
|
|
599
|
+
* @property {AggregatorRoute} [rupifi]
|
|
600
|
+
* @property {AggregatorRoute} [simpl]
|
|
601
|
+
* @property {AggregatorRoute} [stripe]
|
|
602
|
+
*/
|
|
603
|
+
|
|
426
604
|
/**
|
|
427
605
|
* @typedef PaymentGatewayConfig
|
|
428
606
|
* @property {string} config_type - Config Type of the aggregator
|
|
429
|
-
* @property {boolean} [is_active] - Enable
|
|
607
|
+
* @property {boolean} [is_active] - Enable or Disable Flag
|
|
430
608
|
* @property {string} key - Api key of the payment aggregator
|
|
431
609
|
* @property {string} merchant_salt - Merchant key of the payment aggregator
|
|
432
610
|
* @property {string} secret - Secret Key of the payment aggregator
|
|
@@ -436,7 +614,7 @@ const Joi = require("joi");
|
|
|
436
614
|
* @typedef PaymentGatewayConfigRequest
|
|
437
615
|
* @property {PaymentGatewayConfig} [aggregator_name]
|
|
438
616
|
* @property {string} app_id - Application Id to which Payment config Mapped
|
|
439
|
-
* @property {boolean} [is_active] - Enable
|
|
617
|
+
* @property {boolean} [is_active] - Enable or Disable Flag
|
|
440
618
|
*/
|
|
441
619
|
|
|
442
620
|
/**
|
|
@@ -494,6 +672,20 @@ const Joi = require("joi");
|
|
|
494
672
|
* @property {string} [vpa] - Customer vpa address
|
|
495
673
|
*/
|
|
496
674
|
|
|
675
|
+
/**
|
|
676
|
+
* @typedef PaymentMethodsMetaOrder
|
|
677
|
+
* @property {string} merchant_code - Merchant code
|
|
678
|
+
* @property {string} payment_gateway - Payment gateway name
|
|
679
|
+
* @property {string} payment_identifier - Payment identifier
|
|
680
|
+
*/
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* @typedef PaymentModeCustomConfigSchema
|
|
684
|
+
* @property {string} business_unit - The business unit to which the store belongs.
|
|
685
|
+
* @property {PaymentCustomConfigDetailsSchema} custom_config
|
|
686
|
+
* @property {string} display_name - The display name of the store.
|
|
687
|
+
*/
|
|
688
|
+
|
|
497
689
|
/**
|
|
498
690
|
* @typedef PaymentModeList
|
|
499
691
|
* @property {string} aggregator_name - Aggregator_name
|
|
@@ -525,11 +717,11 @@ const Joi = require("joi");
|
|
|
525
717
|
* Intent_app_error_dict_list
|
|
526
718
|
* @property {string[]} [intent_app_error_list] - Intent_app_error_list
|
|
527
719
|
* @property {boolean} [intent_flow] - Intent_flow
|
|
528
|
-
* @property {
|
|
720
|
+
* @property {PaymentModeLogo} [logo_url]
|
|
529
721
|
* @property {string} [merchant_code] - Merchant code
|
|
530
722
|
* @property {string} [name] - Name
|
|
531
723
|
* @property {string} [nickname] - Nickname
|
|
532
|
-
* @property {
|
|
724
|
+
* @property {ProductCODData} [product_cod_data]
|
|
533
725
|
* @property {number} [remaining_limit] - Remaining limit
|
|
534
726
|
* @property {number} [retry_count] - Retry_count
|
|
535
727
|
* @property {number} [timeout] - Timeout
|
|
@@ -541,6 +733,14 @@ const Joi = require("joi");
|
|
|
541
733
|
* @property {string} small - Smalll
|
|
542
734
|
*/
|
|
543
735
|
|
|
736
|
+
/**
|
|
737
|
+
* @typedef PaymentModeRouteResponse
|
|
738
|
+
* @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array
|
|
739
|
+
* @property {Object} [payment_breakup] - Payment Breakup for advance payment
|
|
740
|
+
* @property {PaymentOptionAndFlow} payment_options
|
|
741
|
+
* @property {boolean} success - Response is successful or not
|
|
742
|
+
*/
|
|
743
|
+
|
|
544
744
|
/**
|
|
545
745
|
* @typedef PaymentObjectListSerializer
|
|
546
746
|
* @property {Object} [aggregator_payment_object]
|
|
@@ -563,6 +763,12 @@ const Joi = require("joi");
|
|
|
563
763
|
* @property {Object} user_object
|
|
564
764
|
*/
|
|
565
765
|
|
|
766
|
+
/**
|
|
767
|
+
* @typedef PaymentOptionAndFlow
|
|
768
|
+
* @property {PaymentFlow} payment_flows
|
|
769
|
+
* @property {RootPaymentMode[]} payment_option - Payment options
|
|
770
|
+
*/
|
|
771
|
+
|
|
566
772
|
/**
|
|
567
773
|
* @typedef PaymentOptions
|
|
568
774
|
* @property {RootPaymentMode[]} payment_option - Payment options
|
|
@@ -570,10 +776,52 @@ const Joi = require("joi");
|
|
|
570
776
|
|
|
571
777
|
/**
|
|
572
778
|
* @typedef PaymentOptionsResponse
|
|
573
|
-
* @property {
|
|
779
|
+
* @property {Object} [payment_breakup] - Payment Breakup for advance payment
|
|
780
|
+
* @property {PaymentOptions} payment_options
|
|
574
781
|
* @property {boolean} success - Response is successful or not
|
|
575
782
|
*/
|
|
576
783
|
|
|
784
|
+
/**
|
|
785
|
+
* @typedef PaymentOrderData
|
|
786
|
+
* @property {string} [aggregator] - Aggregator name
|
|
787
|
+
* @property {number} [amount] - Amount
|
|
788
|
+
* @property {string} [callback_url] - Callback url for aggregator
|
|
789
|
+
* @property {string} [contact] - Mobile number
|
|
790
|
+
* @property {string} [currency] - Currency
|
|
791
|
+
* @property {string} [customer_id] - Aggregator customer id
|
|
792
|
+
* @property {string} [email] - Email
|
|
793
|
+
* @property {string} [merchant_order_id] - Merchant order id
|
|
794
|
+
* @property {string} [method] - Method
|
|
795
|
+
* @property {string} [order_id] - Aggregator order id
|
|
796
|
+
*/
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* @typedef PaymentOrderMethods
|
|
800
|
+
* @property {number} amount - Amount to be collected
|
|
801
|
+
* @property {PaymentMethodsMetaOrder} meta
|
|
802
|
+
* @property {string} mode - Payment mode
|
|
803
|
+
* @property {string} name - Payment mode name
|
|
804
|
+
* @property {string} [payment] - Payment type i.e. Required / Blocked
|
|
805
|
+
*/
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* @typedef PaymentOrderRequest
|
|
809
|
+
* @property {string} order_id - Order id
|
|
810
|
+
* @property {PaymentOrderMethods[]} [payment_methods]
|
|
811
|
+
* @property {string} [shipment_id] - Shipment_id
|
|
812
|
+
*/
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* @typedef PaymentOrderResponse
|
|
816
|
+
* @property {string} [callback_url] - Callback url for aggregator
|
|
817
|
+
* @property {PaymentOrderData} [data]
|
|
818
|
+
* @property {string} message - Message
|
|
819
|
+
* @property {string} [order_id] - Merchant order id
|
|
820
|
+
* @property {string} [payment_confirm_url] - Payment confirm url for aggregator
|
|
821
|
+
* @property {number} status_code - HTTP status code
|
|
822
|
+
* @property {boolean} success - Successful or failure
|
|
823
|
+
*/
|
|
824
|
+
|
|
577
825
|
/**
|
|
578
826
|
* @typedef PaymentSessionDetail
|
|
579
827
|
* @property {string} [aggregator_customer_id] - Unique customer id generated by
|
|
@@ -596,10 +844,11 @@ const Joi = require("joi");
|
|
|
596
844
|
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
597
845
|
* etc.) against which payment_session was initiated. This is generated by
|
|
598
846
|
* Fynd payments platform and is unique.
|
|
599
|
-
* @property {string} [kind] - Optional kind of purchase
|
|
847
|
+
* @property {string} [kind] - Optional kind of purchase or payment - one time
|
|
600
848
|
* payment (sale) or subcription. defaults to sale.
|
|
601
849
|
* @property {string} [locale] - User's locale
|
|
602
850
|
* @property {string} [merchant_locale] - Merchant's locale
|
|
851
|
+
* @property {Object} [meta] - Metadata
|
|
603
852
|
* @property {string} mode - Test or live, test mode uses test credentials so
|
|
604
853
|
* that actual payment is not created.
|
|
605
854
|
* @property {string} payment_id - Unique transaction id generated by payment gateway
|
|
@@ -635,6 +884,19 @@ const Joi = require("joi");
|
|
|
635
884
|
* @property {number} total_amount - Amount paid.
|
|
636
885
|
*/
|
|
637
886
|
|
|
887
|
+
/**
|
|
888
|
+
* @typedef PaymentSessionSerializer
|
|
889
|
+
* @property {CartDetailsSerializer} [cart_details]
|
|
890
|
+
* @property {string} [currency] - The currency of the payment.
|
|
891
|
+
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
892
|
+
* etc.) against which payment_session was initiated. This is generated by
|
|
893
|
+
* Fynd payments platform and is unique.
|
|
894
|
+
* @property {Object} payment_details - Object of payment details
|
|
895
|
+
* @property {RefundDetailsSerializer[]} refund_details - Object of refund details
|
|
896
|
+
* @property {string} status - The status of the payment session.
|
|
897
|
+
* @property {number} total_amount - Total amount to be paid
|
|
898
|
+
*/
|
|
899
|
+
|
|
638
900
|
/**
|
|
639
901
|
* @typedef PaymentStatusBulkHandlerRequest
|
|
640
902
|
* @property {string[]} merchant_order_id - List of order ids
|
|
@@ -683,10 +945,10 @@ const Joi = require("joi");
|
|
|
683
945
|
|
|
684
946
|
/**
|
|
685
947
|
* @typedef Payout
|
|
686
|
-
* @property {PayoutCustomer} customers
|
|
948
|
+
* @property {PayoutCustomer} customers
|
|
687
949
|
* @property {boolean} is_active - Enable/DIsable Flag Payout
|
|
688
950
|
* @property {boolean} is_default - Default or not
|
|
689
|
-
* @property {PayoutMoreAttributes} more_attributes
|
|
951
|
+
* @property {PayoutMoreAttributes} more_attributes
|
|
690
952
|
* @property {PayoutAggregator[]} [payouts_aggregators]
|
|
691
953
|
* @property {string} transfer_type - Transafer type
|
|
692
954
|
* @property {string} unique_transfer_no - Display priority of the payment mode
|
|
@@ -726,7 +988,7 @@ const Joi = require("joi");
|
|
|
726
988
|
* @typedef PayoutMoreAttributes
|
|
727
989
|
* @property {string} [account_holder] - Account Holder Name
|
|
728
990
|
* @property {string} [account_no] - Account Number
|
|
729
|
-
* @property {string} [account_type] - Account Type Saving
|
|
991
|
+
* @property {string} [account_type] - Account Type Saving or Current
|
|
730
992
|
* @property {string} [bank_name] - Name of Bank
|
|
731
993
|
* @property {string} [branch_name] - Branch Name
|
|
732
994
|
* @property {string} [city] - City
|
|
@@ -738,8 +1000,8 @@ const Joi = require("joi");
|
|
|
738
1000
|
/**
|
|
739
1001
|
* @typedef PayoutRequest
|
|
740
1002
|
* @property {string} aggregator - Aggregator Name
|
|
741
|
-
* @property {PayoutBankDetails} bank_details
|
|
742
|
-
* @property {boolean} is_active - Enable
|
|
1003
|
+
* @property {PayoutBankDetails} bank_details
|
|
1004
|
+
* @property {boolean} is_active - Enable or Disable Flag Payout
|
|
743
1005
|
* @property {string} transfer_type - Transafer type
|
|
744
1006
|
* @property {string} unique_external_id - Unique Id of Payout
|
|
745
1007
|
* @property {Object} users - Payout users object
|
|
@@ -750,7 +1012,7 @@ const Joi = require("joi");
|
|
|
750
1012
|
* @property {string} aggregator - Aggregator Name
|
|
751
1013
|
* @property {Object} bank_details - Payout bank_details object
|
|
752
1014
|
* @property {boolean} created - Created flag
|
|
753
|
-
* @property {boolean} is_active - Enable
|
|
1015
|
+
* @property {boolean} is_active - Enable or DIsable Flag Payout
|
|
754
1016
|
* @property {string} payment_status - Status of payment
|
|
755
1017
|
* @property {Object} payouts - Payout object
|
|
756
1018
|
* @property {boolean} success - Response is successful or not
|
|
@@ -765,6 +1027,19 @@ const Joi = require("joi");
|
|
|
765
1027
|
* @property {boolean} success - Response is successful or not
|
|
766
1028
|
*/
|
|
767
1029
|
|
|
1030
|
+
/**
|
|
1031
|
+
* @typedef PlatformPaymentModeCopyConfigRequest
|
|
1032
|
+
* @property {FromConfig} from_config
|
|
1033
|
+
* @property {ToConfig} to_config
|
|
1034
|
+
*/
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* @typedef PlatformPaymentModeResponse
|
|
1038
|
+
* @property {Object[]} [items] - List of all aggregator and payment mode details.
|
|
1039
|
+
* @property {string} [message] - Message
|
|
1040
|
+
* @property {boolean} success - Response is successful or not.
|
|
1041
|
+
*/
|
|
1042
|
+
|
|
768
1043
|
/**
|
|
769
1044
|
* @typedef PollingPaymentLinkResponse
|
|
770
1045
|
* @property {string} [aggregator_name] - Aggregator name
|
|
@@ -781,7 +1056,7 @@ const Joi = require("joi");
|
|
|
781
1056
|
|
|
782
1057
|
/**
|
|
783
1058
|
* @typedef ProductCODData
|
|
784
|
-
* @property {
|
|
1059
|
+
* @property {CODChargesLimitsResponse} [cod_charges]
|
|
785
1060
|
* @property {Object} [items] - Item id with its cod availability.
|
|
786
1061
|
*/
|
|
787
1062
|
|
|
@@ -793,6 +1068,16 @@ const Joi = require("joi");
|
|
|
793
1068
|
* @property {boolean} success - Success or failure flag.
|
|
794
1069
|
*/
|
|
795
1070
|
|
|
1071
|
+
/**
|
|
1072
|
+
* @typedef RefundDetailsSerializer
|
|
1073
|
+
* @property {number} amount - Refunded amount
|
|
1074
|
+
* @property {string} created - Timestamp in epoch.
|
|
1075
|
+
* @property {string} currency - The currency of the payment.
|
|
1076
|
+
* @property {string} refund_utr - Unique refund utr generated by payment gateway.
|
|
1077
|
+
* @property {string} request_id - Refund request id, unique id generated by Fynd platform
|
|
1078
|
+
* @property {string} status - The status of the refund.
|
|
1079
|
+
*/
|
|
1080
|
+
|
|
796
1081
|
/**
|
|
797
1082
|
* @typedef RefundPriorityRequestSerializer
|
|
798
1083
|
* @property {boolean} apportion - Apportion refund to multiple sources
|
|
@@ -829,9 +1114,11 @@ const Joi = require("joi");
|
|
|
829
1114
|
/**
|
|
830
1115
|
* @typedef RefundSessionRequestSerializer
|
|
831
1116
|
* @property {string} currency - The currency of the payment.
|
|
1117
|
+
* @property {ErrorDescription} [error]
|
|
832
1118
|
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
833
1119
|
* etc.) against which payment_session was initiated. This is generated by
|
|
834
1120
|
* Fynd payments platform and is unique.
|
|
1121
|
+
* @property {string} [message] - The status of the refund.
|
|
835
1122
|
* @property {Object} [meta] - Meta
|
|
836
1123
|
* @property {PaymentSessionDetail} payment_details - Details of the payment
|
|
837
1124
|
* @property {RefundSessionDetail[]} [refund_details] - Details of the refund
|
|
@@ -895,7 +1182,7 @@ const Joi = require("joi");
|
|
|
895
1182
|
|
|
896
1183
|
/**
|
|
897
1184
|
* @typedef ResendOrCancelPaymentResponse
|
|
898
|
-
* @property {LinkStatus} data
|
|
1185
|
+
* @property {LinkStatus} data
|
|
899
1186
|
* @property {boolean} success - Response is successful or not.
|
|
900
1187
|
*/
|
|
901
1188
|
|
|
@@ -951,6 +1238,13 @@ const Joi = require("joi");
|
|
|
951
1238
|
* @property {boolean} success - Response is successful or not
|
|
952
1239
|
*/
|
|
953
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* @typedef SplitObject
|
|
1243
|
+
* @property {number} [amount_remaining] - Amount pending to be paid
|
|
1244
|
+
* @property {number} [splits_remaining] - Number of splits remaining
|
|
1245
|
+
* @property {number} [total_number_of_splits] - Maximum amount of splits allowed
|
|
1246
|
+
*/
|
|
1247
|
+
|
|
954
1248
|
/**
|
|
955
1249
|
* @typedef StatisticsData
|
|
956
1250
|
* @property {number} active_device_count - No of active devices
|
|
@@ -970,17 +1264,23 @@ const Joi = require("joi");
|
|
|
970
1264
|
* @property {boolean} success - Response is successful or not
|
|
971
1265
|
*/
|
|
972
1266
|
|
|
1267
|
+
/**
|
|
1268
|
+
* @typedef ToConfig
|
|
1269
|
+
* @property {string} business_unit - Business unit name
|
|
1270
|
+
* @property {Object[]} device - Device name to copy the config to
|
|
1271
|
+
*/
|
|
1272
|
+
|
|
973
1273
|
/**
|
|
974
1274
|
* @typedef UpdatePayoutRequest
|
|
975
|
-
* @property {boolean} is_active - Enable
|
|
976
|
-
* @property {boolean} is_default - Enable
|
|
1275
|
+
* @property {boolean} is_active - Enable or Disable Flag Payout
|
|
1276
|
+
* @property {boolean} is_default - Enable or Disable Default Payout
|
|
977
1277
|
* @property {string} unique_external_id - Unique Id of Payout
|
|
978
1278
|
*/
|
|
979
1279
|
|
|
980
1280
|
/**
|
|
981
1281
|
* @typedef UpdatePayoutResponse
|
|
982
|
-
* @property {boolean} is_active - Enable
|
|
983
|
-
* @property {boolean} is_default - Enable
|
|
1282
|
+
* @property {boolean} is_active - Enable or DIsable Flag Payout
|
|
1283
|
+
* @property {boolean} is_default - Enable or Disable Default Payout
|
|
984
1284
|
* @property {boolean} success - Response is successful or not
|
|
985
1285
|
*/
|
|
986
1286
|
|
|
@@ -1016,7 +1316,7 @@ class PaymentPlatformModel {
|
|
|
1016
1316
|
static AddressDetail() {
|
|
1017
1317
|
return Joi.object({
|
|
1018
1318
|
address: Joi.string().allow("").required(),
|
|
1019
|
-
address_type: Joi.string().allow("").
|
|
1319
|
+
address_type: Joi.string().allow("").allow(null),
|
|
1020
1320
|
area: Joi.string().allow("").required(),
|
|
1021
1321
|
area_code: Joi.string().allow("").required(),
|
|
1022
1322
|
area_code_slug: Joi.string().allow("").required(),
|
|
@@ -1037,6 +1337,85 @@ class PaymentPlatformModel {
|
|
|
1037
1337
|
});
|
|
1038
1338
|
}
|
|
1039
1339
|
|
|
1340
|
+
/** @returns {AdvanceObject} */
|
|
1341
|
+
static AdvanceObject() {
|
|
1342
|
+
return Joi.object({
|
|
1343
|
+
all_prepayment_type: Joi.array().items(
|
|
1344
|
+
Joi.string().allow("").allow(null)
|
|
1345
|
+
),
|
|
1346
|
+
allow_custom_advance_amount: Joi.boolean().allow(null),
|
|
1347
|
+
amount: Joi.number().allow(null),
|
|
1348
|
+
cancellation_type: Joi.string().allow("").allow(null),
|
|
1349
|
+
description: Joi.string().allow("").allow(null),
|
|
1350
|
+
display_name: Joi.string().allow("").allow(null),
|
|
1351
|
+
is_active: Joi.boolean().allow(null),
|
|
1352
|
+
prepayment_type: Joi.string().allow("").allow(null),
|
|
1353
|
+
prepayment_value: Joi.number().allow(null),
|
|
1354
|
+
refund_time_limit: Joi.number().allow(null),
|
|
1355
|
+
time_unit: Joi.string().allow("").allow(null),
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/** @returns {AdvancePaymentObject} */
|
|
1360
|
+
static AdvancePaymentObject() {
|
|
1361
|
+
return Joi.object({
|
|
1362
|
+
advance: PaymentPlatformModel.AdvanceObject(),
|
|
1363
|
+
display_name: Joi.string().allow("").allow(null),
|
|
1364
|
+
display_priority: Joi.number().allow(null),
|
|
1365
|
+
list: Joi.array().items(PaymentPlatformModel.PaymentModeList()),
|
|
1366
|
+
name: Joi.string().allow("").allow(null),
|
|
1367
|
+
payment_mode_id: Joi.number().allow(null),
|
|
1368
|
+
split: PaymentPlatformModel.SplitObject(),
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/** @returns {AggregatorControlRequest} */
|
|
1373
|
+
static AggregatorControlRequest() {
|
|
1374
|
+
return Joi.object({
|
|
1375
|
+
business_unit: Joi.string().allow(""),
|
|
1376
|
+
device: Joi.string().allow(""),
|
|
1377
|
+
items: Joi.array().items(Joi.any()),
|
|
1378
|
+
version: PaymentPlatformModel.AggregatorVersionRequestSchema(),
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/** @returns {AggregatorRoute} */
|
|
1383
|
+
static AggregatorRoute() {
|
|
1384
|
+
return Joi.object({
|
|
1385
|
+
api_link: Joi.string().allow("").allow(null),
|
|
1386
|
+
data: Joi.any().allow(null),
|
|
1387
|
+
payment_flow: Joi.string().allow("").allow(null),
|
|
1388
|
+
payment_flow_data: Joi.string().allow("").allow(null),
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/** @returns {AggregatorVersionItemSchema} */
|
|
1393
|
+
static AggregatorVersionItemSchema() {
|
|
1394
|
+
return Joi.object({
|
|
1395
|
+
is_equal_to: Joi.string().allow(""),
|
|
1396
|
+
is_greater_than: Joi.string().allow(""),
|
|
1397
|
+
is_less_than: Joi.string().allow(""),
|
|
1398
|
+
});
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
/** @returns {AggregatorVersionRequestSchema} */
|
|
1402
|
+
static AggregatorVersionRequestSchema() {
|
|
1403
|
+
return Joi.object({
|
|
1404
|
+
is_equal_to: Joi.string().allow(""),
|
|
1405
|
+
is_greater_than: Joi.string().allow(""),
|
|
1406
|
+
is_less_than: Joi.string().allow(""),
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/** @returns {AggregatorVersionResponse} */
|
|
1411
|
+
static AggregatorVersionResponse() {
|
|
1412
|
+
return Joi.object({
|
|
1413
|
+
items: PaymentPlatformModel.AggregatorVersionItemSchema(),
|
|
1414
|
+
message: Joi.string().allow("").required(),
|
|
1415
|
+
success: Joi.boolean().required(),
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1040
1419
|
/** @returns {BankDetailsForOTP} */
|
|
1041
1420
|
static BankDetailsForOTP() {
|
|
1042
1421
|
return Joi.object({
|
|
@@ -1064,6 +1443,16 @@ class PaymentPlatformModel {
|
|
|
1064
1443
|
});
|
|
1065
1444
|
}
|
|
1066
1445
|
|
|
1446
|
+
/** @returns {CartDetailsSerializer} */
|
|
1447
|
+
static CartDetailsSerializer() {
|
|
1448
|
+
return Joi.object({
|
|
1449
|
+
articles: Joi.array().items(Joi.any()).required(),
|
|
1450
|
+
cart_value: Joi.number().required(),
|
|
1451
|
+
items: Joi.any().required(),
|
|
1452
|
+
total_quantity: Joi.number(),
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1067
1456
|
/** @returns {CODChargesLimitsResponse} */
|
|
1068
1457
|
static CODChargesLimitsResponse() {
|
|
1069
1458
|
return Joi.object({
|
|
@@ -1100,7 +1489,6 @@ class PaymentPlatformModel {
|
|
|
1100
1489
|
assign_card_id: Joi.string().allow("").allow(null),
|
|
1101
1490
|
cart_id: Joi.string().allow("").required(),
|
|
1102
1491
|
checkout_mode: Joi.string().allow("").required(),
|
|
1103
|
-
pincode: Joi.string().allow("").required(),
|
|
1104
1492
|
});
|
|
1105
1493
|
}
|
|
1106
1494
|
|
|
@@ -1108,6 +1496,7 @@ class PaymentPlatformModel {
|
|
|
1108
1496
|
static CreatePaymentLinkRequest() {
|
|
1109
1497
|
return Joi.object({
|
|
1110
1498
|
amount: Joi.number().required(),
|
|
1499
|
+
country_phone_code: Joi.string().allow(""),
|
|
1111
1500
|
description: Joi.string().allow("").allow(null),
|
|
1112
1501
|
email: Joi.string().allow("").required(),
|
|
1113
1502
|
external_order_id: Joi.string().allow("").required(),
|
|
@@ -1275,13 +1664,21 @@ class PaymentPlatformModel {
|
|
|
1275
1664
|
/** @returns {ErrorResponse} */
|
|
1276
1665
|
static ErrorResponse() {
|
|
1277
1666
|
return Joi.object({
|
|
1278
|
-
error:
|
|
1667
|
+
error: PaymentPlatformModel.ErrorDescription(),
|
|
1279
1668
|
message: Joi.string().allow("").required(),
|
|
1280
1669
|
status_code: Joi.number().required(),
|
|
1281
1670
|
success: Joi.boolean().required(),
|
|
1282
1671
|
});
|
|
1283
1672
|
}
|
|
1284
1673
|
|
|
1674
|
+
/** @returns {FromConfig} */
|
|
1675
|
+
static FromConfig() {
|
|
1676
|
+
return Joi.object({
|
|
1677
|
+
business_unit: Joi.string().allow("").required(),
|
|
1678
|
+
device: Joi.string().allow("").required(),
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1285
1682
|
/** @returns {GetOauthUrlResponse} */
|
|
1286
1683
|
static GetOauthUrlResponse() {
|
|
1287
1684
|
return Joi.object({
|
|
@@ -1350,7 +1747,7 @@ class PaymentPlatformModel {
|
|
|
1350
1747
|
return Joi.object({
|
|
1351
1748
|
code: Joi.string().allow("").allow(null),
|
|
1352
1749
|
display_name: Joi.string().allow("").allow(null),
|
|
1353
|
-
logos:
|
|
1750
|
+
logos: PaymentPlatformModel.PaymentModeLogo(),
|
|
1354
1751
|
package_name: Joi.string().allow("").allow(null),
|
|
1355
1752
|
});
|
|
1356
1753
|
}
|
|
@@ -1367,7 +1764,7 @@ class PaymentPlatformModel {
|
|
|
1367
1764
|
static LinkStatus() {
|
|
1368
1765
|
return Joi.object({
|
|
1369
1766
|
message: Joi.string().allow("").required(),
|
|
1370
|
-
status: Joi.
|
|
1767
|
+
status: Joi.string().allow("").required(),
|
|
1371
1768
|
});
|
|
1372
1769
|
}
|
|
1373
1770
|
|
|
@@ -1390,20 +1787,20 @@ class PaymentPlatformModel {
|
|
|
1390
1787
|
});
|
|
1391
1788
|
}
|
|
1392
1789
|
|
|
1393
|
-
/** @returns {
|
|
1394
|
-
static
|
|
1790
|
+
/** @returns {MerchantPaymentModeRequest} */
|
|
1791
|
+
static MerchantPaymentModeRequest() {
|
|
1395
1792
|
return Joi.object({
|
|
1396
|
-
|
|
1397
|
-
|
|
1793
|
+
business_unit: Joi.string().allow("").required(),
|
|
1794
|
+
device: Joi.any().required(),
|
|
1795
|
+
items: Joi.array().items(Joi.any()).required(),
|
|
1398
1796
|
});
|
|
1399
1797
|
}
|
|
1400
1798
|
|
|
1401
|
-
/** @returns {
|
|
1402
|
-
static
|
|
1799
|
+
/** @returns {MerchnatPaymentModeRequest} */
|
|
1800
|
+
static MerchnatPaymentModeRequest() {
|
|
1403
1801
|
return Joi.object({
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
success: Joi.boolean().required(),
|
|
1802
|
+
offline: Joi.any().allow(null),
|
|
1803
|
+
online: Joi.any().allow(null),
|
|
1407
1804
|
});
|
|
1408
1805
|
}
|
|
1409
1806
|
|
|
@@ -1526,6 +1923,116 @@ class PaymentPlatformModel {
|
|
|
1526
1923
|
});
|
|
1527
1924
|
}
|
|
1528
1925
|
|
|
1926
|
+
/** @returns {PaymentCustomConfigCustomerRequestSchema} */
|
|
1927
|
+
static PaymentCustomConfigCustomerRequestSchema() {
|
|
1928
|
+
return Joi.object({
|
|
1929
|
+
groups: Joi.array().items(Joi.number()),
|
|
1930
|
+
restriction: Joi.string().allow("").required(),
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
/** @returns {PaymentCustomConfigCustomerSchema} */
|
|
1935
|
+
static PaymentCustomConfigCustomerSchema() {
|
|
1936
|
+
return Joi.object({
|
|
1937
|
+
groups: Joi.array().items(Joi.number()),
|
|
1938
|
+
restriction: Joi.string().allow("").required(),
|
|
1939
|
+
types: Joi.array().items(Joi.string().allow("")),
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/** @returns {PaymentCustomConfigDetailsRequestSchema} */
|
|
1944
|
+
static PaymentCustomConfigDetailsRequestSchema() {
|
|
1945
|
+
return Joi.object({
|
|
1946
|
+
customer: PaymentPlatformModel.PaymentCustomConfigCustomerRequestSchema().required(),
|
|
1947
|
+
min_order_value: Joi.number().required(),
|
|
1948
|
+
payment_mode: PaymentPlatformModel.PaymentCustomConfigModeSchema().required(),
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
/** @returns {PaymentCustomConfigDetailsSchema} */
|
|
1953
|
+
static PaymentCustomConfigDetailsSchema() {
|
|
1954
|
+
return Joi.object({
|
|
1955
|
+
customer: PaymentPlatformModel.PaymentCustomConfigCustomerSchema().required(),
|
|
1956
|
+
min_order_value: Joi.number().required(),
|
|
1957
|
+
payment_mode: PaymentPlatformModel.PaymentCustomConfigModeSchema().required(),
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/** @returns {PaymentCustomConfigModeSchema} */
|
|
1962
|
+
static PaymentCustomConfigModeSchema() {
|
|
1963
|
+
return Joi.object({
|
|
1964
|
+
available: Joi.boolean().required(),
|
|
1965
|
+
post_order: Joi.array().items(Joi.string().allow("")),
|
|
1966
|
+
pre_order: Joi.array().items(Joi.string().allow("")),
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/** @returns {PaymentCustomConfigRequestSchema} */
|
|
1971
|
+
static PaymentCustomConfigRequestSchema() {
|
|
1972
|
+
return Joi.object({
|
|
1973
|
+
business_unit: Joi.string().allow("").required(),
|
|
1974
|
+
items: Joi.array()
|
|
1975
|
+
.items(PaymentPlatformModel.PaymentCustomConfigDetailsRequestSchema())
|
|
1976
|
+
.required(),
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
/** @returns {PaymentCustomConfigResponseSchema} */
|
|
1981
|
+
static PaymentCustomConfigResponseSchema() {
|
|
1982
|
+
return Joi.object({
|
|
1983
|
+
items: Joi.array()
|
|
1984
|
+
.items(PaymentPlatformModel.PaymentModeCustomConfigSchema())
|
|
1985
|
+
.required(),
|
|
1986
|
+
message: Joi.string().allow("").required(),
|
|
1987
|
+
success: Joi.boolean().required(),
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/** @returns {PaymentDetailsSerializer} */
|
|
1992
|
+
static PaymentDetailsSerializer() {
|
|
1993
|
+
return Joi.object({
|
|
1994
|
+
aggregator_customer_id: Joi.string().allow(""),
|
|
1995
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
1996
|
+
amount: Joi.number().required(),
|
|
1997
|
+
amount_captured: Joi.number().required(),
|
|
1998
|
+
amount_refunded: Joi.number(),
|
|
1999
|
+
cancel_url: Joi.string().allow(""),
|
|
2000
|
+
captured: Joi.boolean(),
|
|
2001
|
+
created: Joi.string().allow(""),
|
|
2002
|
+
currency: Joi.string().allow("").required(),
|
|
2003
|
+
g_user_id: Joi.string().allow("").required(),
|
|
2004
|
+
gid: Joi.string().allow("").required(),
|
|
2005
|
+
kind: Joi.string().allow(""),
|
|
2006
|
+
locale: Joi.string().allow(""),
|
|
2007
|
+
merchant_locale: Joi.string().allow(""),
|
|
2008
|
+
meta: Joi.any().allow(null),
|
|
2009
|
+
mode: Joi.string().allow("").required(),
|
|
2010
|
+
payment_id: Joi.string().allow(""),
|
|
2011
|
+
payment_methods: Joi.array().items(Joi.any()).required(),
|
|
2012
|
+
status: Joi.string().allow("").required(),
|
|
2013
|
+
success_url: Joi.string().allow(""),
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
/** @returns {PaymentFlow} */
|
|
2018
|
+
static PaymentFlow() {
|
|
2019
|
+
return Joi.object({
|
|
2020
|
+
ajiodhan: PaymentPlatformModel.AggregatorRoute(),
|
|
2021
|
+
bqr_razorpay: PaymentPlatformModel.AggregatorRoute(),
|
|
2022
|
+
ccavenue: PaymentPlatformModel.AggregatorRoute(),
|
|
2023
|
+
epaylater: PaymentPlatformModel.AggregatorRoute(),
|
|
2024
|
+
fynd: PaymentPlatformModel.AggregatorRoute(),
|
|
2025
|
+
jiopay: PaymentPlatformModel.AggregatorRoute(),
|
|
2026
|
+
juspay: PaymentPlatformModel.AggregatorRoute(),
|
|
2027
|
+
mswipe: PaymentPlatformModel.AggregatorRoute(),
|
|
2028
|
+
payubiz: PaymentPlatformModel.AggregatorRoute(),
|
|
2029
|
+
razorpay: PaymentPlatformModel.AggregatorRoute(),
|
|
2030
|
+
rupifi: PaymentPlatformModel.AggregatorRoute(),
|
|
2031
|
+
simpl: PaymentPlatformModel.AggregatorRoute(),
|
|
2032
|
+
stripe: PaymentPlatformModel.AggregatorRoute(),
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
|
|
1529
2036
|
/** @returns {PaymentGatewayConfig} */
|
|
1530
2037
|
static PaymentGatewayConfig() {
|
|
1531
2038
|
return Joi.object({
|
|
@@ -1608,6 +2115,24 @@ class PaymentPlatformModel {
|
|
|
1608
2115
|
});
|
|
1609
2116
|
}
|
|
1610
2117
|
|
|
2118
|
+
/** @returns {PaymentMethodsMetaOrder} */
|
|
2119
|
+
static PaymentMethodsMetaOrder() {
|
|
2120
|
+
return Joi.object({
|
|
2121
|
+
merchant_code: Joi.string().allow("").required(),
|
|
2122
|
+
payment_gateway: Joi.string().allow("").required(),
|
|
2123
|
+
payment_identifier: Joi.string().allow("").required(),
|
|
2124
|
+
});
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/** @returns {PaymentModeCustomConfigSchema} */
|
|
2128
|
+
static PaymentModeCustomConfigSchema() {
|
|
2129
|
+
return Joi.object({
|
|
2130
|
+
business_unit: Joi.string().allow("").required(),
|
|
2131
|
+
custom_config: PaymentPlatformModel.PaymentCustomConfigDetailsSchema().required(),
|
|
2132
|
+
display_name: Joi.string().allow("").required(),
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
|
|
1611
2136
|
/** @returns {PaymentModeList} */
|
|
1612
2137
|
static PaymentModeList() {
|
|
1613
2138
|
return Joi.object({
|
|
@@ -1640,11 +2165,11 @@ class PaymentPlatformModel {
|
|
|
1640
2165
|
),
|
|
1641
2166
|
intent_app_error_list: Joi.array().items(Joi.string().allow("")),
|
|
1642
2167
|
intent_flow: Joi.boolean().allow(null),
|
|
1643
|
-
logo_url:
|
|
2168
|
+
logo_url: PaymentPlatformModel.PaymentModeLogo(),
|
|
1644
2169
|
merchant_code: Joi.string().allow("").allow(null),
|
|
1645
2170
|
name: Joi.string().allow("").allow(null),
|
|
1646
2171
|
nickname: Joi.string().allow("").allow(null),
|
|
1647
|
-
product_cod_data:
|
|
2172
|
+
product_cod_data: PaymentPlatformModel.ProductCODData(),
|
|
1648
2173
|
remaining_limit: Joi.number().allow(null),
|
|
1649
2174
|
retry_count: Joi.number().allow(null),
|
|
1650
2175
|
timeout: Joi.number().allow(null),
|
|
@@ -1659,6 +2184,18 @@ class PaymentPlatformModel {
|
|
|
1659
2184
|
});
|
|
1660
2185
|
}
|
|
1661
2186
|
|
|
2187
|
+
/** @returns {PaymentModeRouteResponse} */
|
|
2188
|
+
static PaymentModeRouteResponse() {
|
|
2189
|
+
return Joi.object({
|
|
2190
|
+
advance_payment: Joi.array().items(
|
|
2191
|
+
PaymentPlatformModel.AdvancePaymentObject()
|
|
2192
|
+
),
|
|
2193
|
+
payment_breakup: Joi.any(),
|
|
2194
|
+
payment_options: PaymentPlatformModel.PaymentOptionAndFlow().required(),
|
|
2195
|
+
success: Joi.boolean().required(),
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
|
|
1662
2199
|
/** @returns {PaymentObjectListSerializer} */
|
|
1663
2200
|
static PaymentObjectListSerializer() {
|
|
1664
2201
|
return Joi.object({
|
|
@@ -1683,6 +2220,16 @@ class PaymentPlatformModel {
|
|
|
1683
2220
|
});
|
|
1684
2221
|
}
|
|
1685
2222
|
|
|
2223
|
+
/** @returns {PaymentOptionAndFlow} */
|
|
2224
|
+
static PaymentOptionAndFlow() {
|
|
2225
|
+
return Joi.object({
|
|
2226
|
+
payment_flows: PaymentPlatformModel.PaymentFlow().required(),
|
|
2227
|
+
payment_option: Joi.array()
|
|
2228
|
+
.items(PaymentPlatformModel.RootPaymentMode())
|
|
2229
|
+
.required(),
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
|
|
1686
2233
|
/** @returns {PaymentOptions} */
|
|
1687
2234
|
static PaymentOptions() {
|
|
1688
2235
|
return Joi.object({
|
|
@@ -1695,11 +2242,63 @@ class PaymentPlatformModel {
|
|
|
1695
2242
|
/** @returns {PaymentOptionsResponse} */
|
|
1696
2243
|
static PaymentOptionsResponse() {
|
|
1697
2244
|
return Joi.object({
|
|
2245
|
+
payment_breakup: Joi.any(),
|
|
1698
2246
|
payment_options: PaymentPlatformModel.PaymentOptions().required(),
|
|
1699
2247
|
success: Joi.boolean().required(),
|
|
1700
2248
|
});
|
|
1701
2249
|
}
|
|
1702
2250
|
|
|
2251
|
+
/** @returns {PaymentOrderData} */
|
|
2252
|
+
static PaymentOrderData() {
|
|
2253
|
+
return Joi.object({
|
|
2254
|
+
aggregator: Joi.string().allow("").allow(null),
|
|
2255
|
+
amount: Joi.number().allow(null),
|
|
2256
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
2257
|
+
contact: Joi.string().allow("").allow(null),
|
|
2258
|
+
currency: Joi.string().allow("").allow(null),
|
|
2259
|
+
customer_id: Joi.string().allow("").allow(null),
|
|
2260
|
+
email: Joi.string().allow("").allow(null),
|
|
2261
|
+
merchant_order_id: Joi.string().allow("").allow(null),
|
|
2262
|
+
method: Joi.string().allow("").allow(null),
|
|
2263
|
+
order_id: Joi.string().allow("").allow(null),
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
/** @returns {PaymentOrderMethods} */
|
|
2268
|
+
static PaymentOrderMethods() {
|
|
2269
|
+
return Joi.object({
|
|
2270
|
+
amount: Joi.number().required(),
|
|
2271
|
+
meta: PaymentPlatformModel.PaymentMethodsMetaOrder().required(),
|
|
2272
|
+
mode: Joi.string().allow("").required(),
|
|
2273
|
+
name: Joi.string().allow("").required(),
|
|
2274
|
+
payment: Joi.string().allow(""),
|
|
2275
|
+
});
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/** @returns {PaymentOrderRequest} */
|
|
2279
|
+
static PaymentOrderRequest() {
|
|
2280
|
+
return Joi.object({
|
|
2281
|
+
order_id: Joi.string().allow("").required(),
|
|
2282
|
+
payment_methods: Joi.array().items(
|
|
2283
|
+
PaymentPlatformModel.PaymentOrderMethods()
|
|
2284
|
+
),
|
|
2285
|
+
shipment_id: Joi.string().allow(""),
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/** @returns {PaymentOrderResponse} */
|
|
2290
|
+
static PaymentOrderResponse() {
|
|
2291
|
+
return Joi.object({
|
|
2292
|
+
callback_url: Joi.string().allow("").allow(null),
|
|
2293
|
+
data: PaymentPlatformModel.PaymentOrderData(),
|
|
2294
|
+
message: Joi.string().allow("").required(),
|
|
2295
|
+
order_id: Joi.string().allow("").allow(null),
|
|
2296
|
+
payment_confirm_url: Joi.string().allow("").allow(null),
|
|
2297
|
+
status_code: Joi.number().required(),
|
|
2298
|
+
success: Joi.boolean().required(),
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
|
|
1703
2302
|
/** @returns {PaymentSessionDetail} */
|
|
1704
2303
|
static PaymentSessionDetail() {
|
|
1705
2304
|
return Joi.object({
|
|
@@ -1718,6 +2317,7 @@ class PaymentPlatformModel {
|
|
|
1718
2317
|
kind: Joi.string().allow(""),
|
|
1719
2318
|
locale: Joi.string().allow(""),
|
|
1720
2319
|
merchant_locale: Joi.string().allow(""),
|
|
2320
|
+
meta: Joi.any(),
|
|
1721
2321
|
mode: Joi.string().allow("").required(),
|
|
1722
2322
|
payment_id: Joi.string().allow("").required(),
|
|
1723
2323
|
payment_methods: Joi.array().items(Joi.any()).required(),
|
|
@@ -1753,6 +2353,21 @@ class PaymentPlatformModel {
|
|
|
1753
2353
|
});
|
|
1754
2354
|
}
|
|
1755
2355
|
|
|
2356
|
+
/** @returns {PaymentSessionSerializer} */
|
|
2357
|
+
static PaymentSessionSerializer() {
|
|
2358
|
+
return Joi.object({
|
|
2359
|
+
cart_details: PaymentPlatformModel.CartDetailsSerializer(),
|
|
2360
|
+
currency: Joi.string().allow("").allow(null),
|
|
2361
|
+
gid: Joi.string().allow("").allow(null).required(),
|
|
2362
|
+
payment_details: Joi.any().required(),
|
|
2363
|
+
refund_details: Joi.array()
|
|
2364
|
+
.items(PaymentPlatformModel.RefundDetailsSerializer())
|
|
2365
|
+
.required(),
|
|
2366
|
+
status: Joi.string().allow("").required(),
|
|
2367
|
+
total_amount: Joi.number().required(),
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
|
|
1756
2371
|
/** @returns {PaymentStatusBulkHandlerRequest} */
|
|
1757
2372
|
static PaymentStatusBulkHandlerRequest() {
|
|
1758
2373
|
return Joi.object({
|
|
@@ -1913,6 +2528,23 @@ class PaymentPlatformModel {
|
|
|
1913
2528
|
});
|
|
1914
2529
|
}
|
|
1915
2530
|
|
|
2531
|
+
/** @returns {PlatformPaymentModeCopyConfigRequest} */
|
|
2532
|
+
static PlatformPaymentModeCopyConfigRequest() {
|
|
2533
|
+
return Joi.object({
|
|
2534
|
+
from_config: PaymentPlatformModel.FromConfig().required(),
|
|
2535
|
+
to_config: PaymentPlatformModel.ToConfig().required(),
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/** @returns {PlatformPaymentModeResponse} */
|
|
2540
|
+
static PlatformPaymentModeResponse() {
|
|
2541
|
+
return Joi.object({
|
|
2542
|
+
items: Joi.array().items(Joi.any()),
|
|
2543
|
+
message: Joi.string().allow("").allow(null),
|
|
2544
|
+
success: Joi.boolean().required(),
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
|
|
1916
2548
|
/** @returns {PollingPaymentLinkResponse} */
|
|
1917
2549
|
static PollingPaymentLinkResponse() {
|
|
1918
2550
|
return Joi.object({
|
|
@@ -1932,7 +2564,7 @@ class PaymentPlatformModel {
|
|
|
1932
2564
|
/** @returns {ProductCODData} */
|
|
1933
2565
|
static ProductCODData() {
|
|
1934
2566
|
return Joi.object({
|
|
1935
|
-
cod_charges:
|
|
2567
|
+
cod_charges: PaymentPlatformModel.CODChargesLimitsResponse(),
|
|
1936
2568
|
items: Joi.any().allow(null),
|
|
1937
2569
|
});
|
|
1938
2570
|
}
|
|
@@ -1947,6 +2579,18 @@ class PaymentPlatformModel {
|
|
|
1947
2579
|
});
|
|
1948
2580
|
}
|
|
1949
2581
|
|
|
2582
|
+
/** @returns {RefundDetailsSerializer} */
|
|
2583
|
+
static RefundDetailsSerializer() {
|
|
2584
|
+
return Joi.object({
|
|
2585
|
+
amount: Joi.number().required(),
|
|
2586
|
+
created: Joi.string().allow("").required(),
|
|
2587
|
+
currency: Joi.string().allow("").required(),
|
|
2588
|
+
refund_utr: Joi.string().allow("").required(),
|
|
2589
|
+
request_id: Joi.string().allow("").required(),
|
|
2590
|
+
status: Joi.string().allow("").required(),
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
|
|
1950
2594
|
/** @returns {RefundPriorityRequestSerializer} */
|
|
1951
2595
|
static RefundPriorityRequestSerializer() {
|
|
1952
2596
|
return Joi.object({
|
|
@@ -1992,7 +2636,9 @@ class PaymentPlatformModel {
|
|
|
1992
2636
|
static RefundSessionRequestSerializer() {
|
|
1993
2637
|
return Joi.object({
|
|
1994
2638
|
currency: Joi.string().allow("").required(),
|
|
2639
|
+
error: PaymentPlatformModel.ErrorDescription(),
|
|
1995
2640
|
gid: Joi.string().allow("").required(),
|
|
2641
|
+
message: Joi.string().allow(""),
|
|
1996
2642
|
meta: Joi.any(),
|
|
1997
2643
|
payment_details: PaymentPlatformModel.PaymentSessionDetail().required(),
|
|
1998
2644
|
refund_details: Joi.array().items(
|
|
@@ -2142,6 +2788,15 @@ class PaymentPlatformModel {
|
|
|
2142
2788
|
});
|
|
2143
2789
|
}
|
|
2144
2790
|
|
|
2791
|
+
/** @returns {SplitObject} */
|
|
2792
|
+
static SplitObject() {
|
|
2793
|
+
return Joi.object({
|
|
2794
|
+
amount_remaining: Joi.number().allow(null),
|
|
2795
|
+
splits_remaining: Joi.number().allow(null),
|
|
2796
|
+
total_number_of_splits: Joi.number().allow(null),
|
|
2797
|
+
});
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2145
2800
|
/** @returns {StatisticsData} */
|
|
2146
2801
|
static StatisticsData() {
|
|
2147
2802
|
return Joi.object({
|
|
@@ -2167,6 +2822,14 @@ class PaymentPlatformModel {
|
|
|
2167
2822
|
});
|
|
2168
2823
|
}
|
|
2169
2824
|
|
|
2825
|
+
/** @returns {ToConfig} */
|
|
2826
|
+
static ToConfig() {
|
|
2827
|
+
return Joi.object({
|
|
2828
|
+
business_unit: Joi.string().allow("").required(),
|
|
2829
|
+
device: Joi.array().items(Joi.any()).required(),
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2170
2833
|
/** @returns {UpdatePayoutRequest} */
|
|
2171
2834
|
static UpdatePayoutRequest() {
|
|
2172
2835
|
return Joi.object({
|