@gofynd/fdk-client-javascript 1.4.7 → 1.4.8-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
- package/sdk/application/Cart/CartApplicationClient.js +118 -13
- package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
- package/sdk/application/Cart/CartApplicationModel.js +98 -26
- package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
- package/sdk/application/Cart/CartApplicationValidator.js +26 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +4 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.js +5 -3
- package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
- package/sdk/application/Content/ContentApplicationModel.js +6 -20
- package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationValidator.js +4 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
- package/sdk/application/Lead/LeadApplicationClient.js +0 -167
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
- package/sdk/application/Lead/LeadApplicationModel.js +0 -126
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +4 -0
- package/sdk/application/Order/OrderApplicationModel.js +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +9 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +5 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
- package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +47 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +56 -4
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
- package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
- package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
- package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +28 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +198 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +81 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +214 -40
- package/sdk/platform/Cart/CartPlatformModel.js +164 -24
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +28 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +12 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
- package/sdk/platform/Content/ContentPlatformModel.js +8 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +369 -129
- package/sdk/platform/Finance/FinancePlatformModel.js +404 -110
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
- package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
- package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
- package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
- package/sdk/platform/Order/OrderPlatformModel.d.ts +126 -15
- package/sdk/platform/Order/OrderPlatformModel.js +55 -14
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +20 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +26 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
- package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +0 -2
- package/sdk/platform/User/UserPlatformModel.js +0 -2
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +0 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +94 -146
- package/sdk/platform/Webhook/WebhookPlatformModel.js +100 -151
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +9 -35
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +8 -46
- package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
- package/sdk/public/Billing/BillingPublicClient.js +156 -3
- package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
- package/sdk/public/Billing/BillingPublicModel.js +317 -18
- package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
- package/sdk/public/Billing/BillingPublicValidator.js +22 -3
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +22 -22
- package/sdk/public/Webhook/WebhookPublicModel.js +22 -22
|
@@ -1,5 +1,152 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef CompanyInfo
|
|
5
|
+
* @property {string} [company_name]
|
|
6
|
+
* @property {string} [gstin]
|
|
7
|
+
* @property {string} [address]
|
|
8
|
+
* @property {AddressDetails} [address_details]
|
|
9
|
+
* @property {string} [pan]
|
|
10
|
+
* @property {string} [phone]
|
|
11
|
+
* @property {string} [email]
|
|
12
|
+
* @property {string} [cin]
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef AddressDetails
|
|
17
|
+
* @property {string} [address_line_1]
|
|
18
|
+
* @property {string} [address_line_2]
|
|
19
|
+
* @property {string} [city]
|
|
20
|
+
* @property {string} [pincode]
|
|
21
|
+
* @property {string} [state]
|
|
22
|
+
* @property {string} [country]
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @typedef InvoiceData
|
|
27
|
+
* @property {InvoiceDetailsData} [invoice]
|
|
28
|
+
* @property {InvoiceItems[]} [invoice_items]
|
|
29
|
+
* @property {CompanyInfo} [shopsense_details]
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @typedef InvoiceDetailsData
|
|
34
|
+
* @property {number} [attemp]
|
|
35
|
+
* @property {Object} [documents]
|
|
36
|
+
* @property {Object} [payment]
|
|
37
|
+
* @property {Period} [period]
|
|
38
|
+
* @property {Client} [client]
|
|
39
|
+
* @property {Object} [discount]
|
|
40
|
+
* @property {Object} [taxation]
|
|
41
|
+
* @property {string} [_id]
|
|
42
|
+
* @property {boolean} [auto_advance]
|
|
43
|
+
* @property {string} [collection_method]
|
|
44
|
+
* @property {string} [subscriber_id]
|
|
45
|
+
* @property {string} [currency]
|
|
46
|
+
* @property {string} [invoice_url]
|
|
47
|
+
* @property {string} [number]
|
|
48
|
+
* @property {boolean} [paid]
|
|
49
|
+
* @property {Object} [pg_data]
|
|
50
|
+
* @property {string} [receipt_number]
|
|
51
|
+
* @property {string} [statement_descriptor]
|
|
52
|
+
* @property {string} [current_status]
|
|
53
|
+
* @property {StatusTrail[]} [status_trail]
|
|
54
|
+
* @property {number} [subtotal]
|
|
55
|
+
* @property {number} [total]
|
|
56
|
+
* @property {number} [old_settlement]
|
|
57
|
+
* @property {number} [credit_balance]
|
|
58
|
+
* @property {string} [subscription]
|
|
59
|
+
* @property {number} [attempt]
|
|
60
|
+
* @property {string} [next_action_time]
|
|
61
|
+
* @property {number} [credit_note_amount]
|
|
62
|
+
* @property {string} [created_at]
|
|
63
|
+
* @property {string} [modified_at]
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @typedef Client
|
|
68
|
+
* @property {string} [name]
|
|
69
|
+
* @property {string} [email]
|
|
70
|
+
* @property {string} [phone]
|
|
71
|
+
* @property {string[]} [address_lines]
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @typedef Period
|
|
76
|
+
* @property {string} [start]
|
|
77
|
+
* @property {string} [end]
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @typedef StatusTrail
|
|
82
|
+
* @property {string} [value]
|
|
83
|
+
* @property {string} [timestamp]
|
|
84
|
+
* @property {string} [_id]
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @typedef PaymentCollectRes
|
|
89
|
+
* @property {string} [transaction_id]
|
|
90
|
+
* @property {string} [current_status]
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @typedef SubscriptionChargeRes
|
|
95
|
+
* @property {string} [_id]
|
|
96
|
+
* @property {string} [product_suit_id]
|
|
97
|
+
* @property {string} [entity_id]
|
|
98
|
+
* @property {string} [entity_type]
|
|
99
|
+
* @property {string} [name]
|
|
100
|
+
* @property {string} [status]
|
|
101
|
+
* @property {number} [trial_days]
|
|
102
|
+
* @property {string} [activated_on]
|
|
103
|
+
* @property {string} [cancelled_on]
|
|
104
|
+
* @property {boolean} [is_test]
|
|
105
|
+
* @property {string} [created_at]
|
|
106
|
+
* @property {string} [modified_at]
|
|
107
|
+
* @property {string} [company_id]
|
|
108
|
+
* @property {Object[]} [line_items]
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @typedef PostDowngradeRes
|
|
113
|
+
* @property {boolean} [success]
|
|
114
|
+
* @property {DowngradeRes} [data]
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef DowngradeRes
|
|
119
|
+
* @property {string} [_id]
|
|
120
|
+
* @property {string} [status]
|
|
121
|
+
* @property {string} [subscriber_id]
|
|
122
|
+
* @property {boolean} [activated]
|
|
123
|
+
* @property {string} [created_at]
|
|
124
|
+
* @property {string} [modified_at]
|
|
125
|
+
* @property {string} [plan_id]
|
|
126
|
+
* @property {string} [reason]
|
|
127
|
+
* @property {string} [request_user_id]
|
|
128
|
+
* @property {string} [subscription_id]
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @typedef PaymentStatusData
|
|
133
|
+
* @property {string} [_id]
|
|
134
|
+
* @property {string} [journey]
|
|
135
|
+
* @property {Object[]} [webhook_response]
|
|
136
|
+
* @property {string} [aggregator_status]
|
|
137
|
+
* @property {string} [current_status]
|
|
138
|
+
* @property {string} [created_at]
|
|
139
|
+
* @property {string} [modified_at]
|
|
140
|
+
* @property {number} [__v]
|
|
141
|
+
* @property {string} [aggregator_order_id]
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @typedef PaymentStatusResponse
|
|
146
|
+
* @property {string} [status]
|
|
147
|
+
* @property {PaymentStatusData} [data]
|
|
148
|
+
*/
|
|
149
|
+
|
|
3
150
|
/**
|
|
4
151
|
* @typedef BadRequest
|
|
5
152
|
* @property {string} [message] - Failure message.
|
|
@@ -8,6 +155,8 @@ const Joi = require("joi");
|
|
|
8
155
|
/**
|
|
9
156
|
* @typedef ResourceNotFound
|
|
10
157
|
* @property {string} [message] - Resource not found with {id}
|
|
158
|
+
* @property {Object} [code]
|
|
159
|
+
* @property {Object} [success]
|
|
11
160
|
*/
|
|
12
161
|
|
|
13
162
|
/**
|
|
@@ -28,8 +177,16 @@ const Joi = require("joi");
|
|
|
28
177
|
* @property {number} [interval_count]
|
|
29
178
|
*/
|
|
30
179
|
|
|
180
|
+
/**
|
|
181
|
+
* @typedef PlanMeta
|
|
182
|
+
* @property {string} [seller_status]
|
|
183
|
+
* @property {string} [company]
|
|
184
|
+
* @property {string} [plan_platform_display_name]
|
|
185
|
+
*/
|
|
186
|
+
|
|
31
187
|
/**
|
|
32
188
|
* @typedef Plan
|
|
189
|
+
* @property {Object[]} [fee_components]
|
|
33
190
|
* @property {PlanRecurring} [recurring]
|
|
34
191
|
* @property {boolean} [is_trial_plan]
|
|
35
192
|
* @property {string} [plan_group]
|
|
@@ -49,6 +206,16 @@ const Joi = require("joi");
|
|
|
49
206
|
* @property {string} [product_suite_id]
|
|
50
207
|
* @property {string} [created_at]
|
|
51
208
|
* @property {string} [modified_at]
|
|
209
|
+
* @property {Taxation} [taxation]
|
|
210
|
+
* @property {OneTimeFees} [one_time_fees]
|
|
211
|
+
* @property {CreditLine} [credit_line]
|
|
212
|
+
* @property {string} [current_status]
|
|
213
|
+
* @property {string} [channel_type]
|
|
214
|
+
* @property {Object[]} [company_ids]
|
|
215
|
+
* @property {string} [platform]
|
|
216
|
+
* @property {string} [activated_on]
|
|
217
|
+
* @property {PlanMeta} [meta]
|
|
218
|
+
* @property {string} [created_by]
|
|
52
219
|
*/
|
|
53
220
|
|
|
54
221
|
/**
|
|
@@ -59,43 +226,16 @@ const Joi = require("joi");
|
|
|
59
226
|
|
|
60
227
|
/**
|
|
61
228
|
* @typedef EntityChargePrice
|
|
62
|
-
* @property {number} amount - Amount for price. Minimum value 1
|
|
63
|
-
* @property {string} currency_code
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @typedef EntityChargeRecurring
|
|
68
|
-
* @property {string} interval
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @typedef ChargeLineItem
|
|
73
|
-
* @property {string} name
|
|
74
|
-
* @property {string} term
|
|
75
|
-
* @property {string} pricing_type
|
|
76
|
-
* @property {EntityChargePrice} price
|
|
77
|
-
* @property {EntityChargeRecurring} [recurring]
|
|
78
|
-
* @property {number} [capped_amount]
|
|
79
|
-
* @property {number} [trial_days]
|
|
80
|
-
* @property {boolean} [is_test]
|
|
81
|
-
* @property {Object} [metadata]
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @typedef CreateSubscriptionCharge
|
|
86
|
-
* @property {string} name
|
|
87
|
-
* @property {number} [trial_days]
|
|
88
|
-
* @property {ChargeLineItem[]} line_items
|
|
89
|
-
* @property {boolean} [is_test]
|
|
90
|
-
* @property {string} return_url
|
|
229
|
+
* @property {number} [amount] - Amount for price. Minimum value 1
|
|
230
|
+
* @property {string} [currency_code]
|
|
91
231
|
*/
|
|
92
232
|
|
|
93
233
|
/**
|
|
94
234
|
* @typedef OneTimeChargeItem
|
|
95
|
-
* @property {string} name
|
|
235
|
+
* @property {string} [name]
|
|
96
236
|
* @property {string} [term]
|
|
97
|
-
* @property {string} pricing_type
|
|
98
|
-
* @property {EntityChargePrice} price
|
|
237
|
+
* @property {string} [pricing_type]
|
|
238
|
+
* @property {EntityChargePrice} [price]
|
|
99
239
|
* @property {number} [capped_amount]
|
|
100
240
|
* @property {boolean} [is_test]
|
|
101
241
|
* @property {Object} [metadata]
|
|
@@ -103,52 +243,52 @@ const Joi = require("joi");
|
|
|
103
243
|
|
|
104
244
|
/**
|
|
105
245
|
* @typedef CreateOneTimeCharge
|
|
106
|
-
* @property {string} name
|
|
107
|
-
* @property {OneTimeChargeItem} charge
|
|
246
|
+
* @property {string} [name]
|
|
247
|
+
* @property {OneTimeChargeItem} [charge]
|
|
108
248
|
* @property {boolean} [is_test]
|
|
109
|
-
* @property {string} return_url
|
|
249
|
+
* @property {string} [return_url]
|
|
110
250
|
*/
|
|
111
251
|
|
|
112
252
|
/**
|
|
113
|
-
* @typedef
|
|
114
|
-
* @property {string} [
|
|
115
|
-
* @property {
|
|
253
|
+
* @typedef ChargeRecurring
|
|
254
|
+
* @property {string} [interval]
|
|
255
|
+
* @property {number} [interval_time]
|
|
116
256
|
*/
|
|
117
257
|
|
|
118
258
|
/**
|
|
119
|
-
* @typedef
|
|
259
|
+
* @typedef ChargeDetails
|
|
120
260
|
* @property {string} [_id]
|
|
261
|
+
* @property {string} [entity_type]
|
|
262
|
+
* @property {string} [entity_id]
|
|
121
263
|
* @property {string} [name]
|
|
122
|
-
* @property {string} [term]
|
|
264
|
+
* @property {string} [term]
|
|
265
|
+
* @property {string} [charge_type]
|
|
123
266
|
* @property {string} [pricing_type]
|
|
124
267
|
* @property {EntityChargePrice} [price]
|
|
125
|
-
* @property {
|
|
268
|
+
* @property {ChargeRecurring} [recurring]
|
|
269
|
+
* @property {string} [status]
|
|
126
270
|
* @property {number} [capped_amount]
|
|
127
271
|
* @property {string} [activated_on]
|
|
128
272
|
* @property {string} [cancelled_on]
|
|
129
273
|
* @property {string} [billing_date]
|
|
130
|
-
* @property {
|
|
131
|
-
* @property {string} [
|
|
274
|
+
* @property {SubscriptionTrialPeriod} [current_period]
|
|
275
|
+
* @property {string} [modified_at]
|
|
276
|
+
* @property {string} [created_at]
|
|
132
277
|
* @property {boolean} [is_test]
|
|
133
|
-
* @property {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @typedef EntitySubscription
|
|
138
|
-
* @property {string} [_id]
|
|
139
|
-
* @property {string} [name]
|
|
140
|
-
* @property {string} [status]
|
|
141
|
-
* @property {number} [company_id]
|
|
142
|
-
* @property {string} [activated_on]
|
|
143
|
-
* @property {string} [cancelled_on]
|
|
144
|
-
* @property {number} [trial_days]
|
|
145
|
-
* @property {SubscriptionTrialPeriod} [trial_period]
|
|
146
|
-
* @property {Object} [metadata]
|
|
147
|
-
* @property {SubscriptionCharge[]} [line_items]
|
|
278
|
+
* @property {string} [company_id]
|
|
279
|
+
* @property {Object} [meta]
|
|
280
|
+
* @property {number} [__v]
|
|
148
281
|
*/
|
|
149
282
|
|
|
150
283
|
/**
|
|
151
284
|
* @typedef OneTimeChargeEntity
|
|
285
|
+
* @property {string} [term]
|
|
286
|
+
* @property {string} [charge_type]
|
|
287
|
+
* @property {number} [capped_amount]
|
|
288
|
+
* @property {string} [billing_date]
|
|
289
|
+
* @property {string} [created_at]
|
|
290
|
+
* @property {string} [modified_at]
|
|
291
|
+
* @property {number} [__v]
|
|
152
292
|
* @property {string} [_id]
|
|
153
293
|
* @property {string} [name]
|
|
154
294
|
* @property {string} [status]
|
|
@@ -167,28 +307,13 @@ const Joi = require("joi");
|
|
|
167
307
|
|
|
168
308
|
/**
|
|
169
309
|
* @typedef CreateOneTimeChargeResponse
|
|
170
|
-
* @property {
|
|
171
|
-
* @property {string} [confirm_url]
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @typedef CreateSubscriptionResponse
|
|
176
|
-
* @property {EntitySubscription} [subscription]
|
|
310
|
+
* @property {Charge} [charge]
|
|
177
311
|
* @property {string} [confirm_url]
|
|
178
312
|
*/
|
|
179
313
|
|
|
180
314
|
/**
|
|
181
|
-
* @typedef
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {string} [end]
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @typedef InvoiceDetailsClient
|
|
188
|
-
* @property {string[]} [address_lines]
|
|
189
|
-
* @property {string} [name]
|
|
190
|
-
* @property {string} [email]
|
|
191
|
-
* @property {string} [phone]
|
|
315
|
+
* @typedef Charge
|
|
316
|
+
* @property {OneTimeChargeEntity} [final_charge]
|
|
192
317
|
*/
|
|
193
318
|
|
|
194
319
|
/**
|
|
@@ -198,39 +323,6 @@ const Joi = require("joi");
|
|
|
198
323
|
* @property {string} [timestamp]
|
|
199
324
|
*/
|
|
200
325
|
|
|
201
|
-
/**
|
|
202
|
-
* @typedef InvoicePaymentMethod
|
|
203
|
-
* @property {string} [pg_payment_method_id]
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @typedef InvoiceDetails
|
|
208
|
-
* @property {InvoiceDetailsPeriod} [period]
|
|
209
|
-
* @property {InvoiceDetailsClient} [client]
|
|
210
|
-
* @property {boolean} [auto_advance]
|
|
211
|
-
* @property {string} [currency]
|
|
212
|
-
* @property {boolean} [paid]
|
|
213
|
-
* @property {number} [attemp]
|
|
214
|
-
* @property {string} [_id]
|
|
215
|
-
* @property {string} [collection_method]
|
|
216
|
-
* @property {string} [subscriber_id]
|
|
217
|
-
* @property {string} [invoice_url]
|
|
218
|
-
* @property {string} [number]
|
|
219
|
-
* @property {Object} [pg_data]
|
|
220
|
-
* @property {string} [receipt_number]
|
|
221
|
-
* @property {string} [statement_descriptor]
|
|
222
|
-
* @property {string} [current_status]
|
|
223
|
-
* @property {InvoiceDetailsStatusTrail[]} [status_trail]
|
|
224
|
-
* @property {number} [subtotal]
|
|
225
|
-
* @property {number} [total]
|
|
226
|
-
* @property {string} [subscription]
|
|
227
|
-
* @property {string} [next_action_time]
|
|
228
|
-
* @property {string} [created_at]
|
|
229
|
-
* @property {string} [modified_at]
|
|
230
|
-
* @property {string} [hash_identifier]
|
|
231
|
-
* @property {InvoicePaymentMethod} [payment_method]
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
326
|
/**
|
|
235
327
|
* @typedef InvoiceItemsPlanRecurring
|
|
236
328
|
* @property {string} [interval]
|
|
@@ -283,12 +375,6 @@ const Joi = require("joi");
|
|
|
283
375
|
* @property {string} [modified_at]
|
|
284
376
|
*/
|
|
285
377
|
|
|
286
|
-
/**
|
|
287
|
-
* @typedef Invoice
|
|
288
|
-
* @property {InvoiceDetails} [invoice]
|
|
289
|
-
* @property {InvoiceItems[]} [invoice_items]
|
|
290
|
-
*/
|
|
291
|
-
|
|
292
378
|
/**
|
|
293
379
|
* @typedef InvoicesDataClient
|
|
294
380
|
* @property {string} [name]
|
|
@@ -311,6 +397,13 @@ const Joi = require("joi");
|
|
|
311
397
|
/**
|
|
312
398
|
* @typedef InvoicesData
|
|
313
399
|
* @property {string} [_id]
|
|
400
|
+
* @property {Object} [documents]
|
|
401
|
+
* @property {Object} [payment]
|
|
402
|
+
* @property {number} [old_settlement]
|
|
403
|
+
* @property {number} [credit_balance]
|
|
404
|
+
* @property {Object} [discount]
|
|
405
|
+
* @property {Object} [taxation]
|
|
406
|
+
* @property {number} [credit_note_amount]
|
|
314
407
|
* @property {InvoicesDataClient} [client]
|
|
315
408
|
* @property {boolean} [auto_advance]
|
|
316
409
|
* @property {string} [currency]
|
|
@@ -375,6 +468,11 @@ const Joi = require("joi");
|
|
|
375
468
|
* @property {string} [created_at]
|
|
376
469
|
* @property {string} [modified_at]
|
|
377
470
|
* @property {Object} [data]
|
|
471
|
+
* @property {Object} [documents]
|
|
472
|
+
* @property {boolean} [consent]
|
|
473
|
+
* @property {boolean} [comms]
|
|
474
|
+
* @property {number} [credit_balance]
|
|
475
|
+
* @property {BusinessCountryInfo} [business_country_info]
|
|
378
476
|
*/
|
|
379
477
|
|
|
380
478
|
/**
|
|
@@ -413,6 +511,7 @@ const Joi = require("joi");
|
|
|
413
511
|
|
|
414
512
|
/**
|
|
415
513
|
* @typedef Subscription
|
|
514
|
+
* @property {Object} [meta]
|
|
416
515
|
* @property {SubscriptionCurrentPeriod} [current_period]
|
|
417
516
|
* @property {SubscriptionPauseCollection} [pause_collection]
|
|
418
517
|
* @property {SubscriptionTrial} [trial]
|
|
@@ -430,6 +529,9 @@ const Joi = require("joi");
|
|
|
430
529
|
* @property {string} [modified_at]
|
|
431
530
|
* @property {string} [latest_invoice]
|
|
432
531
|
* @property {string} [channel_type]
|
|
532
|
+
* @property {boolean} [freezed]
|
|
533
|
+
* @property {string} [cancel_at]
|
|
534
|
+
* @property {string} [canceled_at]
|
|
433
535
|
*/
|
|
434
536
|
|
|
435
537
|
/**
|
|
@@ -439,7 +541,8 @@ const Joi = require("joi");
|
|
|
439
541
|
* @property {InvoicesData} [latest_invoice]
|
|
440
542
|
* @property {Plan} [next_plan]
|
|
441
543
|
* @property {Subscription[]} [current_subscriptions]
|
|
442
|
-
* @property {
|
|
544
|
+
* @property {number} [mandate_amount]
|
|
545
|
+
* @property {string} [message]
|
|
443
546
|
*/
|
|
444
547
|
|
|
445
548
|
/**
|
|
@@ -494,6 +597,20 @@ const Joi = require("joi");
|
|
|
494
597
|
* @property {boolean} [is_trial_plan]
|
|
495
598
|
*/
|
|
496
599
|
|
|
600
|
+
/**
|
|
601
|
+
* @typedef IntentReq
|
|
602
|
+
* @property {string} [unique_external_id]
|
|
603
|
+
* @property {string} [plan_id]
|
|
604
|
+
*/
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* @typedef PutIntentReq
|
|
608
|
+
* @property {string} [unique_external_id]
|
|
609
|
+
* @property {string} [setup_intent_id]
|
|
610
|
+
* @property {string} [payment_method_id]
|
|
611
|
+
* @property {boolean} [set_default]
|
|
612
|
+
*/
|
|
613
|
+
|
|
497
614
|
/**
|
|
498
615
|
* @typedef SubscriptionActivateReq
|
|
499
616
|
* @property {string} [unique_id]
|
|
@@ -501,6 +618,9 @@ const Joi = require("joi");
|
|
|
501
618
|
* @property {string} [product_suite]
|
|
502
619
|
* @property {string} [plan_id]
|
|
503
620
|
* @property {string} [payment_method]
|
|
621
|
+
* @property {string} [subscription_id]
|
|
622
|
+
* @property {string} [coupon]
|
|
623
|
+
* @property {Object} [meta]
|
|
504
624
|
*/
|
|
505
625
|
|
|
506
626
|
/**
|
|
@@ -555,763 +675,1861 @@ const Joi = require("joi");
|
|
|
555
675
|
*/
|
|
556
676
|
|
|
557
677
|
/**
|
|
558
|
-
* @typedef
|
|
678
|
+
* @typedef EntityDetail
|
|
679
|
+
* @property {string} [entity]
|
|
680
|
+
* @property {Subscription} [item]
|
|
681
|
+
*/
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @typedef PaymentOptions
|
|
685
|
+
* @property {string} [_id]
|
|
559
686
|
* @property {string} [name]
|
|
560
|
-
* @property {string} [slug]
|
|
561
687
|
* @property {string} [description]
|
|
562
|
-
* @property {string} [
|
|
563
|
-
* @property {
|
|
564
|
-
* @property {string} [
|
|
688
|
+
* @property {string} [logo]
|
|
689
|
+
* @property {string} [aggregator_id]
|
|
690
|
+
* @property {string} [aggregator]
|
|
691
|
+
* @property {string} [created_at]
|
|
692
|
+
* @property {string} [modified_at]
|
|
693
|
+
* @property {number} [__v]
|
|
565
694
|
*/
|
|
566
695
|
|
|
567
696
|
/**
|
|
568
|
-
* @typedef
|
|
569
|
-
* @property {string
|
|
570
|
-
* @property {string
|
|
571
|
-
* @property {
|
|
572
|
-
* @property {
|
|
573
|
-
* @property {string} [
|
|
574
|
-
* @property {Object} [settle_cycle_period]
|
|
575
|
-
* @property {Object[]} [components]
|
|
697
|
+
* @typedef VerifyPaymentReq
|
|
698
|
+
* @property {string} [razorpay_payment_id]
|
|
699
|
+
* @property {string} [razorpay_order_id]
|
|
700
|
+
* @property {string} [razorpay_signature]
|
|
701
|
+
* @property {number} [status_code]
|
|
702
|
+
* @property {string} [provider_type]
|
|
576
703
|
*/
|
|
577
704
|
|
|
578
705
|
/**
|
|
579
|
-
* @typedef
|
|
580
|
-
* @property {
|
|
581
|
-
* @property {
|
|
706
|
+
* @typedef Documents
|
|
707
|
+
* @property {string} [pan]
|
|
708
|
+
* @property {string} [gst]
|
|
582
709
|
*/
|
|
583
710
|
|
|
584
711
|
/**
|
|
585
|
-
* @typedef
|
|
586
|
-
* @property {
|
|
587
|
-
* @property {
|
|
588
|
-
* @property {
|
|
589
|
-
* @property {
|
|
712
|
+
* @typedef BillingAddress
|
|
713
|
+
* @property {string} [country]
|
|
714
|
+
* @property {string} [state]
|
|
715
|
+
* @property {string} [city]
|
|
716
|
+
* @property {string} [line1]
|
|
717
|
+
* @property {string} [line2]
|
|
718
|
+
* @property {string} [postal_code]
|
|
719
|
+
* @property {string} [country_code]
|
|
590
720
|
*/
|
|
591
721
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}
|
|
722
|
+
/**
|
|
723
|
+
* @typedef Currency
|
|
724
|
+
* @property {string} [code]
|
|
725
|
+
* @property {string} [symbol]
|
|
726
|
+
* @property {string} [name]
|
|
727
|
+
*/
|
|
599
728
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
729
|
+
/**
|
|
730
|
+
* @typedef BusinessCountryInfo
|
|
731
|
+
* @property {string} [country]
|
|
732
|
+
* @property {string} [country_code]
|
|
733
|
+
* @property {Currency} [currency]
|
|
734
|
+
* @property {string} [timezone]
|
|
735
|
+
*/
|
|
606
736
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
737
|
+
/**
|
|
738
|
+
* @typedef SubscriberData
|
|
739
|
+
* @property {boolean} [pg_user_exists]
|
|
740
|
+
* @property {Object} [id]
|
|
741
|
+
* @property {string} [pg_customer_id]
|
|
742
|
+
* @property {string} [default_payment_method]
|
|
743
|
+
*/
|
|
614
744
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
745
|
+
/**
|
|
746
|
+
* @typedef Subscriber
|
|
747
|
+
* @property {Documents} [documents]
|
|
748
|
+
* @property {Object} [phone]
|
|
749
|
+
* @property {BillingAddress} [billing_address]
|
|
750
|
+
* @property {boolean} [consent]
|
|
751
|
+
* @property {boolean} [comms]
|
|
752
|
+
* @property {string} [_id]
|
|
753
|
+
* @property {string} [type]
|
|
754
|
+
* @property {string} [unique_id]
|
|
755
|
+
* @property {string} [name]
|
|
756
|
+
* @property {string} [email]
|
|
757
|
+
* @property {BusinessCountryInfo} [business_country_info]
|
|
758
|
+
* @property {string} [created_at]
|
|
759
|
+
* @property {string} [modified_at]
|
|
760
|
+
* @property {number} [credit_balance]
|
|
761
|
+
* @property {SubscriberData} [data]
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* @typedef Author
|
|
766
|
+
* @property {Object} [modified_by_details]
|
|
767
|
+
*/
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* @typedef EndingBalance
|
|
771
|
+
* @property {number} [amount]
|
|
772
|
+
* @property {string} [old_entry_ref]
|
|
773
|
+
*/
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* @typedef PaymentData
|
|
777
|
+
* @property {string} [transaction_id]
|
|
778
|
+
* @property {string} [aggregator]
|
|
779
|
+
* @property {string} [aggregator_order_id]
|
|
780
|
+
*/
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* @typedef CreditTransaction
|
|
784
|
+
* @property {Object} [entity]
|
|
785
|
+
* @property {Author} [author]
|
|
786
|
+
* @property {string} [_id]
|
|
787
|
+
* @property {number} [amount]
|
|
788
|
+
* @property {string} [currency]
|
|
789
|
+
* @property {string} [subscriber_id]
|
|
790
|
+
* @property {string} [description]
|
|
791
|
+
* @property {Object} [is_test]
|
|
792
|
+
* @property {EndingBalance} [ending_balance]
|
|
793
|
+
* @property {PaymentData} [payment]
|
|
794
|
+
* @property {string} [type]
|
|
795
|
+
* @property {string} [created_at]
|
|
796
|
+
* @property {string} [modified_at]
|
|
797
|
+
*/
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* @typedef VerifyPaymentData
|
|
801
|
+
* @property {boolean} [success]
|
|
802
|
+
* @property {Subscriber} [subscriber]
|
|
803
|
+
* @property {CreditTransaction} [credit_transaction]
|
|
804
|
+
*/
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* @typedef VerifyPaymentRes
|
|
808
|
+
* @property {string} [status]
|
|
809
|
+
* @property {VerifyPaymentData} [data]
|
|
810
|
+
*/
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* @typedef DefaultMerchants
|
|
814
|
+
* @property {string} [stripe]
|
|
815
|
+
*/
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* @typedef GlobalSettingsPayment
|
|
819
|
+
* @property {DefaultMerchants} [default_merchants]
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* @typedef GlobalSettingsData
|
|
824
|
+
* @property {GlobalSettingsPayment} [payment]
|
|
825
|
+
* @property {boolean} [freeze_panel]
|
|
826
|
+
* @property {string} [_id]
|
|
827
|
+
* @property {string} [created_at]
|
|
828
|
+
* @property {string} [modified_at]
|
|
829
|
+
*/
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* @typedef GlobalSettings
|
|
833
|
+
* @property {string} [status]
|
|
834
|
+
* @property {GlobalSettingsData} [data]
|
|
835
|
+
*/
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* @typedef MethodChecks
|
|
839
|
+
* @property {string} [address_line1_check]
|
|
840
|
+
* @property {string} [address_postal_code_check]
|
|
841
|
+
* @property {string} [cvc_check]
|
|
842
|
+
*/
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* @typedef MethodNetworks
|
|
846
|
+
* @property {string[]} [available]
|
|
847
|
+
* @property {string} [preferred]
|
|
848
|
+
*/
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* @typedef MethodSecureUsage
|
|
852
|
+
* @property {boolean} [supported]
|
|
853
|
+
*/
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @typedef MethodDetails
|
|
857
|
+
* @property {string} [id]
|
|
858
|
+
* @property {string} [type]
|
|
859
|
+
* @property {boolean} [mandate_available]
|
|
860
|
+
* @property {number} [mandate_amount]
|
|
861
|
+
* @property {string} [pg_payment_method_id]
|
|
862
|
+
* @property {boolean} [is_default]
|
|
863
|
+
* @property {SubscriptionMethodData} [data]
|
|
864
|
+
*/
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* @typedef SubscriptionMethodData
|
|
868
|
+
* @property {string} [brand]
|
|
869
|
+
* @property {MethodChecks} [checks]
|
|
870
|
+
* @property {string} [country]
|
|
871
|
+
* @property {number} [exp_month]
|
|
872
|
+
* @property {number} [exp_year]
|
|
873
|
+
* @property {string} [fingerprint]
|
|
874
|
+
* @property {string} [funding]
|
|
875
|
+
* @property {string} [generated_from]
|
|
876
|
+
* @property {string} [last4]
|
|
877
|
+
* @property {MethodNetworks} [networks]
|
|
878
|
+
* @property {MethodSecureUsage} [three_d_secure_usage]
|
|
879
|
+
* @property {string} [wallet]
|
|
880
|
+
* @property {string} [name]
|
|
881
|
+
* @property {boolean} [is_default]
|
|
882
|
+
*/
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* @typedef SubscriptionMethods
|
|
886
|
+
* @property {boolean} [success]
|
|
887
|
+
* @property {MethodDetails[]} [data]
|
|
888
|
+
*/
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* @typedef ConfigPublicKey
|
|
892
|
+
* @property {string} [public_key]
|
|
893
|
+
*/
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* @typedef ConfigRes
|
|
897
|
+
* @property {boolean} [success]
|
|
898
|
+
* @property {string} [aggregator]
|
|
899
|
+
* @property {ConfigPublicKey} [config]
|
|
900
|
+
*/
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* @typedef PlanChangeData
|
|
904
|
+
* @property {number} [total]
|
|
905
|
+
* @property {number} [credit_note_amount]
|
|
906
|
+
* @property {number} [settlement]
|
|
907
|
+
* @property {number} [taxable_amount]
|
|
908
|
+
* @property {number} [gst_amount]
|
|
909
|
+
* @property {number} [gross_total]
|
|
910
|
+
* @property {number} [gst]
|
|
911
|
+
* @property {number} [discount]
|
|
912
|
+
*/
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @typedef PlanChangeDetails
|
|
916
|
+
* @property {string} [status]
|
|
917
|
+
* @property {PlanChangeData} [data]
|
|
918
|
+
*/
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @typedef TransactionMeta
|
|
922
|
+
* @property {string} [invoice_id]
|
|
923
|
+
*/
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @typedef PaymentTransactionDetails
|
|
927
|
+
* @property {Object} [aggregator]
|
|
928
|
+
* @property {string} [currency]
|
|
929
|
+
* @property {string} [current_status]
|
|
930
|
+
* @property {string} [_id]
|
|
931
|
+
* @property {string} [subscriber_id]
|
|
932
|
+
* @property {number} [amount]
|
|
933
|
+
* @property {string} [entity_type]
|
|
934
|
+
* @property {string} [collection_type]
|
|
935
|
+
* @property {TransactionMeta} [meta]
|
|
936
|
+
* @property {string} [created_at]
|
|
937
|
+
* @property {string} [modified_at]
|
|
938
|
+
*/
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* @typedef PaymentItems
|
|
942
|
+
* @property {string} [name]
|
|
943
|
+
* @property {string} [code]
|
|
944
|
+
* @property {string} [aggregator]
|
|
945
|
+
*/
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* @typedef GetPaymentOptions
|
|
949
|
+
* @property {PaymentItems[]} [payment_options]
|
|
950
|
+
*/
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @typedef TopupReq
|
|
954
|
+
* @property {number} [amount]
|
|
955
|
+
* @property {string} [currency]
|
|
956
|
+
* @property {string} [provider_type]
|
|
957
|
+
*/
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* @typedef SetupMandateReq
|
|
961
|
+
* @property {string} [intent_id]
|
|
962
|
+
* @property {string} [payment_method_id]
|
|
963
|
+
*/
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* @typedef SetupPaymentReq
|
|
967
|
+
* @property {string} [payment_method]
|
|
968
|
+
* @property {string} [payment_id]
|
|
969
|
+
* @property {string} [plan_id]
|
|
970
|
+
* @property {string} [invoice_id]
|
|
971
|
+
*/
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* @typedef SubscriptionRenewReq
|
|
975
|
+
* @property {string} [invoice_id]
|
|
976
|
+
* @property {string} [entity_type]
|
|
977
|
+
* @property {string} [collection_type]
|
|
978
|
+
* @property {string} [callback_url]
|
|
979
|
+
* @property {RenewMeta} [meta]
|
|
980
|
+
*/
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* @typedef RenewMeta
|
|
984
|
+
* @property {boolean} [invoice_payment]
|
|
985
|
+
* @property {boolean} [renew]
|
|
986
|
+
*/
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* @typedef SubscriptionMethodsReq
|
|
990
|
+
* @property {string} [unique_external_id]
|
|
991
|
+
* @property {string} [setup_intent_id]
|
|
992
|
+
* @property {string} [pg_payment_method_id]
|
|
993
|
+
* @property {boolean} [set_default]
|
|
994
|
+
*/
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* @typedef CreditTransactionResponse
|
|
998
|
+
* @property {number} [total] - Total number of transactions
|
|
999
|
+
* @property {number} [limit] - Maximum number of transactions per page
|
|
1000
|
+
* @property {number} [page] - Current page number
|
|
1001
|
+
* @property {number} [pages] - Total number of pages
|
|
1002
|
+
* @property {CreditTransaction[]} [items]
|
|
1003
|
+
*/
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* @typedef DowngradePlanReq
|
|
1007
|
+
* @property {string} [unique_id]
|
|
1008
|
+
* @property {string} [type]
|
|
1009
|
+
* @property {string} [product_suite]
|
|
1010
|
+
* @property {string} [plan_id]
|
|
1011
|
+
* @property {string} [reason]
|
|
1012
|
+
* @property {string} [platform]
|
|
1013
|
+
*/
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* @typedef Taxation
|
|
1017
|
+
* @property {number} [gst] - GST percentage
|
|
1018
|
+
*/
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* @typedef OneTimeFees
|
|
1022
|
+
* @property {number} [developement]
|
|
1023
|
+
* @property {number} [marketing]
|
|
1024
|
+
*/
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* @typedef CreditLine
|
|
1028
|
+
* @property {boolean} [is_active]
|
|
1029
|
+
*/
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* @typedef StatusMessage
|
|
1033
|
+
* @property {string} [status]
|
|
1034
|
+
* @property {string} [message]
|
|
1035
|
+
* @property {boolean} [success]
|
|
1036
|
+
* @property {string} [code]
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* @typedef PaymentCollectReq
|
|
1041
|
+
* @property {string} [transaction_id]
|
|
1042
|
+
* @property {boolean} [credit_balance]
|
|
1043
|
+
* @property {string} [payment_mode]
|
|
1044
|
+
* @property {string} [payment_method]
|
|
1045
|
+
* @property {string} [invoice_id]
|
|
1046
|
+
*/
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* @typedef SubscriptionRenewResMeta
|
|
1050
|
+
* @property {boolean} [invoice_payment]
|
|
1051
|
+
* @property {boolean} [renew]
|
|
1052
|
+
*/
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* @typedef SubscriptionRenewRes
|
|
1056
|
+
* @property {string} [redirect_url]
|
|
1057
|
+
* @property {string} [transaction_id]
|
|
1058
|
+
* @property {string} [current_status]
|
|
1059
|
+
* @property {SubscriptionRenewResMeta} [meta]
|
|
1060
|
+
*/
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @typedef SetupIntentRes
|
|
1064
|
+
* @property {boolean} [success]
|
|
1065
|
+
* @property {SetupIntentData} [data]
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* @typedef SetupIntentData
|
|
1070
|
+
* @property {string} [id]
|
|
1071
|
+
* @property {string} [client_secret]
|
|
1072
|
+
* @property {Object} [customer]
|
|
1073
|
+
* @property {string} [status]
|
|
1074
|
+
*/
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* @typedef SetupPayment
|
|
1078
|
+
* @property {string} [id]
|
|
1079
|
+
* @property {string} [status]
|
|
1080
|
+
* @property {Object} [customer]
|
|
1081
|
+
* @property {string} [client_secret]
|
|
1082
|
+
* @property {string} [payment_method]
|
|
1083
|
+
* @property {string} [mandate]
|
|
1084
|
+
* @property {PaymentMethodOptions} [payment_method_options]
|
|
1085
|
+
*/
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* @typedef PaymentMethodOptions
|
|
1089
|
+
* @property {Card} [card]
|
|
1090
|
+
*/
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* @typedef Card
|
|
1094
|
+
* @property {MandateOptions} [mandate_options]
|
|
1095
|
+
*/
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* @typedef MandateOptions
|
|
1099
|
+
* @property {number} [amount]
|
|
1100
|
+
*/
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* @typedef Message
|
|
1104
|
+
* @property {string} [message]
|
|
1105
|
+
*/
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* @typedef TopupRes
|
|
1109
|
+
* @property {string} [status]
|
|
1110
|
+
* @property {string} [aggregator_order_id]
|
|
1111
|
+
* @property {number} [amount]
|
|
1112
|
+
* @property {string} [currency]
|
|
1113
|
+
* @property {string} [transaction_id]
|
|
1114
|
+
*/
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @typedef CancelTopupReq
|
|
1118
|
+
* @property {string} [order_id]
|
|
1119
|
+
*/
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* @typedef CancelTopupRes
|
|
1123
|
+
* @property {string} [_id]
|
|
1124
|
+
* @property {string} [subscriber_id]
|
|
1125
|
+
* @property {number} [amount]
|
|
1126
|
+
* @property {string} [currency]
|
|
1127
|
+
* @property {string} [aggregator]
|
|
1128
|
+
* @property {string} [aggregator_order_id]
|
|
1129
|
+
* @property {string} [created_at]
|
|
1130
|
+
* @property {string} [modified_at]
|
|
1131
|
+
* @property {number} [__v]
|
|
1132
|
+
* @property {string} [aggregator_status]
|
|
1133
|
+
* @property {string} [current_status]
|
|
1134
|
+
*/
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* @typedef DefaultReq
|
|
1138
|
+
* @property {string} [payment_method_id]
|
|
1139
|
+
*/
|
|
1140
|
+
|
|
1141
|
+
class BillingPlatformModel {
|
|
1142
|
+
/** @returns {CompanyInfo} */
|
|
1143
|
+
static CompanyInfo() {
|
|
1144
|
+
return Joi.object({
|
|
1145
|
+
company_name: Joi.string().allow(""),
|
|
1146
|
+
gstin: Joi.string().allow(""),
|
|
1147
|
+
address: Joi.string().allow(""),
|
|
1148
|
+
address_details: BillingPlatformModel.AddressDetails(),
|
|
1149
|
+
pan: Joi.string().allow(""),
|
|
1150
|
+
phone: Joi.string().allow(""),
|
|
1151
|
+
email: Joi.string().allow(""),
|
|
1152
|
+
cin: Joi.string().allow(""),
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
/** @returns {AddressDetails} */
|
|
1157
|
+
static AddressDetails() {
|
|
1158
|
+
return Joi.object({
|
|
1159
|
+
address_line_1: Joi.string().allow(""),
|
|
1160
|
+
address_line_2: Joi.string().allow(""),
|
|
1161
|
+
city: Joi.string().allow(""),
|
|
1162
|
+
pincode: Joi.string().allow(""),
|
|
1163
|
+
state: Joi.string().allow(""),
|
|
1164
|
+
country: Joi.string().allow(""),
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/** @returns {InvoiceData} */
|
|
1169
|
+
static InvoiceData() {
|
|
1170
|
+
return Joi.object({
|
|
1171
|
+
invoice: BillingPlatformModel.InvoiceDetailsData(),
|
|
1172
|
+
invoice_items: Joi.array().items(BillingPlatformModel.InvoiceItems()),
|
|
1173
|
+
shopsense_details: BillingPlatformModel.CompanyInfo(),
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/** @returns {InvoiceDetailsData} */
|
|
1178
|
+
static InvoiceDetailsData() {
|
|
1179
|
+
return Joi.object({
|
|
1180
|
+
attemp: Joi.number().allow(null),
|
|
1181
|
+
documents: Joi.any(),
|
|
1182
|
+
payment: Joi.any(),
|
|
1183
|
+
period: BillingPlatformModel.Period(),
|
|
1184
|
+
client: BillingPlatformModel.Client(),
|
|
1185
|
+
discount: Joi.any(),
|
|
1186
|
+
taxation: Joi.any(),
|
|
1187
|
+
_id: Joi.string().allow(""),
|
|
1188
|
+
auto_advance: Joi.boolean(),
|
|
1189
|
+
collection_method: Joi.string().allow(""),
|
|
1190
|
+
subscriber_id: Joi.string().allow(""),
|
|
1191
|
+
currency: Joi.string().allow(""),
|
|
1192
|
+
invoice_url: Joi.string().allow(""),
|
|
1193
|
+
number: Joi.string().allow(""),
|
|
1194
|
+
paid: Joi.boolean(),
|
|
1195
|
+
pg_data: Joi.any(),
|
|
1196
|
+
receipt_number: Joi.string().allow(""),
|
|
1197
|
+
statement_descriptor: Joi.string().allow(""),
|
|
1198
|
+
current_status: Joi.string().allow(""),
|
|
1199
|
+
status_trail: Joi.array().items(BillingPlatformModel.StatusTrail()),
|
|
1200
|
+
subtotal: Joi.number(),
|
|
1201
|
+
total: Joi.number(),
|
|
1202
|
+
old_settlement: Joi.number().allow(null),
|
|
1203
|
+
credit_balance: Joi.number().allow(null),
|
|
1204
|
+
subscription: Joi.string().allow(""),
|
|
1205
|
+
attempt: Joi.number(),
|
|
1206
|
+
next_action_time: Joi.string().allow(""),
|
|
1207
|
+
credit_note_amount: Joi.number(),
|
|
1208
|
+
created_at: Joi.string().allow(""),
|
|
1209
|
+
modified_at: Joi.string().allow(""),
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/** @returns {Client} */
|
|
1214
|
+
static Client() {
|
|
1215
|
+
return Joi.object({
|
|
1216
|
+
name: Joi.string().allow(""),
|
|
1217
|
+
email: Joi.string().allow(""),
|
|
1218
|
+
phone: Joi.string().allow(""),
|
|
1219
|
+
address_lines: Joi.array().items(Joi.string().allow("")),
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** @returns {Period} */
|
|
1224
|
+
static Period() {
|
|
1225
|
+
return Joi.object({
|
|
1226
|
+
start: Joi.string().allow(""),
|
|
1227
|
+
end: Joi.string().allow(""),
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/** @returns {StatusTrail} */
|
|
1232
|
+
static StatusTrail() {
|
|
1233
|
+
return Joi.object({
|
|
1234
|
+
value: Joi.string().allow(""),
|
|
1235
|
+
timestamp: Joi.string().allow(""),
|
|
1236
|
+
_id: Joi.string().allow(""),
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/** @returns {PaymentCollectRes} */
|
|
1241
|
+
static PaymentCollectRes() {
|
|
1242
|
+
return Joi.object({
|
|
1243
|
+
transaction_id: Joi.string().allow(""),
|
|
1244
|
+
current_status: Joi.string().allow(""),
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/** @returns {SubscriptionChargeRes} */
|
|
1249
|
+
static SubscriptionChargeRes() {
|
|
1250
|
+
return Joi.object({
|
|
1251
|
+
_id: Joi.string().allow(""),
|
|
1252
|
+
product_suit_id: Joi.string().allow(""),
|
|
1253
|
+
entity_id: Joi.string().allow(""),
|
|
1254
|
+
entity_type: Joi.string().allow(""),
|
|
1255
|
+
name: Joi.string().allow(""),
|
|
1256
|
+
status: Joi.string().allow(""),
|
|
1257
|
+
trial_days: Joi.number(),
|
|
1258
|
+
activated_on: Joi.string().allow(""),
|
|
1259
|
+
cancelled_on: Joi.string().allow(""),
|
|
1260
|
+
is_test: Joi.boolean(),
|
|
1261
|
+
created_at: Joi.string().allow(""),
|
|
1262
|
+
modified_at: Joi.string().allow(""),
|
|
1263
|
+
company_id: Joi.string().allow(""),
|
|
1264
|
+
line_items: Joi.array().items(Joi.any()),
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/** @returns {PostDowngradeRes} */
|
|
1269
|
+
static PostDowngradeRes() {
|
|
1270
|
+
return Joi.object({
|
|
1271
|
+
success: Joi.boolean(),
|
|
1272
|
+
data: BillingPlatformModel.DowngradeRes(),
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
/** @returns {DowngradeRes} */
|
|
1277
|
+
static DowngradeRes() {
|
|
1278
|
+
return Joi.object({
|
|
1279
|
+
_id: Joi.string().allow(""),
|
|
1280
|
+
status: Joi.string().allow(""),
|
|
1281
|
+
subscriber_id: Joi.string().allow(""),
|
|
1282
|
+
activated: Joi.boolean(),
|
|
1283
|
+
created_at: Joi.string().allow(""),
|
|
1284
|
+
modified_at: Joi.string().allow(""),
|
|
1285
|
+
plan_id: Joi.string().allow(""),
|
|
1286
|
+
reason: Joi.string().allow(""),
|
|
1287
|
+
request_user_id: Joi.string().allow(""),
|
|
1288
|
+
subscription_id: Joi.string().allow(""),
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/** @returns {PaymentStatusData} */
|
|
1293
|
+
static PaymentStatusData() {
|
|
1294
|
+
return Joi.object({
|
|
1295
|
+
_id: Joi.string().allow(""),
|
|
1296
|
+
journey: Joi.string().allow(""),
|
|
1297
|
+
webhook_response: Joi.array().items(Joi.any()),
|
|
1298
|
+
aggregator_status: Joi.string().allow(""),
|
|
1299
|
+
current_status: Joi.string().allow(""),
|
|
1300
|
+
created_at: Joi.string().allow(""),
|
|
1301
|
+
modified_at: Joi.string().allow(""),
|
|
1302
|
+
__v: Joi.number(),
|
|
1303
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/** @returns {PaymentStatusResponse} */
|
|
1308
|
+
static PaymentStatusResponse() {
|
|
1309
|
+
return Joi.object({
|
|
1310
|
+
status: Joi.string().allow(""),
|
|
1311
|
+
data: BillingPlatformModel.PaymentStatusData(),
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/** @returns {BadRequest} */
|
|
1316
|
+
static BadRequest() {
|
|
1317
|
+
return Joi.object({
|
|
1318
|
+
message: Joi.string().allow(""),
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/** @returns {ResourceNotFound} */
|
|
1323
|
+
static ResourceNotFound() {
|
|
1324
|
+
return Joi.object({
|
|
1325
|
+
message: Joi.string().allow(""),
|
|
1326
|
+
code: Joi.any(),
|
|
1327
|
+
success: Joi.any(),
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
/** @returns {InternalServerError} */
|
|
1332
|
+
static InternalServerError() {
|
|
1333
|
+
return Joi.object({
|
|
1334
|
+
message: Joi.string().allow(""),
|
|
1335
|
+
code: Joi.string().allow(""),
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/** @returns {CheckValidityResponse} */
|
|
1340
|
+
static CheckValidityResponse() {
|
|
1341
|
+
return Joi.object({
|
|
1342
|
+
is_valid: Joi.boolean(),
|
|
619
1343
|
discount_amount: Joi.number(),
|
|
620
1344
|
});
|
|
621
1345
|
}
|
|
622
1346
|
|
|
623
|
-
/** @returns {PlanRecurring} */
|
|
624
|
-
static PlanRecurring() {
|
|
1347
|
+
/** @returns {PlanRecurring} */
|
|
1348
|
+
static PlanRecurring() {
|
|
1349
|
+
return Joi.object({
|
|
1350
|
+
interval: Joi.string().allow(""),
|
|
1351
|
+
interval_count: Joi.number(),
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/** @returns {PlanMeta} */
|
|
1356
|
+
static PlanMeta() {
|
|
1357
|
+
return Joi.object({
|
|
1358
|
+
seller_status: Joi.string().allow(""),
|
|
1359
|
+
company: Joi.string().allow(""),
|
|
1360
|
+
plan_platform_display_name: Joi.string().allow("").allow(null),
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
/** @returns {Plan} */
|
|
1365
|
+
static Plan() {
|
|
1366
|
+
return Joi.object({
|
|
1367
|
+
fee_components: Joi.array().items(Joi.any()),
|
|
1368
|
+
recurring: BillingPlatformModel.PlanRecurring(),
|
|
1369
|
+
is_trial_plan: Joi.boolean(),
|
|
1370
|
+
plan_group: Joi.string().allow(""),
|
|
1371
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
1372
|
+
currency: Joi.string().allow(""),
|
|
1373
|
+
is_active: Joi.boolean(),
|
|
1374
|
+
is_visible: Joi.boolean(),
|
|
1375
|
+
trial_period: Joi.number(),
|
|
1376
|
+
addons: Joi.array().items(Joi.string().allow("")),
|
|
1377
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1378
|
+
type: Joi.string().allow(""),
|
|
1379
|
+
country: Joi.string().allow(""),
|
|
1380
|
+
_id: Joi.string().allow(""),
|
|
1381
|
+
name: Joi.string().allow(""),
|
|
1382
|
+
description: Joi.string().allow(""),
|
|
1383
|
+
amount: Joi.number(),
|
|
1384
|
+
product_suite_id: Joi.string().allow(""),
|
|
1385
|
+
created_at: Joi.string().allow(""),
|
|
1386
|
+
modified_at: Joi.string().allow(""),
|
|
1387
|
+
taxation: BillingPlatformModel.Taxation(),
|
|
1388
|
+
one_time_fees: BillingPlatformModel.OneTimeFees(),
|
|
1389
|
+
credit_line: BillingPlatformModel.CreditLine(),
|
|
1390
|
+
current_status: Joi.string().allow(""),
|
|
1391
|
+
channel_type: Joi.string().allow(""),
|
|
1392
|
+
company_ids: Joi.array().items(Joi.any()),
|
|
1393
|
+
platform: Joi.string().allow("").allow(null),
|
|
1394
|
+
activated_on: Joi.string().allow(""),
|
|
1395
|
+
meta: BillingPlatformModel.PlanMeta(),
|
|
1396
|
+
created_by: Joi.string().allow(""),
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
/** @returns {SubscriptionTrialPeriod} */
|
|
1401
|
+
static SubscriptionTrialPeriod() {
|
|
1402
|
+
return Joi.object({
|
|
1403
|
+
start_date: Joi.string().allow(""),
|
|
1404
|
+
end_date: Joi.string().allow(""),
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/** @returns {EntityChargePrice} */
|
|
1409
|
+
static EntityChargePrice() {
|
|
1410
|
+
return Joi.object({
|
|
1411
|
+
amount: Joi.number(),
|
|
1412
|
+
currency_code: Joi.string().allow(""),
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/** @returns {OneTimeChargeItem} */
|
|
1417
|
+
static OneTimeChargeItem() {
|
|
1418
|
+
return Joi.object({
|
|
1419
|
+
name: Joi.string().allow(""),
|
|
1420
|
+
term: Joi.string().allow(""),
|
|
1421
|
+
pricing_type: Joi.string().allow(""),
|
|
1422
|
+
price: BillingPlatformModel.EntityChargePrice(),
|
|
1423
|
+
capped_amount: Joi.number(),
|
|
1424
|
+
is_test: Joi.boolean(),
|
|
1425
|
+
metadata: Joi.any(),
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/** @returns {CreateOneTimeCharge} */
|
|
1430
|
+
static CreateOneTimeCharge() {
|
|
1431
|
+
return Joi.object({
|
|
1432
|
+
name: Joi.string().allow(""),
|
|
1433
|
+
charge: BillingPlatformModel.OneTimeChargeItem(),
|
|
1434
|
+
is_test: Joi.boolean(),
|
|
1435
|
+
return_url: Joi.string().allow(""),
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
/** @returns {ChargeRecurring} */
|
|
1440
|
+
static ChargeRecurring() {
|
|
1441
|
+
return Joi.object({
|
|
1442
|
+
interval: Joi.string().allow(""),
|
|
1443
|
+
interval_time: Joi.number(),
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/** @returns {ChargeDetails} */
|
|
1448
|
+
static ChargeDetails() {
|
|
1449
|
+
return Joi.object({
|
|
1450
|
+
_id: Joi.string().allow(""),
|
|
1451
|
+
entity_type: Joi.string().allow(""),
|
|
1452
|
+
entity_id: Joi.string().allow(""),
|
|
1453
|
+
name: Joi.string().allow(""),
|
|
1454
|
+
term: Joi.string().allow(""),
|
|
1455
|
+
charge_type: Joi.string().allow(""),
|
|
1456
|
+
pricing_type: Joi.string().allow(""),
|
|
1457
|
+
price: BillingPlatformModel.EntityChargePrice(),
|
|
1458
|
+
recurring: BillingPlatformModel.ChargeRecurring(),
|
|
1459
|
+
status: Joi.string().allow(""),
|
|
1460
|
+
capped_amount: Joi.number(),
|
|
1461
|
+
activated_on: Joi.string().allow(""),
|
|
1462
|
+
cancelled_on: Joi.string().allow(""),
|
|
1463
|
+
billing_date: Joi.string().allow(""),
|
|
1464
|
+
current_period: BillingPlatformModel.SubscriptionTrialPeriod(),
|
|
1465
|
+
modified_at: Joi.string().allow(""),
|
|
1466
|
+
created_at: Joi.string().allow(""),
|
|
1467
|
+
is_test: Joi.boolean(),
|
|
1468
|
+
company_id: Joi.string().allow(""),
|
|
1469
|
+
meta: Joi.any(),
|
|
1470
|
+
__v: Joi.number(),
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/** @returns {OneTimeChargeEntity} */
|
|
1475
|
+
static OneTimeChargeEntity() {
|
|
1476
|
+
return Joi.object({
|
|
1477
|
+
term: Joi.string().allow(""),
|
|
1478
|
+
charge_type: Joi.string().allow(""),
|
|
1479
|
+
capped_amount: Joi.number(),
|
|
1480
|
+
billing_date: Joi.string().allow("").allow(null),
|
|
1481
|
+
created_at: Joi.string().allow(""),
|
|
1482
|
+
modified_at: Joi.string().allow(""),
|
|
1483
|
+
__v: Joi.number(),
|
|
1484
|
+
_id: Joi.string().allow(""),
|
|
1485
|
+
name: Joi.string().allow(""),
|
|
1486
|
+
status: Joi.string().allow(""),
|
|
1487
|
+
activated_on: Joi.string().allow("").allow(null),
|
|
1488
|
+
cancelled_on: Joi.string().allow("").allow(null),
|
|
1489
|
+
metadata: Joi.any(),
|
|
1490
|
+
return_url: Joi.string().allow(""),
|
|
1491
|
+
is_test: Joi.boolean(),
|
|
1492
|
+
pricing_type: Joi.string().allow(""),
|
|
1493
|
+
subscriber_id: Joi.string().allow(""),
|
|
1494
|
+
entity_type: Joi.string().allow(""),
|
|
1495
|
+
entity_id: Joi.string().allow(""),
|
|
1496
|
+
meta: Joi.any(),
|
|
1497
|
+
price: BillingPlatformModel.EntityChargePrice(),
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
/** @returns {CreateOneTimeChargeResponse} */
|
|
1502
|
+
static CreateOneTimeChargeResponse() {
|
|
1503
|
+
return Joi.object({
|
|
1504
|
+
charge: BillingPlatformModel.Charge(),
|
|
1505
|
+
confirm_url: Joi.string().allow(""),
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/** @returns {Charge} */
|
|
1510
|
+
static Charge() {
|
|
1511
|
+
return Joi.object({
|
|
1512
|
+
final_charge: BillingPlatformModel.OneTimeChargeEntity(),
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/** @returns {InvoiceDetailsStatusTrail} */
|
|
1517
|
+
static InvoiceDetailsStatusTrail() {
|
|
1518
|
+
return Joi.object({
|
|
1519
|
+
_id: Joi.string().allow(""),
|
|
1520
|
+
value: Joi.string().allow(""),
|
|
1521
|
+
timestamp: Joi.string().allow(""),
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
/** @returns {InvoiceItemsPlanRecurring} */
|
|
1526
|
+
static InvoiceItemsPlanRecurring() {
|
|
1527
|
+
return Joi.object({
|
|
1528
|
+
interval: Joi.string().allow(""),
|
|
1529
|
+
interval_count: Joi.number(),
|
|
1530
|
+
});
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/** @returns {InvoiceItemsPlan} */
|
|
1534
|
+
static InvoiceItemsPlan() {
|
|
1535
|
+
return Joi.object({
|
|
1536
|
+
recurring: BillingPlatformModel.InvoiceItemsPlanRecurring(),
|
|
1537
|
+
is_trial_plan: Joi.boolean(),
|
|
1538
|
+
plan_group: Joi.string().allow(""),
|
|
1539
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
1540
|
+
currency: Joi.string().allow(""),
|
|
1541
|
+
is_active: Joi.boolean(),
|
|
1542
|
+
is_visible: Joi.boolean(),
|
|
1543
|
+
trial_period: Joi.number(),
|
|
1544
|
+
addons: Joi.array().items(Joi.string().allow("")),
|
|
1545
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1546
|
+
type: Joi.string().allow(""),
|
|
1547
|
+
country: Joi.string().allow(""),
|
|
1548
|
+
_id: Joi.string().allow(""),
|
|
1549
|
+
name: Joi.string().allow(""),
|
|
1550
|
+
description: Joi.string().allow(""),
|
|
1551
|
+
amount: Joi.number(),
|
|
1552
|
+
product_suite_id: Joi.string().allow(""),
|
|
1553
|
+
created_at: Joi.string().allow(""),
|
|
1554
|
+
modified_at: Joi.string().allow(""),
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
/** @returns {InvoiceItemsPeriod} */
|
|
1559
|
+
static InvoiceItemsPeriod() {
|
|
1560
|
+
return Joi.object({
|
|
1561
|
+
start: Joi.string().allow(""),
|
|
1562
|
+
end: Joi.string().allow(""),
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/** @returns {InvoiceItems} */
|
|
1567
|
+
static InvoiceItems() {
|
|
1568
|
+
return Joi.object({
|
|
1569
|
+
_id: Joi.string().allow(""),
|
|
1570
|
+
currency: Joi.string().allow(""),
|
|
1571
|
+
plan: BillingPlatformModel.InvoiceItemsPlan(),
|
|
1572
|
+
name: Joi.string().allow(""),
|
|
1573
|
+
quantity: Joi.number(),
|
|
1574
|
+
description: Joi.string().allow(""),
|
|
1575
|
+
period: BillingPlatformModel.InvoiceItemsPeriod(),
|
|
1576
|
+
unit_amount: Joi.number(),
|
|
1577
|
+
amount: Joi.number(),
|
|
1578
|
+
type: Joi.string().allow(""),
|
|
1579
|
+
invoice_id: Joi.string().allow(""),
|
|
1580
|
+
created_at: Joi.string().allow(""),
|
|
1581
|
+
modified_at: Joi.string().allow(""),
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
/** @returns {InvoicesDataClient} */
|
|
1586
|
+
static InvoicesDataClient() {
|
|
625
1587
|
return Joi.object({
|
|
626
|
-
|
|
627
|
-
|
|
1588
|
+
name: Joi.string().allow(""),
|
|
1589
|
+
email: Joi.string().allow(""),
|
|
1590
|
+
phone: Joi.string().allow(""),
|
|
1591
|
+
address_lines: Joi.array().items(Joi.string().allow("")),
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/** @returns {InvoicesDataPeriod} */
|
|
1596
|
+
static InvoicesDataPeriod() {
|
|
1597
|
+
return Joi.object({
|
|
1598
|
+
start: Joi.string().allow(""),
|
|
1599
|
+
end: Joi.string().allow(""),
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/** @returns {InvoicesDataPaymentMethod} */
|
|
1604
|
+
static InvoicesDataPaymentMethod() {
|
|
1605
|
+
return Joi.object({
|
|
1606
|
+
pg_payment_method_id: Joi.string().allow(""),
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/** @returns {InvoicesData} */
|
|
1611
|
+
static InvoicesData() {
|
|
1612
|
+
return Joi.object({
|
|
1613
|
+
_id: Joi.string().allow(""),
|
|
1614
|
+
documents: Joi.any(),
|
|
1615
|
+
payment: Joi.any(),
|
|
1616
|
+
old_settlement: Joi.number().allow(null),
|
|
1617
|
+
credit_balance: Joi.number().allow(null),
|
|
1618
|
+
discount: Joi.any(),
|
|
1619
|
+
taxation: Joi.any(),
|
|
1620
|
+
credit_note_amount: Joi.number(),
|
|
1621
|
+
client: BillingPlatformModel.InvoicesDataClient(),
|
|
1622
|
+
auto_advance: Joi.boolean(),
|
|
1623
|
+
currency: Joi.string().allow(""),
|
|
1624
|
+
paid: Joi.boolean(),
|
|
1625
|
+
attemp: Joi.number(),
|
|
1626
|
+
collection_method: Joi.string().allow(""),
|
|
1627
|
+
subscriber_id: Joi.string().allow(""),
|
|
1628
|
+
invoice_url: Joi.string().allow(""),
|
|
1629
|
+
number: Joi.string().allow(""),
|
|
1630
|
+
pg_data: Joi.any(),
|
|
1631
|
+
period: BillingPlatformModel.InvoicesDataPeriod(),
|
|
1632
|
+
receipt_number: Joi.string().allow(""),
|
|
1633
|
+
statement_descriptor: Joi.string().allow(""),
|
|
1634
|
+
current_status: Joi.string().allow(""),
|
|
1635
|
+
status_trail: Joi.array().items(
|
|
1636
|
+
BillingPlatformModel.InvoiceDetailsStatusTrail()
|
|
1637
|
+
),
|
|
1638
|
+
subtotal: Joi.number(),
|
|
1639
|
+
total: Joi.number(),
|
|
1640
|
+
subscription: Joi.string().allow(""),
|
|
1641
|
+
next_action_time: Joi.string().allow(""),
|
|
1642
|
+
created_at: Joi.string().allow(""),
|
|
1643
|
+
modified_at: Joi.string().allow(""),
|
|
1644
|
+
hash_identifier: Joi.string().allow(""),
|
|
1645
|
+
payment_method: BillingPlatformModel.InvoicesDataPaymentMethod(),
|
|
1646
|
+
invoice_items: Joi.array().items(BillingPlatformModel.InvoiceItems()),
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/** @returns {Invoices} */
|
|
1651
|
+
static Invoices() {
|
|
1652
|
+
return Joi.object({
|
|
1653
|
+
data: Joi.array().items(BillingPlatformModel.InvoicesData()),
|
|
1654
|
+
start: Joi.number(),
|
|
1655
|
+
end: Joi.number(),
|
|
1656
|
+
limit: Joi.number(),
|
|
1657
|
+
page: Joi.number(),
|
|
1658
|
+
total: Joi.number(),
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/** @returns {Phone} */
|
|
1663
|
+
static Phone() {
|
|
1664
|
+
return Joi.object({
|
|
1665
|
+
phone_number: Joi.string().allow(""),
|
|
1666
|
+
phone_country_code: Joi.string().allow(""),
|
|
1667
|
+
});
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
/** @returns {SubscriptionBillingAddress} */
|
|
1671
|
+
static SubscriptionBillingAddress() {
|
|
1672
|
+
return Joi.object({
|
|
1673
|
+
country: Joi.string().allow(""),
|
|
1674
|
+
state: Joi.string().allow(""),
|
|
1675
|
+
city: Joi.string().allow(""),
|
|
1676
|
+
line1: Joi.string().allow(""),
|
|
1677
|
+
line2: Joi.string().allow(""),
|
|
1678
|
+
postal_code: Joi.string().allow(""),
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/** @returns {SubscriptionCustomer} */
|
|
1683
|
+
static SubscriptionCustomer() {
|
|
1684
|
+
return Joi.object({
|
|
1685
|
+
phone: BillingPlatformModel.Phone(),
|
|
1686
|
+
billing_address: BillingPlatformModel.SubscriptionBillingAddress(),
|
|
1687
|
+
_id: Joi.string().allow(""),
|
|
1688
|
+
unique_id: Joi.string().allow(""),
|
|
1689
|
+
type: Joi.string().allow(""),
|
|
1690
|
+
name: Joi.string().allow(""),
|
|
1691
|
+
email: Joi.string().allow(""),
|
|
1692
|
+
created_at: Joi.string().allow(""),
|
|
1693
|
+
modified_at: Joi.string().allow(""),
|
|
1694
|
+
data: Joi.any(),
|
|
1695
|
+
documents: Joi.any(),
|
|
1696
|
+
consent: Joi.boolean(),
|
|
1697
|
+
comms: Joi.boolean(),
|
|
1698
|
+
credit_balance: Joi.number().allow(null),
|
|
1699
|
+
business_country_info: BillingPlatformModel.BusinessCountryInfo(),
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/** @returns {SubscriptionCustomerCreate} */
|
|
1704
|
+
static SubscriptionCustomerCreate() {
|
|
1705
|
+
return Joi.object({
|
|
1706
|
+
phone: BillingPlatformModel.Phone(),
|
|
1707
|
+
billing_address: BillingPlatformModel.SubscriptionBillingAddress(),
|
|
1708
|
+
unique_id: Joi.string().allow(""),
|
|
1709
|
+
type: Joi.string().allow(""),
|
|
1710
|
+
name: Joi.string().allow(""),
|
|
1711
|
+
email: Joi.string().allow(""),
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/** @returns {SubscriptionCurrentPeriod} */
|
|
1716
|
+
static SubscriptionCurrentPeriod() {
|
|
1717
|
+
return Joi.object({
|
|
1718
|
+
start: Joi.string().allow(""),
|
|
1719
|
+
end: Joi.string().allow(""),
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/** @returns {SubscriptionPauseCollection} */
|
|
1724
|
+
static SubscriptionPauseCollection() {
|
|
1725
|
+
return Joi.object({
|
|
1726
|
+
behavior: Joi.string().allow(""),
|
|
1727
|
+
resume_at: Joi.string().allow(""),
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/** @returns {SubscriptionTrial} */
|
|
1732
|
+
static SubscriptionTrial() {
|
|
1733
|
+
return Joi.object({
|
|
1734
|
+
start: Joi.string().allow(""),
|
|
1735
|
+
end: Joi.string().allow(""),
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/** @returns {SubscriptionInvoiceSettings} */
|
|
1740
|
+
static SubscriptionInvoiceSettings() {
|
|
1741
|
+
return Joi.object({
|
|
1742
|
+
generation: Joi.boolean(),
|
|
1743
|
+
charging: Joi.boolean(),
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
/** @returns {Subscription} */
|
|
1748
|
+
static Subscription() {
|
|
1749
|
+
return Joi.object({
|
|
1750
|
+
meta: Joi.any(),
|
|
1751
|
+
current_period: BillingPlatformModel.SubscriptionCurrentPeriod(),
|
|
1752
|
+
pause_collection: BillingPlatformModel.SubscriptionPauseCollection(),
|
|
1753
|
+
trial: BillingPlatformModel.SubscriptionTrial(),
|
|
1754
|
+
invoice_settings: BillingPlatformModel.SubscriptionInvoiceSettings(),
|
|
1755
|
+
is_active: Joi.boolean(),
|
|
1756
|
+
cancel_at_period_end: Joi.boolean(),
|
|
1757
|
+
_id: Joi.string().allow(""),
|
|
1758
|
+
subscriber_id: Joi.string().allow(""),
|
|
1759
|
+
plan_id: Joi.string().allow(""),
|
|
1760
|
+
product_suite_id: Joi.string().allow(""),
|
|
1761
|
+
plan_data: BillingPlatformModel.Plan(),
|
|
1762
|
+
current_status: Joi.string().allow(""),
|
|
1763
|
+
collection_method: Joi.string().allow(""),
|
|
1764
|
+
created_at: Joi.string().allow(""),
|
|
1765
|
+
modified_at: Joi.string().allow(""),
|
|
1766
|
+
latest_invoice: Joi.string().allow(""),
|
|
1767
|
+
channel_type: Joi.string().allow(""),
|
|
1768
|
+
freezed: Joi.boolean(),
|
|
1769
|
+
cancel_at: Joi.string().allow(""),
|
|
1770
|
+
canceled_at: Joi.string().allow(""),
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/** @returns {SubscriptionStatus} */
|
|
1775
|
+
static SubscriptionStatus() {
|
|
1776
|
+
return Joi.object({
|
|
1777
|
+
is_enabled: Joi.boolean(),
|
|
1778
|
+
subscription: BillingPlatformModel.Subscription(),
|
|
1779
|
+
latest_invoice: BillingPlatformModel.InvoicesData(),
|
|
1780
|
+
next_plan: BillingPlatformModel.Plan(),
|
|
1781
|
+
current_subscriptions: Joi.array().items(
|
|
1782
|
+
BillingPlatformModel.Subscription()
|
|
1783
|
+
),
|
|
1784
|
+
mandate_amount: Joi.number(),
|
|
1785
|
+
message: Joi.string().allow(""),
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
/** @returns {SubscriptionLimitApplication} */
|
|
1790
|
+
static SubscriptionLimitApplication() {
|
|
1791
|
+
return Joi.object({
|
|
1792
|
+
enabled: Joi.boolean(),
|
|
1793
|
+
hard_limit: Joi.number(),
|
|
1794
|
+
soft_limit: Joi.number(),
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/** @returns {SubscriptionLimitMarketplace} */
|
|
1799
|
+
static SubscriptionLimitMarketplace() {
|
|
1800
|
+
return Joi.object({
|
|
1801
|
+
enabled: Joi.boolean(),
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
/** @returns {SubscriptionLimitOtherPlatform} */
|
|
1806
|
+
static SubscriptionLimitOtherPlatform() {
|
|
1807
|
+
return Joi.object({
|
|
1808
|
+
enabled: Joi.boolean(),
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
/** @returns {SubscriptionLimitTeam} */
|
|
1813
|
+
static SubscriptionLimitTeam() {
|
|
1814
|
+
return Joi.object({
|
|
1815
|
+
limit: Joi.number(),
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
/** @returns {SubscriptionLimitProducts} */
|
|
1820
|
+
static SubscriptionLimitProducts() {
|
|
1821
|
+
return Joi.object({
|
|
1822
|
+
bulk: Joi.boolean(),
|
|
1823
|
+
limit: Joi.number(),
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
/** @returns {SubscriptionLimitExtensions} */
|
|
1828
|
+
static SubscriptionLimitExtensions() {
|
|
1829
|
+
return Joi.object({
|
|
1830
|
+
enabled: Joi.boolean(),
|
|
1831
|
+
limit: Joi.number(),
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/** @returns {SubscriptionLimitIntegrations} */
|
|
1836
|
+
static SubscriptionLimitIntegrations() {
|
|
1837
|
+
return Joi.object({
|
|
1838
|
+
enabled: Joi.boolean(),
|
|
1839
|
+
limit: Joi.number(),
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
/** @returns {SubscriptionLimit} */
|
|
1844
|
+
static SubscriptionLimit() {
|
|
1845
|
+
return Joi.object({
|
|
1846
|
+
application: BillingPlatformModel.SubscriptionLimitApplication(),
|
|
1847
|
+
marketplace: BillingPlatformModel.SubscriptionLimitMarketplace(),
|
|
1848
|
+
other_platform: BillingPlatformModel.SubscriptionLimitOtherPlatform(),
|
|
1849
|
+
team: BillingPlatformModel.SubscriptionLimitTeam(),
|
|
1850
|
+
products: BillingPlatformModel.SubscriptionLimitProducts(),
|
|
1851
|
+
extensions: BillingPlatformModel.SubscriptionLimitExtensions(),
|
|
1852
|
+
integrations: BillingPlatformModel.SubscriptionLimitIntegrations(),
|
|
1853
|
+
is_trial_plan: Joi.boolean(),
|
|
628
1854
|
});
|
|
629
1855
|
}
|
|
630
1856
|
|
|
631
|
-
/** @returns {
|
|
632
|
-
static
|
|
1857
|
+
/** @returns {IntentReq} */
|
|
1858
|
+
static IntentReq() {
|
|
633
1859
|
return Joi.object({
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
plan_group: Joi.string().allow(""),
|
|
637
|
-
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
638
|
-
currency: Joi.string().allow(""),
|
|
639
|
-
is_active: Joi.boolean(),
|
|
640
|
-
is_visible: Joi.boolean(),
|
|
641
|
-
trial_period: Joi.number(),
|
|
642
|
-
addons: Joi.array().items(Joi.string().allow("")),
|
|
643
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
644
|
-
type: Joi.string().allow(""),
|
|
645
|
-
country: Joi.string().allow(""),
|
|
646
|
-
_id: Joi.string().allow(""),
|
|
647
|
-
name: Joi.string().allow(""),
|
|
648
|
-
description: Joi.string().allow(""),
|
|
649
|
-
amount: Joi.number(),
|
|
650
|
-
product_suite_id: Joi.string().allow(""),
|
|
651
|
-
created_at: Joi.string().allow(""),
|
|
652
|
-
modified_at: Joi.string().allow(""),
|
|
1860
|
+
unique_external_id: Joi.string().allow(""),
|
|
1861
|
+
plan_id: Joi.string().allow(""),
|
|
653
1862
|
});
|
|
654
1863
|
}
|
|
655
1864
|
|
|
656
|
-
/** @returns {
|
|
657
|
-
static
|
|
1865
|
+
/** @returns {PutIntentReq} */
|
|
1866
|
+
static PutIntentReq() {
|
|
658
1867
|
return Joi.object({
|
|
659
|
-
|
|
660
|
-
|
|
1868
|
+
unique_external_id: Joi.string().allow(""),
|
|
1869
|
+
setup_intent_id: Joi.string().allow(""),
|
|
1870
|
+
payment_method_id: Joi.string().allow(""),
|
|
1871
|
+
set_default: Joi.boolean(),
|
|
661
1872
|
});
|
|
662
1873
|
}
|
|
663
1874
|
|
|
664
|
-
/** @returns {
|
|
665
|
-
static
|
|
1875
|
+
/** @returns {SubscriptionActivateReq} */
|
|
1876
|
+
static SubscriptionActivateReq() {
|
|
666
1877
|
return Joi.object({
|
|
667
|
-
|
|
668
|
-
|
|
1878
|
+
unique_id: Joi.string().allow(""),
|
|
1879
|
+
type: Joi.string().allow(""),
|
|
1880
|
+
product_suite: Joi.string().allow(""),
|
|
1881
|
+
plan_id: Joi.string().allow(""),
|
|
1882
|
+
payment_method: Joi.string().allow(""),
|
|
1883
|
+
subscription_id: Joi.string().allow(""),
|
|
1884
|
+
coupon: Joi.string().allow(""),
|
|
1885
|
+
meta: Joi.any(),
|
|
669
1886
|
});
|
|
670
1887
|
}
|
|
671
1888
|
|
|
672
|
-
/** @returns {
|
|
673
|
-
static
|
|
1889
|
+
/** @returns {SubscriptionActivateRes} */
|
|
1890
|
+
static SubscriptionActivateRes() {
|
|
674
1891
|
return Joi.object({
|
|
675
|
-
|
|
1892
|
+
success: Joi.boolean(),
|
|
1893
|
+
data: BillingPlatformModel.Subscription(),
|
|
676
1894
|
});
|
|
677
1895
|
}
|
|
678
1896
|
|
|
679
|
-
/** @returns {
|
|
680
|
-
static
|
|
1897
|
+
/** @returns {CancelSubscriptionReq} */
|
|
1898
|
+
static CancelSubscriptionReq() {
|
|
681
1899
|
return Joi.object({
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
recurring: BillingPlatformModel.EntityChargeRecurring(),
|
|
687
|
-
capped_amount: Joi.number(),
|
|
688
|
-
trial_days: Joi.number(),
|
|
689
|
-
is_test: Joi.boolean(),
|
|
690
|
-
metadata: Joi.any(),
|
|
1900
|
+
unique_id: Joi.string().allow(""),
|
|
1901
|
+
type: Joi.string().allow(""),
|
|
1902
|
+
product_suite: Joi.string().allow(""),
|
|
1903
|
+
subscription_id: Joi.string().allow(""),
|
|
691
1904
|
});
|
|
692
1905
|
}
|
|
693
1906
|
|
|
694
|
-
/** @returns {
|
|
695
|
-
static
|
|
1907
|
+
/** @returns {CancelSubscriptionRes} */
|
|
1908
|
+
static CancelSubscriptionRes() {
|
|
696
1909
|
return Joi.object({
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
line_items: Joi.array()
|
|
700
|
-
.items(BillingPlatformModel.ChargeLineItem())
|
|
701
|
-
.required(),
|
|
702
|
-
is_test: Joi.boolean(),
|
|
703
|
-
return_url: Joi.string().allow("").required(),
|
|
1910
|
+
success: Joi.boolean(),
|
|
1911
|
+
data: BillingPlatformModel.Subscription(),
|
|
704
1912
|
});
|
|
705
1913
|
}
|
|
706
1914
|
|
|
707
|
-
/** @returns {
|
|
708
|
-
static
|
|
1915
|
+
/** @returns {PlanStatusUpdateReq} */
|
|
1916
|
+
static PlanStatusUpdateReq() {
|
|
709
1917
|
return Joi.object({
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
price: BillingPlatformModel.EntityChargePrice().required(),
|
|
714
|
-
capped_amount: Joi.number(),
|
|
715
|
-
is_test: Joi.boolean(),
|
|
716
|
-
metadata: Joi.any(),
|
|
1918
|
+
plan_id: Joi.string().allow(""),
|
|
1919
|
+
reason: Joi.string().allow(""),
|
|
1920
|
+
seller_status: Joi.string().allow(""),
|
|
717
1921
|
});
|
|
718
1922
|
}
|
|
719
1923
|
|
|
720
|
-
/** @returns {
|
|
721
|
-
static
|
|
1924
|
+
/** @returns {SunscribePlan} */
|
|
1925
|
+
static SunscribePlan() {
|
|
722
1926
|
return Joi.object({
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
1927
|
+
entity_type: Joi.string().allow(""),
|
|
1928
|
+
collection_type: Joi.string().allow(""),
|
|
1929
|
+
plan_id: Joi.string().allow(""),
|
|
1930
|
+
callback_url: Joi.string().allow(""),
|
|
1931
|
+
meta: BillingPlatformModel.Meta(),
|
|
727
1932
|
});
|
|
728
1933
|
}
|
|
729
1934
|
|
|
730
|
-
/** @returns {
|
|
731
|
-
static
|
|
1935
|
+
/** @returns {Meta} */
|
|
1936
|
+
static Meta() {
|
|
732
1937
|
return Joi.object({
|
|
733
|
-
|
|
734
|
-
|
|
1938
|
+
subscribe: Joi.boolean(),
|
|
1939
|
+
is_custom_plan: Joi.boolean(),
|
|
1940
|
+
is_plan_upgrade: Joi.boolean(),
|
|
735
1941
|
});
|
|
736
1942
|
}
|
|
737
1943
|
|
|
738
|
-
/** @returns {
|
|
739
|
-
static
|
|
1944
|
+
/** @returns {SubscribePlanRes} */
|
|
1945
|
+
static SubscribePlanRes() {
|
|
740
1946
|
return Joi.object({
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
price: BillingPlatformModel.EntityChargePrice(),
|
|
746
|
-
recurring: BillingPlatformModel.EntityChargeRecurring(),
|
|
747
|
-
capped_amount: Joi.number(),
|
|
748
|
-
activated_on: Joi.string().allow(""),
|
|
749
|
-
cancelled_on: Joi.string().allow(""),
|
|
750
|
-
billing_date: Joi.string().allow(""),
|
|
751
|
-
current_period: BillingPlatformModel.CurrentPeriod(),
|
|
752
|
-
status: Joi.string().allow(""),
|
|
753
|
-
is_test: Joi.boolean(),
|
|
754
|
-
metadata: Joi.any(),
|
|
1947
|
+
redirect_url: Joi.string().allow(""),
|
|
1948
|
+
transaction_id: Joi.string().allow(""),
|
|
1949
|
+
current_status: Joi.string().allow(""),
|
|
1950
|
+
meta: BillingPlatformModel.Meta(),
|
|
755
1951
|
});
|
|
756
1952
|
}
|
|
757
1953
|
|
|
758
|
-
/** @returns {
|
|
759
|
-
static
|
|
1954
|
+
/** @returns {EntityDetail} */
|
|
1955
|
+
static EntityDetail() {
|
|
760
1956
|
return Joi.object({
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
status: Joi.string().allow(""),
|
|
764
|
-
company_id: Joi.number(),
|
|
765
|
-
activated_on: Joi.string().allow(""),
|
|
766
|
-
cancelled_on: Joi.string().allow(""),
|
|
767
|
-
trial_days: Joi.number(),
|
|
768
|
-
trial_period: BillingPlatformModel.SubscriptionTrialPeriod(),
|
|
769
|
-
metadata: Joi.any(),
|
|
770
|
-
line_items: Joi.array().items(BillingPlatformModel.SubscriptionCharge()),
|
|
1957
|
+
entity: Joi.string().allow(""),
|
|
1958
|
+
item: BillingPlatformModel.Subscription(),
|
|
771
1959
|
});
|
|
772
1960
|
}
|
|
773
1961
|
|
|
774
|
-
/** @returns {
|
|
775
|
-
static
|
|
1962
|
+
/** @returns {PaymentOptions} */
|
|
1963
|
+
static PaymentOptions() {
|
|
776
1964
|
return Joi.object({
|
|
777
1965
|
_id: Joi.string().allow(""),
|
|
778
1966
|
name: Joi.string().allow(""),
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
subscriber_id: Joi.string().allow(""),
|
|
787
|
-
entity_type: Joi.string().allow(""),
|
|
788
|
-
entity_id: Joi.string().allow(""),
|
|
789
|
-
meta: Joi.any(),
|
|
790
|
-
price: BillingPlatformModel.EntityChargePrice(),
|
|
1967
|
+
description: Joi.string().allow(""),
|
|
1968
|
+
logo: Joi.string().allow(""),
|
|
1969
|
+
aggregator_id: Joi.string().allow(""),
|
|
1970
|
+
aggregator: Joi.string().allow(""),
|
|
1971
|
+
created_at: Joi.string().allow(""),
|
|
1972
|
+
modified_at: Joi.string().allow(""),
|
|
1973
|
+
__v: Joi.number(),
|
|
791
1974
|
});
|
|
792
1975
|
}
|
|
793
1976
|
|
|
794
|
-
/** @returns {
|
|
795
|
-
static
|
|
1977
|
+
/** @returns {VerifyPaymentReq} */
|
|
1978
|
+
static VerifyPaymentReq() {
|
|
796
1979
|
return Joi.object({
|
|
797
|
-
|
|
798
|
-
|
|
1980
|
+
razorpay_payment_id: Joi.string().allow(""),
|
|
1981
|
+
razorpay_order_id: Joi.string().allow(""),
|
|
1982
|
+
razorpay_signature: Joi.string().allow(""),
|
|
1983
|
+
status_code: Joi.number(),
|
|
1984
|
+
provider_type: Joi.string().allow(""),
|
|
799
1985
|
});
|
|
800
1986
|
}
|
|
801
1987
|
|
|
802
|
-
/** @returns {
|
|
803
|
-
static
|
|
1988
|
+
/** @returns {Documents} */
|
|
1989
|
+
static Documents() {
|
|
804
1990
|
return Joi.object({
|
|
805
|
-
|
|
806
|
-
|
|
1991
|
+
pan: Joi.string().allow(""),
|
|
1992
|
+
gst: Joi.string().allow(""),
|
|
807
1993
|
});
|
|
808
1994
|
}
|
|
809
1995
|
|
|
810
|
-
/** @returns {
|
|
811
|
-
static
|
|
1996
|
+
/** @returns {BillingAddress} */
|
|
1997
|
+
static BillingAddress() {
|
|
812
1998
|
return Joi.object({
|
|
813
|
-
|
|
814
|
-
|
|
1999
|
+
country: Joi.string().allow(""),
|
|
2000
|
+
state: Joi.string().allow(""),
|
|
2001
|
+
city: Joi.string().allow(""),
|
|
2002
|
+
line1: Joi.string().allow(""),
|
|
2003
|
+
line2: Joi.string().allow(""),
|
|
2004
|
+
postal_code: Joi.string().allow(""),
|
|
2005
|
+
country_code: Joi.string().allow(""),
|
|
815
2006
|
});
|
|
816
2007
|
}
|
|
817
2008
|
|
|
818
|
-
/** @returns {
|
|
819
|
-
static
|
|
2009
|
+
/** @returns {Currency} */
|
|
2010
|
+
static Currency() {
|
|
820
2011
|
return Joi.object({
|
|
821
|
-
|
|
2012
|
+
code: Joi.string().allow(""),
|
|
2013
|
+
symbol: Joi.string().allow(""),
|
|
822
2014
|
name: Joi.string().allow(""),
|
|
823
|
-
email: Joi.string().allow(""),
|
|
824
|
-
phone: Joi.string().allow(""),
|
|
825
2015
|
});
|
|
826
2016
|
}
|
|
827
2017
|
|
|
828
|
-
/** @returns {
|
|
829
|
-
static
|
|
2018
|
+
/** @returns {BusinessCountryInfo} */
|
|
2019
|
+
static BusinessCountryInfo() {
|
|
830
2020
|
return Joi.object({
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
2021
|
+
country: Joi.string().allow(""),
|
|
2022
|
+
country_code: Joi.string().allow(""),
|
|
2023
|
+
currency: BillingPlatformModel.Currency(),
|
|
2024
|
+
timezone: Joi.string().allow(""),
|
|
834
2025
|
});
|
|
835
2026
|
}
|
|
836
2027
|
|
|
837
|
-
/** @returns {
|
|
838
|
-
static
|
|
2028
|
+
/** @returns {SubscriberData} */
|
|
2029
|
+
static SubscriberData() {
|
|
839
2030
|
return Joi.object({
|
|
840
|
-
|
|
2031
|
+
pg_user_exists: Joi.boolean(),
|
|
2032
|
+
id: Joi.any(),
|
|
2033
|
+
pg_customer_id: Joi.string().allow(""),
|
|
2034
|
+
default_payment_method: Joi.string().allow(""),
|
|
841
2035
|
});
|
|
842
2036
|
}
|
|
843
2037
|
|
|
844
|
-
/** @returns {
|
|
845
|
-
static
|
|
2038
|
+
/** @returns {Subscriber} */
|
|
2039
|
+
static Subscriber() {
|
|
846
2040
|
return Joi.object({
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
attemp: Joi.number(),
|
|
2041
|
+
documents: BillingPlatformModel.Documents(),
|
|
2042
|
+
phone: Joi.any(),
|
|
2043
|
+
billing_address: BillingPlatformModel.BillingAddress(),
|
|
2044
|
+
consent: Joi.boolean(),
|
|
2045
|
+
comms: Joi.boolean(),
|
|
853
2046
|
_id: Joi.string().allow(""),
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
receipt_number: Joi.string().allow(""),
|
|
860
|
-
statement_descriptor: Joi.string().allow(""),
|
|
861
|
-
current_status: Joi.string().allow(""),
|
|
862
|
-
status_trail: Joi.array().items(
|
|
863
|
-
BillingPlatformModel.InvoiceDetailsStatusTrail()
|
|
864
|
-
),
|
|
865
|
-
subtotal: Joi.number(),
|
|
866
|
-
total: Joi.number(),
|
|
867
|
-
subscription: Joi.string().allow(""),
|
|
868
|
-
next_action_time: Joi.string().allow(""),
|
|
2047
|
+
type: Joi.string().allow(""),
|
|
2048
|
+
unique_id: Joi.string().allow(""),
|
|
2049
|
+
name: Joi.string().allow(""),
|
|
2050
|
+
email: Joi.string().allow(""),
|
|
2051
|
+
business_country_info: BillingPlatformModel.BusinessCountryInfo(),
|
|
869
2052
|
created_at: Joi.string().allow(""),
|
|
870
2053
|
modified_at: Joi.string().allow(""),
|
|
871
|
-
|
|
872
|
-
|
|
2054
|
+
credit_balance: Joi.number().allow(null),
|
|
2055
|
+
data: BillingPlatformModel.SubscriberData(),
|
|
873
2056
|
});
|
|
874
2057
|
}
|
|
875
2058
|
|
|
876
|
-
/** @returns {
|
|
877
|
-
static
|
|
2059
|
+
/** @returns {Author} */
|
|
2060
|
+
static Author() {
|
|
878
2061
|
return Joi.object({
|
|
879
|
-
|
|
880
|
-
interval_count: Joi.number(),
|
|
2062
|
+
modified_by_details: Joi.any(),
|
|
881
2063
|
});
|
|
882
2064
|
}
|
|
883
2065
|
|
|
884
|
-
/** @returns {
|
|
885
|
-
static
|
|
2066
|
+
/** @returns {EndingBalance} */
|
|
2067
|
+
static EndingBalance() {
|
|
886
2068
|
return Joi.object({
|
|
887
|
-
recurring: BillingPlatformModel.InvoiceItemsPlanRecurring(),
|
|
888
|
-
is_trial_plan: Joi.boolean(),
|
|
889
|
-
plan_group: Joi.string().allow(""),
|
|
890
|
-
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
891
|
-
currency: Joi.string().allow(""),
|
|
892
|
-
is_active: Joi.boolean(),
|
|
893
|
-
is_visible: Joi.boolean(),
|
|
894
|
-
trial_period: Joi.number(),
|
|
895
|
-
addons: Joi.array().items(Joi.string().allow("")),
|
|
896
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
897
|
-
type: Joi.string().allow(""),
|
|
898
|
-
country: Joi.string().allow(""),
|
|
899
|
-
_id: Joi.string().allow(""),
|
|
900
|
-
name: Joi.string().allow(""),
|
|
901
|
-
description: Joi.string().allow(""),
|
|
902
2069
|
amount: Joi.number(),
|
|
903
|
-
|
|
904
|
-
created_at: Joi.string().allow(""),
|
|
905
|
-
modified_at: Joi.string().allow(""),
|
|
2070
|
+
old_entry_ref: Joi.string().allow(""),
|
|
906
2071
|
});
|
|
907
2072
|
}
|
|
908
2073
|
|
|
909
|
-
/** @returns {
|
|
910
|
-
static
|
|
2074
|
+
/** @returns {PaymentData} */
|
|
2075
|
+
static PaymentData() {
|
|
911
2076
|
return Joi.object({
|
|
912
|
-
|
|
913
|
-
|
|
2077
|
+
transaction_id: Joi.string().allow(""),
|
|
2078
|
+
aggregator: Joi.string().allow(""),
|
|
2079
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
914
2080
|
});
|
|
915
2081
|
}
|
|
916
2082
|
|
|
917
|
-
/** @returns {
|
|
918
|
-
static
|
|
2083
|
+
/** @returns {CreditTransaction} */
|
|
2084
|
+
static CreditTransaction() {
|
|
919
2085
|
return Joi.object({
|
|
2086
|
+
entity: Joi.any(),
|
|
2087
|
+
author: BillingPlatformModel.Author(),
|
|
920
2088
|
_id: Joi.string().allow(""),
|
|
2089
|
+
amount: Joi.number(),
|
|
921
2090
|
currency: Joi.string().allow(""),
|
|
922
|
-
|
|
923
|
-
name: Joi.string().allow(""),
|
|
924
|
-
quantity: Joi.number(),
|
|
2091
|
+
subscriber_id: Joi.string().allow(""),
|
|
925
2092
|
description: Joi.string().allow(""),
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
2093
|
+
is_test: Joi.any(),
|
|
2094
|
+
ending_balance: BillingPlatformModel.EndingBalance(),
|
|
2095
|
+
payment: BillingPlatformModel.PaymentData(),
|
|
929
2096
|
type: Joi.string().allow(""),
|
|
930
|
-
invoice_id: Joi.string().allow(""),
|
|
931
2097
|
created_at: Joi.string().allow(""),
|
|
932
2098
|
modified_at: Joi.string().allow(""),
|
|
933
2099
|
});
|
|
934
2100
|
}
|
|
935
2101
|
|
|
936
|
-
/** @returns {
|
|
937
|
-
static
|
|
2102
|
+
/** @returns {VerifyPaymentData} */
|
|
2103
|
+
static VerifyPaymentData() {
|
|
938
2104
|
return Joi.object({
|
|
939
|
-
|
|
940
|
-
|
|
2105
|
+
success: Joi.boolean(),
|
|
2106
|
+
subscriber: BillingPlatformModel.Subscriber(),
|
|
2107
|
+
credit_transaction: BillingPlatformModel.CreditTransaction(),
|
|
941
2108
|
});
|
|
942
2109
|
}
|
|
943
2110
|
|
|
944
|
-
/** @returns {
|
|
945
|
-
static
|
|
2111
|
+
/** @returns {VerifyPaymentRes} */
|
|
2112
|
+
static VerifyPaymentRes() {
|
|
946
2113
|
return Joi.object({
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
phone: Joi.string().allow(""),
|
|
950
|
-
address_lines: Joi.array().items(Joi.string().allow("")),
|
|
2114
|
+
status: Joi.string().allow(""),
|
|
2115
|
+
data: BillingPlatformModel.VerifyPaymentData(),
|
|
951
2116
|
});
|
|
952
2117
|
}
|
|
953
2118
|
|
|
954
|
-
/** @returns {
|
|
955
|
-
static
|
|
2119
|
+
/** @returns {DefaultMerchants} */
|
|
2120
|
+
static DefaultMerchants() {
|
|
956
2121
|
return Joi.object({
|
|
957
|
-
|
|
958
|
-
end: Joi.string().allow(""),
|
|
2122
|
+
stripe: Joi.string().allow(""),
|
|
959
2123
|
});
|
|
960
2124
|
}
|
|
961
2125
|
|
|
962
|
-
/** @returns {
|
|
963
|
-
static
|
|
2126
|
+
/** @returns {GlobalSettingsPayment} */
|
|
2127
|
+
static GlobalSettingsPayment() {
|
|
964
2128
|
return Joi.object({
|
|
965
|
-
|
|
2129
|
+
default_merchants: BillingPlatformModel.DefaultMerchants(),
|
|
966
2130
|
});
|
|
967
2131
|
}
|
|
968
|
-
|
|
969
|
-
/** @returns {
|
|
970
|
-
static
|
|
971
|
-
return Joi.object({
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
currency: Joi.string().allow(""),
|
|
976
|
-
paid: Joi.boolean(),
|
|
977
|
-
attemp: Joi.number(),
|
|
978
|
-
collection_method: Joi.string().allow(""),
|
|
979
|
-
subscriber_id: Joi.string().allow(""),
|
|
980
|
-
invoice_url: Joi.string().allow(""),
|
|
981
|
-
number: Joi.string().allow(""),
|
|
982
|
-
pg_data: Joi.any(),
|
|
983
|
-
period: BillingPlatformModel.InvoicesDataPeriod(),
|
|
984
|
-
receipt_number: Joi.string().allow(""),
|
|
985
|
-
statement_descriptor: Joi.string().allow(""),
|
|
986
|
-
current_status: Joi.string().allow(""),
|
|
987
|
-
status_trail: Joi.array().items(
|
|
988
|
-
BillingPlatformModel.InvoiceDetailsStatusTrail()
|
|
989
|
-
),
|
|
990
|
-
subtotal: Joi.number(),
|
|
991
|
-
total: Joi.number(),
|
|
992
|
-
subscription: Joi.string().allow(""),
|
|
993
|
-
next_action_time: Joi.string().allow(""),
|
|
2132
|
+
|
|
2133
|
+
/** @returns {GlobalSettingsData} */
|
|
2134
|
+
static GlobalSettingsData() {
|
|
2135
|
+
return Joi.object({
|
|
2136
|
+
payment: BillingPlatformModel.GlobalSettingsPayment(),
|
|
2137
|
+
freeze_panel: Joi.boolean(),
|
|
2138
|
+
_id: Joi.string().allow(""),
|
|
994
2139
|
created_at: Joi.string().allow(""),
|
|
995
2140
|
modified_at: Joi.string().allow(""),
|
|
996
|
-
hash_identifier: Joi.string().allow(""),
|
|
997
|
-
payment_method: BillingPlatformModel.InvoicesDataPaymentMethod(),
|
|
998
|
-
invoice_items: Joi.array().items(BillingPlatformModel.InvoiceItems()),
|
|
999
2141
|
});
|
|
1000
2142
|
}
|
|
1001
2143
|
|
|
1002
|
-
/** @returns {
|
|
1003
|
-
static
|
|
2144
|
+
/** @returns {GlobalSettings} */
|
|
2145
|
+
static GlobalSettings() {
|
|
1004
2146
|
return Joi.object({
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
end: Joi.number(),
|
|
1008
|
-
limit: Joi.number(),
|
|
1009
|
-
page: Joi.number(),
|
|
1010
|
-
total: Joi.number(),
|
|
2147
|
+
status: Joi.string().allow(""),
|
|
2148
|
+
data: BillingPlatformModel.GlobalSettingsData(),
|
|
1011
2149
|
});
|
|
1012
2150
|
}
|
|
1013
2151
|
|
|
1014
|
-
/** @returns {
|
|
1015
|
-
static
|
|
2152
|
+
/** @returns {MethodChecks} */
|
|
2153
|
+
static MethodChecks() {
|
|
1016
2154
|
return Joi.object({
|
|
1017
|
-
|
|
1018
|
-
|
|
2155
|
+
address_line1_check: Joi.string().allow(""),
|
|
2156
|
+
address_postal_code_check: Joi.string().allow(""),
|
|
2157
|
+
cvc_check: Joi.string().allow(""),
|
|
1019
2158
|
});
|
|
1020
2159
|
}
|
|
1021
2160
|
|
|
1022
|
-
/** @returns {
|
|
1023
|
-
static
|
|
2161
|
+
/** @returns {MethodNetworks} */
|
|
2162
|
+
static MethodNetworks() {
|
|
1024
2163
|
return Joi.object({
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
city: Joi.string().allow(""),
|
|
1028
|
-
line1: Joi.string().allow(""),
|
|
1029
|
-
line2: Joi.string().allow(""),
|
|
1030
|
-
postal_code: Joi.string().allow(""),
|
|
2164
|
+
available: Joi.array().items(Joi.string().allow("")),
|
|
2165
|
+
preferred: Joi.string().allow("").allow(null),
|
|
1031
2166
|
});
|
|
1032
2167
|
}
|
|
1033
2168
|
|
|
1034
|
-
/** @returns {
|
|
1035
|
-
static
|
|
2169
|
+
/** @returns {MethodSecureUsage} */
|
|
2170
|
+
static MethodSecureUsage() {
|
|
1036
2171
|
return Joi.object({
|
|
1037
|
-
|
|
1038
|
-
billing_address: BillingPlatformModel.SubscriptionBillingAddress(),
|
|
1039
|
-
_id: Joi.string().allow(""),
|
|
1040
|
-
unique_id: Joi.string().allow(""),
|
|
1041
|
-
type: Joi.string().allow(""),
|
|
1042
|
-
name: Joi.string().allow(""),
|
|
1043
|
-
email: Joi.string().allow(""),
|
|
1044
|
-
created_at: Joi.string().allow(""),
|
|
1045
|
-
modified_at: Joi.string().allow(""),
|
|
1046
|
-
data: Joi.any(),
|
|
2172
|
+
supported: Joi.boolean(),
|
|
1047
2173
|
});
|
|
1048
2174
|
}
|
|
1049
2175
|
|
|
1050
|
-
/** @returns {
|
|
1051
|
-
static
|
|
2176
|
+
/** @returns {MethodDetails} */
|
|
2177
|
+
static MethodDetails() {
|
|
1052
2178
|
return Joi.object({
|
|
1053
|
-
|
|
1054
|
-
billing_address: BillingPlatformModel.SubscriptionBillingAddress(),
|
|
1055
|
-
unique_id: Joi.string().allow(""),
|
|
2179
|
+
id: Joi.string().allow(""),
|
|
1056
2180
|
type: Joi.string().allow(""),
|
|
2181
|
+
mandate_available: Joi.boolean(),
|
|
2182
|
+
mandate_amount: Joi.number(),
|
|
2183
|
+
pg_payment_method_id: Joi.string().allow(""),
|
|
2184
|
+
is_default: Joi.boolean(),
|
|
2185
|
+
data: BillingPlatformModel.SubscriptionMethodData(),
|
|
2186
|
+
});
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
/** @returns {SubscriptionMethodData} */
|
|
2190
|
+
static SubscriptionMethodData() {
|
|
2191
|
+
return Joi.object({
|
|
2192
|
+
brand: Joi.string().allow(""),
|
|
2193
|
+
checks: BillingPlatformModel.MethodChecks(),
|
|
2194
|
+
country: Joi.string().allow(""),
|
|
2195
|
+
exp_month: Joi.number(),
|
|
2196
|
+
exp_year: Joi.number(),
|
|
2197
|
+
fingerprint: Joi.string().allow(""),
|
|
2198
|
+
funding: Joi.string().allow(""),
|
|
2199
|
+
generated_from: Joi.string().allow("").allow(null),
|
|
2200
|
+
last4: Joi.string().allow(""),
|
|
2201
|
+
networks: BillingPlatformModel.MethodNetworks(),
|
|
2202
|
+
three_d_secure_usage: BillingPlatformModel.MethodSecureUsage(),
|
|
2203
|
+
wallet: Joi.string().allow("").allow(null),
|
|
1057
2204
|
name: Joi.string().allow(""),
|
|
1058
|
-
|
|
2205
|
+
is_default: Joi.boolean(),
|
|
1059
2206
|
});
|
|
1060
2207
|
}
|
|
1061
2208
|
|
|
1062
|
-
/** @returns {
|
|
1063
|
-
static
|
|
2209
|
+
/** @returns {SubscriptionMethods} */
|
|
2210
|
+
static SubscriptionMethods() {
|
|
1064
2211
|
return Joi.object({
|
|
1065
|
-
|
|
1066
|
-
|
|
2212
|
+
success: Joi.boolean(),
|
|
2213
|
+
data: Joi.array().items(BillingPlatformModel.MethodDetails()),
|
|
1067
2214
|
});
|
|
1068
2215
|
}
|
|
1069
2216
|
|
|
1070
|
-
/** @returns {
|
|
1071
|
-
static
|
|
2217
|
+
/** @returns {ConfigPublicKey} */
|
|
2218
|
+
static ConfigPublicKey() {
|
|
1072
2219
|
return Joi.object({
|
|
1073
|
-
|
|
1074
|
-
resume_at: Joi.string().allow(""),
|
|
2220
|
+
public_key: Joi.string().allow(""),
|
|
1075
2221
|
});
|
|
1076
2222
|
}
|
|
1077
2223
|
|
|
1078
|
-
/** @returns {
|
|
1079
|
-
static
|
|
2224
|
+
/** @returns {ConfigRes} */
|
|
2225
|
+
static ConfigRes() {
|
|
1080
2226
|
return Joi.object({
|
|
1081
|
-
|
|
1082
|
-
|
|
2227
|
+
success: Joi.boolean(),
|
|
2228
|
+
aggregator: Joi.string().allow(""),
|
|
2229
|
+
config: BillingPlatformModel.ConfigPublicKey(),
|
|
1083
2230
|
});
|
|
1084
2231
|
}
|
|
1085
2232
|
|
|
1086
|
-
/** @returns {
|
|
1087
|
-
static
|
|
2233
|
+
/** @returns {PlanChangeData} */
|
|
2234
|
+
static PlanChangeData() {
|
|
1088
2235
|
return Joi.object({
|
|
1089
|
-
|
|
1090
|
-
|
|
2236
|
+
total: Joi.number(),
|
|
2237
|
+
credit_note_amount: Joi.number(),
|
|
2238
|
+
settlement: Joi.number(),
|
|
2239
|
+
taxable_amount: Joi.number(),
|
|
2240
|
+
gst_amount: Joi.number(),
|
|
2241
|
+
gross_total: Joi.number(),
|
|
2242
|
+
gst: Joi.number(),
|
|
2243
|
+
discount: Joi.number(),
|
|
1091
2244
|
});
|
|
1092
2245
|
}
|
|
1093
2246
|
|
|
1094
|
-
/** @returns {
|
|
1095
|
-
static
|
|
2247
|
+
/** @returns {PlanChangeDetails} */
|
|
2248
|
+
static PlanChangeDetails() {
|
|
1096
2249
|
return Joi.object({
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
2250
|
+
status: Joi.string().allow(""),
|
|
2251
|
+
data: BillingPlatformModel.PlanChangeData(),
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/** @returns {TransactionMeta} */
|
|
2256
|
+
static TransactionMeta() {
|
|
2257
|
+
return Joi.object({
|
|
2258
|
+
invoice_id: Joi.string().allow(""),
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/** @returns {PaymentTransactionDetails} */
|
|
2263
|
+
static PaymentTransactionDetails() {
|
|
2264
|
+
return Joi.object({
|
|
2265
|
+
aggregator: Joi.any(),
|
|
2266
|
+
currency: Joi.string().allow(""),
|
|
2267
|
+
current_status: Joi.string().allow(""),
|
|
1103
2268
|
_id: Joi.string().allow(""),
|
|
1104
2269
|
subscriber_id: Joi.string().allow(""),
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
collection_method: Joi.string().allow(""),
|
|
2270
|
+
amount: Joi.number(),
|
|
2271
|
+
entity_type: Joi.string().allow(""),
|
|
2272
|
+
collection_type: Joi.string().allow(""),
|
|
2273
|
+
meta: BillingPlatformModel.TransactionMeta(),
|
|
1110
2274
|
created_at: Joi.string().allow(""),
|
|
1111
2275
|
modified_at: Joi.string().allow(""),
|
|
1112
|
-
latest_invoice: Joi.string().allow(""),
|
|
1113
|
-
channel_type: Joi.string().allow(""),
|
|
1114
2276
|
});
|
|
1115
2277
|
}
|
|
1116
2278
|
|
|
1117
|
-
/** @returns {
|
|
1118
|
-
static
|
|
2279
|
+
/** @returns {PaymentItems} */
|
|
2280
|
+
static PaymentItems() {
|
|
1119
2281
|
return Joi.object({
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
next_plan: BillingPlatformModel.Plan(),
|
|
1124
|
-
current_subscriptions: Joi.array().items(
|
|
1125
|
-
BillingPlatformModel.Subscription()
|
|
1126
|
-
),
|
|
1127
|
-
mandate_amount: Joi.string().allow(""),
|
|
2282
|
+
name: Joi.string().allow(""),
|
|
2283
|
+
code: Joi.string().allow(""),
|
|
2284
|
+
aggregator: Joi.string().allow(""),
|
|
1128
2285
|
});
|
|
1129
2286
|
}
|
|
1130
2287
|
|
|
1131
|
-
/** @returns {
|
|
1132
|
-
static
|
|
2288
|
+
/** @returns {GetPaymentOptions} */
|
|
2289
|
+
static GetPaymentOptions() {
|
|
1133
2290
|
return Joi.object({
|
|
1134
|
-
|
|
1135
|
-
hard_limit: Joi.number(),
|
|
1136
|
-
soft_limit: Joi.number(),
|
|
2291
|
+
payment_options: Joi.array().items(BillingPlatformModel.PaymentItems()),
|
|
1137
2292
|
});
|
|
1138
2293
|
}
|
|
1139
2294
|
|
|
1140
|
-
/** @returns {
|
|
1141
|
-
static
|
|
2295
|
+
/** @returns {TopupReq} */
|
|
2296
|
+
static TopupReq() {
|
|
1142
2297
|
return Joi.object({
|
|
1143
|
-
|
|
2298
|
+
amount: Joi.number(),
|
|
2299
|
+
currency: Joi.string().allow(""),
|
|
2300
|
+
provider_type: Joi.string().allow(""),
|
|
1144
2301
|
});
|
|
1145
2302
|
}
|
|
1146
2303
|
|
|
1147
|
-
/** @returns {
|
|
1148
|
-
static
|
|
2304
|
+
/** @returns {SetupMandateReq} */
|
|
2305
|
+
static SetupMandateReq() {
|
|
1149
2306
|
return Joi.object({
|
|
1150
|
-
|
|
2307
|
+
intent_id: Joi.string().allow(""),
|
|
2308
|
+
payment_method_id: Joi.string().allow(""),
|
|
1151
2309
|
});
|
|
1152
2310
|
}
|
|
1153
2311
|
|
|
1154
|
-
/** @returns {
|
|
1155
|
-
static
|
|
2312
|
+
/** @returns {SetupPaymentReq} */
|
|
2313
|
+
static SetupPaymentReq() {
|
|
1156
2314
|
return Joi.object({
|
|
1157
|
-
|
|
2315
|
+
payment_method: Joi.string().allow(""),
|
|
2316
|
+
payment_id: Joi.string().allow(""),
|
|
2317
|
+
plan_id: Joi.string().allow(""),
|
|
2318
|
+
invoice_id: Joi.string().allow(""),
|
|
1158
2319
|
});
|
|
1159
2320
|
}
|
|
1160
2321
|
|
|
1161
|
-
/** @returns {
|
|
1162
|
-
static
|
|
2322
|
+
/** @returns {SubscriptionRenewReq} */
|
|
2323
|
+
static SubscriptionRenewReq() {
|
|
1163
2324
|
return Joi.object({
|
|
1164
|
-
|
|
1165
|
-
|
|
2325
|
+
invoice_id: Joi.string().allow(""),
|
|
2326
|
+
entity_type: Joi.string().allow(""),
|
|
2327
|
+
collection_type: Joi.string().allow(""),
|
|
2328
|
+
callback_url: Joi.string().allow(""),
|
|
2329
|
+
meta: BillingPlatformModel.RenewMeta(),
|
|
1166
2330
|
});
|
|
1167
2331
|
}
|
|
1168
2332
|
|
|
1169
|
-
/** @returns {
|
|
1170
|
-
static
|
|
2333
|
+
/** @returns {RenewMeta} */
|
|
2334
|
+
static RenewMeta() {
|
|
1171
2335
|
return Joi.object({
|
|
1172
|
-
|
|
1173
|
-
|
|
2336
|
+
invoice_payment: Joi.boolean(),
|
|
2337
|
+
renew: Joi.boolean(),
|
|
1174
2338
|
});
|
|
1175
2339
|
}
|
|
1176
2340
|
|
|
1177
|
-
/** @returns {
|
|
1178
|
-
static
|
|
2341
|
+
/** @returns {SubscriptionMethodsReq} */
|
|
2342
|
+
static SubscriptionMethodsReq() {
|
|
1179
2343
|
return Joi.object({
|
|
1180
|
-
|
|
1181
|
-
|
|
2344
|
+
unique_external_id: Joi.string().allow(""),
|
|
2345
|
+
setup_intent_id: Joi.string().allow(""),
|
|
2346
|
+
pg_payment_method_id: Joi.string().allow(""),
|
|
2347
|
+
set_default: Joi.boolean(),
|
|
1182
2348
|
});
|
|
1183
2349
|
}
|
|
1184
2350
|
|
|
1185
|
-
/** @returns {
|
|
1186
|
-
static
|
|
2351
|
+
/** @returns {CreditTransactionResponse} */
|
|
2352
|
+
static CreditTransactionResponse() {
|
|
1187
2353
|
return Joi.object({
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
extensions: BillingPlatformModel.SubscriptionLimitExtensions(),
|
|
1194
|
-
integrations: BillingPlatformModel.SubscriptionLimitIntegrations(),
|
|
1195
|
-
is_trial_plan: Joi.boolean(),
|
|
2354
|
+
total: Joi.number(),
|
|
2355
|
+
limit: Joi.number(),
|
|
2356
|
+
page: Joi.number(),
|
|
2357
|
+
pages: Joi.number(),
|
|
2358
|
+
items: Joi.array().items(BillingPlatformModel.CreditTransaction()),
|
|
1196
2359
|
});
|
|
1197
2360
|
}
|
|
1198
2361
|
|
|
1199
|
-
/** @returns {
|
|
1200
|
-
static
|
|
2362
|
+
/** @returns {DowngradePlanReq} */
|
|
2363
|
+
static DowngradePlanReq() {
|
|
1201
2364
|
return Joi.object({
|
|
1202
2365
|
unique_id: Joi.string().allow(""),
|
|
1203
2366
|
type: Joi.string().allow(""),
|
|
1204
2367
|
product_suite: Joi.string().allow(""),
|
|
1205
2368
|
plan_id: Joi.string().allow(""),
|
|
1206
|
-
|
|
2369
|
+
reason: Joi.string().allow(""),
|
|
2370
|
+
platform: Joi.string().allow("").allow(null),
|
|
1207
2371
|
});
|
|
1208
2372
|
}
|
|
1209
2373
|
|
|
1210
|
-
/** @returns {
|
|
1211
|
-
static
|
|
2374
|
+
/** @returns {Taxation} */
|
|
2375
|
+
static Taxation() {
|
|
1212
2376
|
return Joi.object({
|
|
1213
|
-
|
|
1214
|
-
data: BillingPlatformModel.Subscription(),
|
|
2377
|
+
gst: Joi.number(),
|
|
1215
2378
|
});
|
|
1216
2379
|
}
|
|
1217
2380
|
|
|
1218
|
-
/** @returns {
|
|
1219
|
-
static
|
|
2381
|
+
/** @returns {OneTimeFees} */
|
|
2382
|
+
static OneTimeFees() {
|
|
1220
2383
|
return Joi.object({
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
product_suite: Joi.string().allow(""),
|
|
1224
|
-
subscription_id: Joi.string().allow(""),
|
|
2384
|
+
developement: Joi.number().allow(null),
|
|
2385
|
+
marketing: Joi.number().allow(null),
|
|
1225
2386
|
});
|
|
1226
2387
|
}
|
|
1227
2388
|
|
|
1228
|
-
/** @returns {
|
|
1229
|
-
static
|
|
2389
|
+
/** @returns {CreditLine} */
|
|
2390
|
+
static CreditLine() {
|
|
1230
2391
|
return Joi.object({
|
|
1231
|
-
|
|
1232
|
-
data: BillingPlatformModel.Subscription(),
|
|
2392
|
+
is_active: Joi.boolean(),
|
|
1233
2393
|
});
|
|
1234
2394
|
}
|
|
1235
2395
|
|
|
1236
|
-
/** @returns {
|
|
1237
|
-
static
|
|
2396
|
+
/** @returns {StatusMessage} */
|
|
2397
|
+
static StatusMessage() {
|
|
1238
2398
|
return Joi.object({
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
2399
|
+
status: Joi.string().allow(""),
|
|
2400
|
+
message: Joi.string().allow(""),
|
|
2401
|
+
success: Joi.boolean(),
|
|
2402
|
+
code: Joi.string().allow(""),
|
|
1242
2403
|
});
|
|
1243
2404
|
}
|
|
1244
2405
|
|
|
1245
|
-
/** @returns {
|
|
1246
|
-
static
|
|
2406
|
+
/** @returns {PaymentCollectReq} */
|
|
2407
|
+
static PaymentCollectReq() {
|
|
1247
2408
|
return Joi.object({
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
2409
|
+
transaction_id: Joi.string().allow(""),
|
|
2410
|
+
credit_balance: Joi.boolean().allow(null),
|
|
2411
|
+
payment_mode: Joi.string().allow(""),
|
|
2412
|
+
payment_method: Joi.string().allow(""),
|
|
2413
|
+
invoice_id: Joi.string().allow(""),
|
|
1253
2414
|
});
|
|
1254
2415
|
}
|
|
1255
2416
|
|
|
1256
|
-
/** @returns {
|
|
1257
|
-
static
|
|
2417
|
+
/** @returns {SubscriptionRenewResMeta} */
|
|
2418
|
+
static SubscriptionRenewResMeta() {
|
|
1258
2419
|
return Joi.object({
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
is_plan_upgrade: Joi.boolean(),
|
|
2420
|
+
invoice_payment: Joi.boolean(),
|
|
2421
|
+
renew: Joi.boolean(),
|
|
1262
2422
|
});
|
|
1263
2423
|
}
|
|
1264
2424
|
|
|
1265
|
-
/** @returns {
|
|
1266
|
-
static
|
|
2425
|
+
/** @returns {SubscriptionRenewRes} */
|
|
2426
|
+
static SubscriptionRenewRes() {
|
|
1267
2427
|
return Joi.object({
|
|
1268
2428
|
redirect_url: Joi.string().allow(""),
|
|
1269
2429
|
transaction_id: Joi.string().allow(""),
|
|
1270
2430
|
current_status: Joi.string().allow(""),
|
|
1271
|
-
meta: BillingPlatformModel.
|
|
2431
|
+
meta: BillingPlatformModel.SubscriptionRenewResMeta(),
|
|
1272
2432
|
});
|
|
1273
2433
|
}
|
|
1274
2434
|
|
|
1275
|
-
/** @returns {
|
|
1276
|
-
static
|
|
2435
|
+
/** @returns {SetupIntentRes} */
|
|
2436
|
+
static SetupIntentRes() {
|
|
1277
2437
|
return Joi.object({
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
description: Joi.string().allow(""),
|
|
1281
|
-
group: Joi.string().allow(""),
|
|
1282
|
-
enabled: Joi.boolean(),
|
|
1283
|
-
display_text: Joi.string().allow(""),
|
|
2438
|
+
success: Joi.boolean(),
|
|
2439
|
+
data: BillingPlatformModel.SetupIntentData(),
|
|
1284
2440
|
});
|
|
1285
2441
|
}
|
|
1286
2442
|
|
|
1287
|
-
/** @returns {
|
|
1288
|
-
static
|
|
2443
|
+
/** @returns {SetupIntentData} */
|
|
2444
|
+
static SetupIntentData() {
|
|
1289
2445
|
return Joi.object({
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
settlement_type: Joi.string().allow(""),
|
|
1295
|
-
settle_cycle_period: Joi.any(),
|
|
1296
|
-
components: Joi.array().items(Joi.any()),
|
|
2446
|
+
id: Joi.string().allow(""),
|
|
2447
|
+
client_secret: Joi.string().allow(""),
|
|
2448
|
+
customer: Joi.any(),
|
|
2449
|
+
status: Joi.string().allow(""),
|
|
1297
2450
|
});
|
|
1298
2451
|
}
|
|
1299
2452
|
|
|
1300
|
-
/** @returns {
|
|
1301
|
-
static
|
|
2453
|
+
/** @returns {SetupPayment} */
|
|
2454
|
+
static SetupPayment() {
|
|
1302
2455
|
return Joi.object({
|
|
1303
|
-
|
|
1304
|
-
|
|
2456
|
+
id: Joi.string().allow(""),
|
|
2457
|
+
status: Joi.string().allow(""),
|
|
2458
|
+
customer: Joi.any(),
|
|
2459
|
+
client_secret: Joi.string().allow(""),
|
|
2460
|
+
payment_method: Joi.string().allow(""),
|
|
2461
|
+
mandate: Joi.string().allow(""),
|
|
2462
|
+
payment_method_options: BillingPlatformModel.PaymentMethodOptions(),
|
|
1305
2463
|
});
|
|
1306
2464
|
}
|
|
1307
2465
|
|
|
1308
|
-
/** @returns {
|
|
1309
|
-
static
|
|
2466
|
+
/** @returns {PaymentMethodOptions} */
|
|
2467
|
+
static PaymentMethodOptions() {
|
|
1310
2468
|
return Joi.object({
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
2469
|
+
card: BillingPlatformModel.Card(),
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/** @returns {Card} */
|
|
2474
|
+
static Card() {
|
|
2475
|
+
return Joi.object({
|
|
2476
|
+
mandate_options: BillingPlatformModel.MandateOptions(),
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
/** @returns {MandateOptions} */
|
|
2481
|
+
static MandateOptions() {
|
|
2482
|
+
return Joi.object({
|
|
2483
|
+
amount: Joi.number(),
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
/** @returns {Message} */
|
|
2488
|
+
static Message() {
|
|
2489
|
+
return Joi.object({
|
|
2490
|
+
message: Joi.string().allow(""),
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
/** @returns {TopupRes} */
|
|
2495
|
+
static TopupRes() {
|
|
2496
|
+
return Joi.object({
|
|
2497
|
+
status: Joi.string().allow(""),
|
|
2498
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
2499
|
+
amount: Joi.number(),
|
|
2500
|
+
currency: Joi.string().allow(""),
|
|
2501
|
+
transaction_id: Joi.string().allow(""),
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
/** @returns {CancelTopupReq} */
|
|
2506
|
+
static CancelTopupReq() {
|
|
2507
|
+
return Joi.object({
|
|
2508
|
+
order_id: Joi.string().allow(""),
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
/** @returns {CancelTopupRes} */
|
|
2513
|
+
static CancelTopupRes() {
|
|
2514
|
+
return Joi.object({
|
|
2515
|
+
_id: Joi.string().allow(""),
|
|
2516
|
+
subscriber_id: Joi.string().allow(""),
|
|
2517
|
+
amount: Joi.number(),
|
|
2518
|
+
currency: Joi.string().allow(""),
|
|
2519
|
+
aggregator: Joi.string().allow(""),
|
|
2520
|
+
aggregator_order_id: Joi.string().allow(""),
|
|
2521
|
+
created_at: Joi.string().allow(""),
|
|
2522
|
+
modified_at: Joi.string().allow(""),
|
|
2523
|
+
__v: Joi.number(),
|
|
2524
|
+
aggregator_status: Joi.string().allow(""),
|
|
2525
|
+
current_status: Joi.string().allow(""),
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
/** @returns {DefaultReq} */
|
|
2530
|
+
static DefaultReq() {
|
|
2531
|
+
return Joi.object({
|
|
2532
|
+
payment_method_id: Joi.string().allow(""),
|
|
1315
2533
|
});
|
|
1316
2534
|
}
|
|
1317
2535
|
}
|