@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +14 -14
- package/sdk/application/Cart/CartApplicationClient.js +14 -14
- package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationClient.js +53 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +136 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +46 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +41 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +6 -397
- package/sdk/platform/Billing/BillingPlatformClient.js +77 -3215
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +417 -3811
- package/sdk/platform/Billing/BillingPlatformModel.js +292 -2544
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +12 -451
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -483
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -34
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +34 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +363 -29
- package/sdk/platform/Cart/CartPlatformModel.js +203 -31
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +220 -200
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +121 -91
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +58 -46
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
- package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +22 -228
- package/sdk/platform/Catalog/CatalogPlatformModel.js +12 -163
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +4 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +10 -14
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +94 -30
- package/sdk/platform/Communication/CommunicationPlatformModel.js +110 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +33 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +62 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +11 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +5 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +12 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +12 -10
- package/sdk/platform/Content/ContentPlatformModel.d.ts +42 -12
- package/sdk/platform/Content/ContentPlatformModel.js +43 -13
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Order/OrderPlatformClient.d.ts +21 -21
- package/sdk/platform/Order/OrderPlatformClient.js +21 -21
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1010 -80
- package/sdk/platform/Order/OrderPlatformModel.js +665 -70
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +31 -4
- package/sdk/platform/Payment/PaymentPlatformModel.js +11 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +8 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +24 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +194 -23
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +116 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +23 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +16 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +10 -12
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +45 -49
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +12 -12
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -1,93 +1,4 @@
|
|
|
1
1
|
export = BillingPlatformModel;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef CompanyInfo
|
|
4
|
-
* @property {string} [company_name] - Name of the company
|
|
5
|
-
* @property {string} [gstin] - Goods and Services Tax Identification Number
|
|
6
|
-
* @property {string} [address] - Main address of the company
|
|
7
|
-
* @property {AddressDetails} [address_details]
|
|
8
|
-
* @property {string} [pan] - Permanent Account Number of the company
|
|
9
|
-
* @property {string} [phone] - Contact phone number for the company
|
|
10
|
-
* @property {string} [email] - Contact email address for the company
|
|
11
|
-
* @property {string} [cin] - Corporate Identification Number
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @typedef AddressDetails
|
|
15
|
-
* @property {string} [address_line_1] - First line of the address
|
|
16
|
-
* @property {string} [address_line_2] - Second line of the address (optional)
|
|
17
|
-
* @property {string} [city] - Company city
|
|
18
|
-
* @property {string} [pincode] - Company pincode
|
|
19
|
-
* @property {string} [state] - Company state
|
|
20
|
-
* @property {string} [country] - Company country
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* @typedef InvoiceData
|
|
24
|
-
* @property {InvoiceDetailsData} [invoice]
|
|
25
|
-
* @property {InvoiceItems[]} [invoice_items]
|
|
26
|
-
* @property {CompanyInfo} [shopsense_details]
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @typedef InvoiceDetailsData
|
|
30
|
-
* @property {number} [attemp] - Number of attempts made to collect the invoice payment
|
|
31
|
-
* @property {Object} [documents] - Documents associated with the invoice
|
|
32
|
-
* @property {Object} [payment] - Payment details related to the invoice
|
|
33
|
-
* @property {Period} [period]
|
|
34
|
-
* @property {Client} [client]
|
|
35
|
-
* @property {Object} [discount] - Discount applied to the invoice
|
|
36
|
-
* @property {Object} [taxation] - Taxation applied to the invoice
|
|
37
|
-
* @property {string} [_id] - Unique identifier for the invoice
|
|
38
|
-
* @property {boolean} [auto_advance] - Indicates if the invoice will
|
|
39
|
-
* automatically advance to the next stage of collection
|
|
40
|
-
* @property {string} [collection_method] - Method of collection (e.g.,
|
|
41
|
-
* charge_automatically, send_invoice)
|
|
42
|
-
* @property {string} [subscriber_id] - Identifier for the subscriber associated
|
|
43
|
-
* with the invoice
|
|
44
|
-
* @property {string} [currency] - Currency in which the invoice is issued
|
|
45
|
-
* @property {string} [invoice_url] - URL to view the invoice pdf
|
|
46
|
-
* @property {string} [number] - Invoice number
|
|
47
|
-
* @property {boolean} [paid] - Indicates if the invoice has been paid
|
|
48
|
-
* @property {Object} [pg_data] - Payment gateway data related to the invoice
|
|
49
|
-
* @property {string} [receipt_number] - Receipt number for the invoice payment
|
|
50
|
-
* @property {string} [statement_descriptor] - Statement descriptor for the invoice
|
|
51
|
-
* @property {string} [current_status] - Current status of the invoice (e.g., paid, open)
|
|
52
|
-
* @property {StatusTrail[]} [status_trail] - Trail of status changes for the invoice
|
|
53
|
-
* @property {number} [subtotal] - Subtotal amount of the invoice
|
|
54
|
-
* @property {number} [total] - Total amount of the invoice
|
|
55
|
-
* @property {number} [old_settlement] - Previous settlement amount (if any)
|
|
56
|
-
* @property {number} [credit_balance] - Credit balance applied to the invoice
|
|
57
|
-
* @property {string} [subscription] - Subscription associated with the invoice
|
|
58
|
-
* @property {number} [attempt] - Number of attempts made to pay the invoice
|
|
59
|
-
* @property {string} [next_action_time] - Timestamp for the next action on the invoice
|
|
60
|
-
* @property {number} [credit_note_amount] - Amount of credit notes applied to the invoice
|
|
61
|
-
* @property {string} [created_at] - Timestamp when the invoice was created
|
|
62
|
-
* @property {string} [modified_at] - Timestamp when the invoice was last modified
|
|
63
|
-
* @property {string} [invoice_type] - Type of invoice (e.g., subscription, extension)
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* @typedef Client
|
|
67
|
-
* @property {string} [name] - Name of the client
|
|
68
|
-
* @property {string} [email] - Email address of the client
|
|
69
|
-
* @property {string} [phone] - Phone number of the client
|
|
70
|
-
* @property {string[]} [address_lines] - List of address lines for the client's address
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* @typedef Period
|
|
74
|
-
* @property {string} [start] - Start date of the period
|
|
75
|
-
* @property {string} [end] - End date of the period
|
|
76
|
-
*/
|
|
77
|
-
/**
|
|
78
|
-
* @typedef StatusTrail
|
|
79
|
-
* @property {string} [value] - The status value of the invoice at a particular
|
|
80
|
-
* timestamp (e.g., open, paid, payment_due)
|
|
81
|
-
* @property {string} [timestamp] - The date and time when the status was
|
|
82
|
-
* recorded, in ISO 8601 format
|
|
83
|
-
* @property {string} [_id] - Unique identifier for the status trail entry
|
|
84
|
-
*/
|
|
85
|
-
/**
|
|
86
|
-
* @typedef PaymentCollectRes
|
|
87
|
-
* @property {string} [transaction_id] - Unique identifier for the transaction
|
|
88
|
-
* @property {string} [current_status] - Current status of the payment
|
|
89
|
-
* collection (e.g., pending, completed, failed)
|
|
90
|
-
*/
|
|
91
2
|
/**
|
|
92
3
|
* @typedef SubscriptionChargeRes
|
|
93
4
|
* @property {string} [_id] - Unique identifier for the subscription charge
|
|
@@ -107,54 +18,33 @@ export = BillingPlatformModel;
|
|
|
107
18
|
* @property {Object[]} [line_items] - List of line items associated with the charge
|
|
108
19
|
*/
|
|
109
20
|
/**
|
|
110
|
-
* @typedef
|
|
111
|
-
* @property {
|
|
112
|
-
* @property {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
* @property {string} [
|
|
117
|
-
* @property {string} [
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @property {
|
|
123
|
-
* @property {
|
|
124
|
-
*
|
|
125
|
-
* @property {
|
|
126
|
-
* @property {string} [
|
|
127
|
-
* @property {string} [
|
|
128
|
-
*
|
|
129
|
-
* @property {
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* @
|
|
134
|
-
* @property {string} [
|
|
135
|
-
* @property {
|
|
136
|
-
* @property {
|
|
137
|
-
* webhooks related to the payment
|
|
138
|
-
* @property {string} [aggregator_status] - Status of the payment as provided by
|
|
139
|
-
* the aggregator (e.g., succeeded, failed)
|
|
140
|
-
* @property {string} [current_status] - Current status of the payment (e.g.,
|
|
141
|
-
* paid, pending)
|
|
142
|
-
* @property {string} [created_at] - Timestamp when the payment status data was created
|
|
143
|
-
* @property {string} [modified_at] - Timestamp when the payment status data was
|
|
144
|
-
* last modified
|
|
145
|
-
* @property {number} [__v] - Version key for the payment status data (typically
|
|
146
|
-
* used for versioning in databases)
|
|
147
|
-
* @property {string} [aggregator_order_id] - Unique identifier for the order
|
|
148
|
-
* provided by the payment aggregator
|
|
149
|
-
*/
|
|
150
|
-
/**
|
|
151
|
-
* @typedef PaymentStatusResponse
|
|
152
|
-
* @property {string} [status] - The status of the payment.
|
|
153
|
-
* @property {PaymentStatusData} [data]
|
|
154
|
-
*/
|
|
155
|
-
/**
|
|
156
|
-
* @typedef BadRequest
|
|
157
|
-
* @property {string} [message] - Failure message.
|
|
21
|
+
* @typedef ChargeDetails
|
|
22
|
+
* @property {string} [_id] - Unique identifier for the charge.
|
|
23
|
+
* @property {string} [entity_type] - The type of entity associated with the
|
|
24
|
+
* charge (e.g., 'extension', 'subscription').
|
|
25
|
+
* @property {string} [entity_id] - Unique identifier for the entity associated
|
|
26
|
+
* with the charge.
|
|
27
|
+
* @property {string} [name] - The name of the charge.
|
|
28
|
+
* @property {string} [term] - Description of the charge term.
|
|
29
|
+
* @property {string} [charge_type] - The type of charge (e.g., 'standalone',
|
|
30
|
+
* 'recurring').
|
|
31
|
+
* @property {string} [pricing_type] - The pricing model for the charge (e.g.,
|
|
32
|
+
* 'one_time', 'recurring').
|
|
33
|
+
* @property {EntityChargePrice} [price]
|
|
34
|
+
* @property {ChargeRecurring} [recurring]
|
|
35
|
+
* @property {string} [status] - Current status of the charge.
|
|
36
|
+
* @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
|
|
37
|
+
* @property {string} [activated_on] - Date and time when the charge was activated.
|
|
38
|
+
* @property {string} [cancelled_on] - Date and time when the charge was cancelled.
|
|
39
|
+
* @property {string} [billing_date] - Date and time when the charge was billed.
|
|
40
|
+
* @property {SubscriptionTrialPeriod} [current_period]
|
|
41
|
+
* @property {string} [modified_at] - Date and time when the charge details were
|
|
42
|
+
* last modified.
|
|
43
|
+
* @property {string} [created_at] - Date and time when the charge was created.
|
|
44
|
+
* @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
|
|
45
|
+
* @property {string} [company_id] - Company id.
|
|
46
|
+
* @property {Object} [meta] - Additional metadata associated with the charge.
|
|
47
|
+
* @property {number} [__v] - Internal version key for the charge record.
|
|
158
48
|
*/
|
|
159
49
|
/**
|
|
160
50
|
* @typedef ResourceNotFound
|
|
@@ -163,74 +53,48 @@ export = BillingPlatformModel;
|
|
|
163
53
|
* @property {Object} [success]
|
|
164
54
|
*/
|
|
165
55
|
/**
|
|
166
|
-
* @typedef
|
|
167
|
-
* @property {string} [
|
|
168
|
-
* @property {
|
|
56
|
+
* @typedef CreateOneTimeCharge
|
|
57
|
+
* @property {string} [name] - The name of the one-time charge to be created.
|
|
58
|
+
* @property {OneTimeChargeItem} [charge]
|
|
59
|
+
* @property {boolean} [is_test] - Indicates whether the charge creation is for
|
|
60
|
+
* testing purposes.
|
|
61
|
+
* @property {string} [return_url] - URL to which the user will be redirected
|
|
62
|
+
* after creating the charge.
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* @typedef CreateOneTimeChargeResponse
|
|
66
|
+
* @property {Charge} [charge]
|
|
67
|
+
* @property {string} [confirm_url] - URL to which users are redirected to
|
|
68
|
+
* confirm or complete the payment or subscription process.
|
|
169
69
|
*/
|
|
170
70
|
/**
|
|
171
|
-
* @typedef
|
|
172
|
-
* @property {
|
|
173
|
-
* @property {number} [discount_amount] - The amount of discount applicable.
|
|
71
|
+
* @typedef BadRequest
|
|
72
|
+
* @property {string} [message] - Failure message.
|
|
174
73
|
*/
|
|
175
74
|
/**
|
|
176
|
-
* @typedef
|
|
177
|
-
* @property {string}
|
|
178
|
-
* @property {number} [
|
|
75
|
+
* @typedef CreateSubscriptionCharge
|
|
76
|
+
* @property {string} name - The name of the charge.
|
|
77
|
+
* @property {number} [trial_days]
|
|
78
|
+
* @property {ChargeLineItem[]} line_items
|
|
79
|
+
* @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
|
|
80
|
+
* @property {string} return_url - The URL passed in request which extension
|
|
81
|
+
* expects in return.
|
|
179
82
|
*/
|
|
180
83
|
/**
|
|
181
|
-
* @typedef
|
|
182
|
-
* @property {
|
|
183
|
-
* @property {string} [
|
|
184
|
-
*
|
|
185
|
-
* @property {string[]} [tags] - Tags associated with the plan for
|
|
186
|
-
* categorization or identification.
|
|
84
|
+
* @typedef CreateSubscriptionResponse
|
|
85
|
+
* @property {EntitySubscription} [subscription]
|
|
86
|
+
* @property {string} [confirm_url] - URL to which users are redirected to
|
|
87
|
+
* confirm or complete the payment or subscription process.
|
|
187
88
|
*/
|
|
188
89
|
/**
|
|
189
|
-
* @typedef
|
|
190
|
-
* @property {
|
|
191
|
-
* @property {string} [
|
|
90
|
+
* @typedef EntityChargePrice
|
|
91
|
+
* @property {number} [amount] - The amount for the price. The minimum value is 1.
|
|
92
|
+
* @property {string} [currency_code] - The currency code for the price
|
|
192
93
|
*/
|
|
193
94
|
/**
|
|
194
|
-
* @typedef
|
|
195
|
-
* @property {
|
|
196
|
-
*
|
|
197
|
-
* @property {PlanRecurring} [recurring]
|
|
198
|
-
* @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan.
|
|
199
|
-
* @property {string} [plan_group] - Group or category of the plan.
|
|
200
|
-
* @property {string[]} [tag_lines] - List of tag lines or descriptions
|
|
201
|
-
* associated with the plan.
|
|
202
|
-
* @property {string} [currency] - Currency code used for the plan's pricing.
|
|
203
|
-
* @property {string} [approved_by] - Identifier of the user or system that
|
|
204
|
-
* approved the plan.
|
|
205
|
-
* @property {boolean} [is_active] - Indicates if the plan is currently active.
|
|
206
|
-
* @property {boolean} [is_visible] - Indicates if the plan is visible to users.
|
|
207
|
-
* @property {number} [trial_period] - Number of days for the trial period, if applicable.
|
|
208
|
-
* @property {string[]} [addons] - List of add-ons available for the plan.
|
|
209
|
-
* @property {string[]} [tags] - List of tags associated with the plan.
|
|
210
|
-
* @property {string} [type] - Type of the plan (e.g., public, private).
|
|
211
|
-
* @property {CountryRes} [country]
|
|
212
|
-
* @property {string} [_id] - Unique identifier for the plan.
|
|
213
|
-
* @property {string} [name] - Name of the plan.
|
|
214
|
-
* @property {string} [description] - Description of the plan.
|
|
215
|
-
* @property {number} [amount] - Amount to be charged for the plan.
|
|
216
|
-
* @property {string} [product_suite_id] - Identifier of the product suite to
|
|
217
|
-
* which the plan belongs.
|
|
218
|
-
* @property {string} [created_at] - Timestamp when the plan was created.
|
|
219
|
-
* @property {string} [modified_at] - Timestamp when the plan was last modified.
|
|
220
|
-
* @property {Taxation} [taxation]
|
|
221
|
-
* @property {OneTimeFees} [one_time_fees]
|
|
222
|
-
* @property {CreditLine} [credit_line]
|
|
223
|
-
* @property {string} [current_status] - Current status of the plan (e.g.,
|
|
224
|
-
* active, inactive).
|
|
225
|
-
* @property {string} [channel_type] - Type of channel where the plan is offered
|
|
226
|
-
* (e.g., ecomm, retail).
|
|
227
|
-
* @property {string[]} [company_ids] - List of company IDs associated with the
|
|
228
|
-
* plan. Can be null.
|
|
229
|
-
* @property {string} [platform] - Platform where the plan is available (e.g.,
|
|
230
|
-
* web, mobile). Can be null.
|
|
231
|
-
* @property {string} [activated_on] - Timestamp when the plan was activated.
|
|
232
|
-
* @property {PlanMeta} [meta]
|
|
233
|
-
* @property {string} [created_by] - Identifier of the user who created the plan.
|
|
95
|
+
* @typedef ChargeRecurring
|
|
96
|
+
* @property {string} [interval]
|
|
97
|
+
* @property {number} [interval_time]
|
|
234
98
|
*/
|
|
235
99
|
/**
|
|
236
100
|
* @typedef SubscriptionTrialPeriod
|
|
@@ -238,9 +102,8 @@ export = BillingPlatformModel;
|
|
|
238
102
|
* @property {string} [end_date] - The end date and time of the trial period.
|
|
239
103
|
*/
|
|
240
104
|
/**
|
|
241
|
-
* @typedef
|
|
242
|
-
* @property {
|
|
243
|
-
* @property {string} [currency_code] - The currency code for the price
|
|
105
|
+
* @typedef Charge
|
|
106
|
+
* @property {OneTimeChargeEntity} [final_charge]
|
|
244
107
|
*/
|
|
245
108
|
/**
|
|
246
109
|
* @typedef OneTimeChargeItem
|
|
@@ -255,47 +118,35 @@ export = BillingPlatformModel;
|
|
|
255
118
|
* @property {Object} [metadata] - Additional metadata associated with the charge item.
|
|
256
119
|
*/
|
|
257
120
|
/**
|
|
258
|
-
* @typedef
|
|
259
|
-
* @property {string}
|
|
260
|
-
* @property {
|
|
261
|
-
* @property {
|
|
262
|
-
*
|
|
263
|
-
* @property {
|
|
264
|
-
*
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
* @
|
|
268
|
-
* @property {
|
|
269
|
-
* @property {number} [interval_time]
|
|
121
|
+
* @typedef ChargeLineItem
|
|
122
|
+
* @property {string} name - Its name of the extension plan.
|
|
123
|
+
* @property {string} term - It indicates how it will be charged.
|
|
124
|
+
* @property {string} pricing_type - It indicates the extension subscription
|
|
125
|
+
* will be auto renewed timely.
|
|
126
|
+
* @property {EntityChargePrice} price
|
|
127
|
+
* @property {EntityChargeRecurring} [recurring]
|
|
128
|
+
* @property {number} [capped_amount]
|
|
129
|
+
* @property {number} [trial_days]
|
|
130
|
+
* @property {boolean} [is_test]
|
|
131
|
+
* @property {Object} [metadata]
|
|
270
132
|
*/
|
|
271
133
|
/**
|
|
272
|
-
* @typedef
|
|
273
|
-
* @property {string} [_id] - Unique identifier for the charge
|
|
274
|
-
* @property {string} [
|
|
275
|
-
* charge
|
|
276
|
-
* @property {string} [entity_id] - Unique identifier for the entity
|
|
277
|
-
*
|
|
278
|
-
* @property {string} [name] -
|
|
279
|
-
* @property {string} [
|
|
280
|
-
* @property {
|
|
281
|
-
*
|
|
282
|
-
* @property {string} [
|
|
283
|
-
*
|
|
284
|
-
* @property {
|
|
285
|
-
* @property {
|
|
286
|
-
* @property {string} [
|
|
287
|
-
*
|
|
288
|
-
* @property {string} [activated_on] - Date and time when the charge was activated.
|
|
289
|
-
* @property {string} [cancelled_on] - Date and time when the charge was cancelled.
|
|
290
|
-
* @property {string} [billing_date] - Date and time when the charge was billed.
|
|
291
|
-
* @property {SubscriptionTrialPeriod} [current_period]
|
|
292
|
-
* @property {string} [modified_at] - Date and time when the charge details were
|
|
293
|
-
* last modified.
|
|
294
|
-
* @property {string} [created_at] - Date and time when the charge was created.
|
|
295
|
-
* @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
|
|
296
|
-
* @property {string} [company_id] - Company id.
|
|
297
|
-
* @property {Object} [meta] - Additional metadata associated with the charge.
|
|
298
|
-
* @property {number} [__v] - Internal version key for the charge record.
|
|
134
|
+
* @typedef EntitySubscription
|
|
135
|
+
* @property {string} [_id] - Unique identifier for the subscription charge
|
|
136
|
+
* @property {string} [product_suit_id] - ID of the product suit associated with
|
|
137
|
+
* the charge
|
|
138
|
+
* @property {string} [entity_id] - Unique identifier for the entity
|
|
139
|
+
* @property {string} [entity_type] - Type of entity (e.g., subscription, extension)
|
|
140
|
+
* @property {string} [name] - Name of the subscription charge
|
|
141
|
+
* @property {string} [status] - Current status of the subscription charge
|
|
142
|
+
* @property {number} [trial_days] - Number of trial days provided
|
|
143
|
+
* @property {boolean} [is_test] - Indicates if the charge is for testing purposes
|
|
144
|
+
* @property {string} [created_at] - Timestamp when the charge was created
|
|
145
|
+
* @property {string} [modified_at] - Timestamp when the charge was last modified
|
|
146
|
+
* @property {string} [subscriber_id] - Unique Identifier of the company
|
|
147
|
+
* @property {EntityChargeDetails[]} [line_items]
|
|
148
|
+
* @property {string} [return_url] - The URL passed in request which extension
|
|
149
|
+
* expects in return.
|
|
299
150
|
*/
|
|
300
151
|
/**
|
|
301
152
|
* @typedef OneTimeChargeEntity
|
|
@@ -332,1117 +183,46 @@ export = BillingPlatformModel;
|
|
|
332
183
|
* @property {EntityChargePrice} [price]
|
|
333
184
|
*/
|
|
334
185
|
/**
|
|
335
|
-
* @typedef
|
|
336
|
-
* @property {
|
|
337
|
-
* @property {string} [confirm_url] - URL to which users are redirected to
|
|
338
|
-
* confirm or complete the payment or subscription process.
|
|
339
|
-
*/
|
|
340
|
-
/**
|
|
341
|
-
* @typedef Charge
|
|
342
|
-
* @property {OneTimeChargeEntity} [final_charge]
|
|
343
|
-
*/
|
|
344
|
-
/**
|
|
345
|
-
* @typedef InvoiceDetailsStatusTrail
|
|
346
|
-
* @property {string} [_id] - Unique identifier for the status trail entry.
|
|
347
|
-
* @property {string} [value] - The status value of the invoice at a particular
|
|
348
|
-
* point in time.
|
|
349
|
-
* @property {string} [timestamp] - The date and time when this status was recorded.
|
|
350
|
-
*/
|
|
351
|
-
/**
|
|
352
|
-
* @typedef InvoiceItemsPlanRecurring
|
|
353
|
-
* @property {string} [interval] - The interval at which the plan recurs (e.g.,
|
|
354
|
-
* month, year).
|
|
355
|
-
* @property {number} [interval_count] - The number of intervals for the recurring plan.
|
|
356
|
-
*/
|
|
357
|
-
/**
|
|
358
|
-
* @typedef InvoiceItemsPlan
|
|
359
|
-
* @property {InvoiceItemsPlanRecurring} [recurring]
|
|
360
|
-
* @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan.
|
|
361
|
-
* @property {string} [plan_group] - Group or category to which the plan belongs.
|
|
362
|
-
* @property {string[]} [tag_lines] - List of tag lines or short descriptions
|
|
363
|
-
* for the plan.
|
|
364
|
-
* @property {string} [currency] - Currency code for the pricing of the plan.
|
|
365
|
-
* @property {boolean} [is_active] - Indicates whether the plan is currently active.
|
|
366
|
-
* @property {boolean} [is_visible] - Indicates whether the plan is visible to users.
|
|
367
|
-
* @property {number} [trial_period] - The number of days for the trial period.
|
|
368
|
-
* @property {string[]} [addons] - List of add-ons available with the plan.
|
|
369
|
-
* @property {string[]} [tags] - Tags associated with the plan for categorization.
|
|
370
|
-
* @property {string} [type] - Type of the plan (e.g., public, private).
|
|
371
|
-
* @property {string} [country] - Country for which plan is created
|
|
372
|
-
* @property {string} [_id] - Unique identifier for the plan.
|
|
373
|
-
* @property {string} [name] - Name of the plan.
|
|
374
|
-
* @property {string} [description] - Detailed description of the plan.
|
|
375
|
-
* @property {number} [amount] - Price of the plan in the specified currency.
|
|
376
|
-
* @property {string} [product_suite_id] - Identifier for the product suite to
|
|
377
|
-
* which the plan belongs.
|
|
378
|
-
* @property {string} [created_at] - Timestamp when the plan was created.
|
|
379
|
-
* @property {string} [modified_at] - Timestamp when the plan was last modified.
|
|
380
|
-
*/
|
|
381
|
-
/**
|
|
382
|
-
* @typedef InvoiceItemsPeriod
|
|
383
|
-
* @property {string} [start] - Start date of the invoice period.
|
|
384
|
-
* @property {string} [end] - End date of the invoice period.
|
|
385
|
-
*/
|
|
386
|
-
/**
|
|
387
|
-
* @typedef InvoiceItems
|
|
388
|
-
* @property {string} [_id] - Unique identifier for the invoice item.
|
|
389
|
-
* @property {string} [currency] - Currency for the amount.
|
|
390
|
-
* @property {InvoiceItemsPlan} [plan]
|
|
391
|
-
* @property {string} [name] - Name of the invoice item.
|
|
392
|
-
* @property {number} [quantity] - Number of units of the invoice item.
|
|
393
|
-
* @property {string} [description] - Description of the invoice item.
|
|
394
|
-
* @property {InvoiceItemsPeriod} [period]
|
|
395
|
-
* @property {number} [unit_amount] - Amount per unit of the invoice item.
|
|
396
|
-
* @property {number} [amount] - Total amount for the invoice item.
|
|
397
|
-
* @property {string} [type] - Type of the invoice item (e.g., subscription, extension).
|
|
398
|
-
* @property {string} [invoice_id] - Identifier for the invoice to which the item belongs.
|
|
399
|
-
* @property {string} [created_at] - Timestamp when the invoice item was created.
|
|
400
|
-
* @property {string} [modified_at] - Timestamp when the invoice item was last modified.
|
|
401
|
-
*/
|
|
402
|
-
/**
|
|
403
|
-
* @typedef InvoicesDataClient
|
|
404
|
-
* @property {string} [name] - Name of the client.
|
|
405
|
-
* @property {string} [email] - Email address of the client.
|
|
406
|
-
* @property {string} [phone] - Phone number of the client.
|
|
407
|
-
* @property {string[]} [address_lines] - Array of address lines for the client’s address.
|
|
408
|
-
*/
|
|
409
|
-
/**
|
|
410
|
-
* @typedef InvoicesDataPeriod
|
|
411
|
-
* @property {string} [start] - The start date and time of the invoice period.
|
|
412
|
-
* @property {string} [end] - The end date and time of the invoice period.
|
|
413
|
-
*/
|
|
414
|
-
/**
|
|
415
|
-
* @typedef InvoicesDataPaymentMethod
|
|
416
|
-
* @property {string} [pg_payment_method_id] - Payment gateway-specific payment
|
|
417
|
-
* method identifier. Nullable if not applicable.
|
|
418
|
-
*/
|
|
419
|
-
/**
|
|
420
|
-
* @typedef InvoicesData
|
|
421
|
-
* @property {string} [_id] - Unique identifier for the invoice.
|
|
422
|
-
* @property {Object} [documents] - Associated documents related to the invoice.
|
|
423
|
-
* @property {Object} [payment] - Payment details for the invoice.
|
|
424
|
-
* @property {number} [old_settlement] - Previous settlement amount, if applicable.
|
|
425
|
-
* @property {number} [credit_balance] - Remaining credit balance applied to the
|
|
426
|
-
* invoice, if any.
|
|
427
|
-
* @property {Object} [discount] - Details of any discounts applied to the invoice.
|
|
428
|
-
* @property {Object} [taxation] - Taxation details associated with the invoice.
|
|
429
|
-
* @property {number} [credit_note_amount] - Amount covered by credit notes, if any.
|
|
430
|
-
* @property {InvoicesDataClient} [client]
|
|
431
|
-
* @property {boolean} [auto_advance] - Indicates if the invoice should be
|
|
432
|
-
* auto-advanced in the billing process.
|
|
433
|
-
* @property {string} [currency] - Currency code used for the invoice amount.
|
|
434
|
-
* @property {boolean} [paid] - Indicates if the invoice has been paid.
|
|
435
|
-
* @property {number} [attemp] - Number of payment attempts made for the invoice.
|
|
436
|
-
* @property {string} [collection_method] - Method used to collect payment for
|
|
437
|
-
* the invoice.
|
|
438
|
-
* @property {string} [subscriber_id] - Identifier for the subscriber associated
|
|
439
|
-
* with the invoice.
|
|
440
|
-
* @property {string} [invoice_url] - URL to view or download the invoice.
|
|
441
|
-
* "null" if not available.
|
|
442
|
-
* @property {string} [number] - Unique invoice number.
|
|
443
|
-
* @property {Object} [pg_data] - Payment gateway-related data for the invoice.
|
|
444
|
-
* @property {InvoicesDataPeriod} [period]
|
|
445
|
-
* @property {string} [receipt_number] - Receipt number for the invoice payment.
|
|
446
|
-
* @property {string} [statement_descriptor] - Descriptor that appears on the
|
|
447
|
-
* client's statement for the invoice.
|
|
448
|
-
* @property {string} [current_status] - Current status of the invoice (e.g.,
|
|
449
|
-
* paid, pending).
|
|
450
|
-
* @property {InvoiceDetailsStatusTrail[]} [status_trail] - History of status
|
|
451
|
-
* changes for the invoice.
|
|
452
|
-
* @property {number} [subtotal] - Subtotal amount before taxes and discounts.
|
|
453
|
-
* @property {number} [total] - Total amount including taxes and discounts.
|
|
454
|
-
* @property {string} [subscription] - Identifier for the subscription
|
|
455
|
-
* associated with the invoice.
|
|
456
|
-
* @property {string} [next_action_time] - Scheduled time for the next action
|
|
457
|
-
* related to the invoice.
|
|
458
|
-
* @property {string} [created_at] - Timestamp when the invoice was created.
|
|
459
|
-
* @property {string} [modified_at] - Timestamp when the invoice was last modified.
|
|
460
|
-
* @property {string} [hash_identifier] - Unique hash identifier for the invoice.
|
|
461
|
-
* @property {InvoicesDataPaymentMethod} [payment_method]
|
|
462
|
-
* @property {InvoiceItems[]} [invoice_items] - List of items included in the invoice.
|
|
463
|
-
* @property {string} [invoice_type] - Type of invoice (e.g., extension, subscription).
|
|
464
|
-
*/
|
|
465
|
-
/**
|
|
466
|
-
* @typedef Invoices
|
|
467
|
-
* @property {InvoicesData[]} [data]
|
|
468
|
-
* @property {number} [start] - Index of the first item in the results.
|
|
469
|
-
* @property {number} [end] - Index of the last item in the results.
|
|
470
|
-
* @property {number} [limit] - Number of items per page.
|
|
471
|
-
* @property {number} [page] - Page number of the results.
|
|
472
|
-
* @property {number} [total] - Total number of items available.
|
|
473
|
-
*/
|
|
474
|
-
/**
|
|
475
|
-
* @typedef Phone
|
|
476
|
-
* @property {string} [phone_number] - The phone number of the contact.
|
|
477
|
-
* @property {string} [phone_country_code] - The country code of the phone number.
|
|
478
|
-
*/
|
|
479
|
-
/**
|
|
480
|
-
* @typedef SubscriptionBillingAddress
|
|
481
|
-
* @property {string} [country] - Name of the country for the billing address.
|
|
482
|
-
* @property {string} [country_code] - ISO country code for the billing address.
|
|
483
|
-
* @property {string} [state] - State or province for the billing address.
|
|
484
|
-
* @property {string} [city] - City for the billing address.
|
|
485
|
-
* @property {string} [line1] - First line of the street address.
|
|
486
|
-
* @property {string} [line2] - Second line of the street address (optional).
|
|
487
|
-
* @property {string} [postal_code] - Postal or ZIP code for the billing address.
|
|
488
|
-
*/
|
|
489
|
-
/**
|
|
490
|
-
* @typedef SubscriptionCustomer
|
|
491
|
-
* @property {Phone} [phone]
|
|
492
|
-
* @property {SubscriptionBillingAddress} [billing_address]
|
|
493
|
-
* @property {string} [_id] - Unique identifier for the subscriber.
|
|
494
|
-
* @property {string} [unique_id] - Identifier specific to the company.
|
|
495
|
-
* @property {string} [type] - Type of the customer (e.g., developer, company).
|
|
496
|
-
* @property {string} [name] - Name of the customer.
|
|
497
|
-
* @property {string} [email] - Email address of the customer.
|
|
498
|
-
* @property {string} [created_at] - Timestamp when the customer record was created.
|
|
499
|
-
* @property {string} [modified_at] - Timestamp when the customer record was
|
|
500
|
-
* last modified.
|
|
501
|
-
* @property {Object} [data] - Additional data related to the customer.
|
|
502
|
-
* @property {Object} [documents] - Associated documents related to the customer.
|
|
503
|
-
* @property {boolean} [consent] - Indicates whether the customer has given consent.
|
|
504
|
-
* @property {boolean} [comms] - Indicates whether the customer has opted in for
|
|
505
|
-
* communications.
|
|
506
|
-
* @property {number} [credit_balance] - Current credit balance for the customer, if any.
|
|
507
|
-
* @property {BusinessCountryInfo} [business_country_info]
|
|
508
|
-
*/
|
|
509
|
-
/**
|
|
510
|
-
* @typedef SubscriptionCustomerCreate
|
|
511
|
-
* @property {Phone} [phone]
|
|
512
|
-
* @property {SubscriptionBillingAddress} [billing_address]
|
|
513
|
-
* @property {string} [unique_id] - Company id for the customer, generated by the client.
|
|
514
|
-
* @property {string} [type] - Type of company
|
|
515
|
-
* @property {string} [name] - Name of the company
|
|
516
|
-
* @property {string} [email] - Email address of the company
|
|
517
|
-
*/
|
|
518
|
-
/**
|
|
519
|
-
* @typedef SubscriptionCurrentPeriod
|
|
520
|
-
* @property {string} [start] - The start date and time of the current
|
|
521
|
-
* subscription period.
|
|
522
|
-
* @property {string} [end] - The end date and time of the current subscription period.
|
|
523
|
-
*/
|
|
524
|
-
/**
|
|
525
|
-
* @typedef SubscriptionPauseCollection
|
|
526
|
-
* @property {string} [behavior] - Defines the behavior of the subscription when
|
|
527
|
-
* it is paused. Possible values could include `keep_as_draft` or `cancel`.
|
|
528
|
-
* @property {string} [resume_at] - The date and time when the paused
|
|
529
|
-
* subscription is scheduled to resume.
|
|
530
|
-
*/
|
|
531
|
-
/**
|
|
532
|
-
* @typedef SubscriptionTrial
|
|
533
|
-
* @property {string} [start] - The start date and time of the subscription trial period.
|
|
534
|
-
* @property {string} [end] - The end date and time of the subscription trial period.
|
|
535
|
-
*/
|
|
536
|
-
/**
|
|
537
|
-
* @typedef SubscriptionInvoiceSettings
|
|
538
|
-
* @property {boolean} [generation] - Indicates whether invoices are
|
|
539
|
-
* automatically generated for the subscription.
|
|
540
|
-
* @property {boolean} [charging] - Indicates whether charging is enabled for
|
|
541
|
-
* the subscription. This setting determines if charges are applied based on
|
|
542
|
-
* the invoice settings.
|
|
543
|
-
*/
|
|
544
|
-
/**
|
|
545
|
-
* @typedef Subscription
|
|
546
|
-
* @property {Object} [meta] - Additional metadata related to the subscription.
|
|
547
|
-
* @property {SubscriptionCurrentPeriod} [current_period]
|
|
548
|
-
* @property {SubscriptionPauseCollection} [pause_collection]
|
|
549
|
-
* @property {SubscriptionTrial} [trial]
|
|
550
|
-
* @property {SubscriptionInvoiceSettings} [invoice_settings]
|
|
551
|
-
* @property {boolean} [is_active] - Indicates whether the subscription is
|
|
552
|
-
* currently active.
|
|
553
|
-
* @property {boolean} [cancel_at_period_end] - Indicates whether the
|
|
554
|
-
* subscription will be canceled at the end of the current period.
|
|
555
|
-
* @property {string} [_id] - Unique identifier for the subscription.
|
|
556
|
-
* @property {string} [subscriber_id] - Unique identifier for the subscriber
|
|
557
|
-
* associated with the subscription.
|
|
558
|
-
* @property {string} [plan_id] - Unique identifier for the plan associated with
|
|
559
|
-
* the subscription.
|
|
560
|
-
* @property {string} [product_suite_id] - Unique identifier for the product
|
|
561
|
-
* suite associated with the subscription.
|
|
562
|
-
* @property {boolean} [is_eligible_for_plan_change] - Indicates whether the
|
|
563
|
-
* subscriber is eligible to change their subscription plan.
|
|
564
|
-
* @property {Plan} [plan_data]
|
|
565
|
-
* @property {string} [current_status] - The current status of the subscription
|
|
566
|
-
* (e.g., active, canceled).
|
|
567
|
-
* @property {string} [collection_method] - Method used to collect payments for
|
|
568
|
-
* the subscription (e.g., charge_automatically, invoice).
|
|
569
|
-
* @property {string} [created_at] - The date and time when the subscription was created.
|
|
570
|
-
* @property {string} [modified_at] - The date and time when the subscription
|
|
571
|
-
* was last modified.
|
|
572
|
-
* @property {string} [latest_invoice] - Unique identifier for the most recent
|
|
573
|
-
* invoice related to the subscription.
|
|
574
|
-
* @property {string} [channel_type] - Ordering channel for which the
|
|
575
|
-
* subscription was created (e.g., ecomm, fynd).
|
|
576
|
-
* @property {boolean} [freezed] - Indicates whether the subscription is
|
|
577
|
-
* currently freezed.
|
|
578
|
-
* @property {string} [cancel_at] - The date and time when the subscription is
|
|
579
|
-
* scheduled to be canceled, if applicable.
|
|
580
|
-
* @property {string} [canceled_at] - The date and time when the subscription
|
|
581
|
-
* was actually canceled.
|
|
582
|
-
*/
|
|
583
|
-
/**
|
|
584
|
-
* @typedef SubscriptionStatus
|
|
585
|
-
* @property {boolean} [is_enabled] - Indicates whether the subscription status
|
|
586
|
-
* is enabled.
|
|
587
|
-
* @property {Subscription} [subscription]
|
|
588
|
-
* @property {InvoicesData} [latest_invoice]
|
|
589
|
-
* @property {Plan} [next_plan]
|
|
590
|
-
* @property {Subscription[]} [current_subscriptions] - List of current
|
|
591
|
-
* subscriptions associated with the user.
|
|
592
|
-
* @property {number} [mandate_amount] - The amount mandated for the
|
|
593
|
-
* subscription or service.
|
|
594
|
-
* @property {string} [message] - A message providing additional context or
|
|
595
|
-
* information about the subscription status.
|
|
596
|
-
*/
|
|
597
|
-
/**
|
|
598
|
-
* @typedef SubscriptionLimitApplication
|
|
599
|
-
* @property {boolean} [enabled] - Indicates whether the application limit is enabled.
|
|
600
|
-
* @property {number} [hard_limit] - The maximum number of applications allowed.
|
|
601
|
-
* @property {number} [soft_limit] - The soft limit of applications allowed,
|
|
602
|
-
* typically a warning threshold before reaching the hard limit.
|
|
603
|
-
*/
|
|
604
|
-
/**
|
|
605
|
-
* @typedef SubscriptionLimitMarketplace
|
|
606
|
-
* @property {boolean} [enabled] - Indicates whether the marketplace limit is enabled.
|
|
607
|
-
*/
|
|
608
|
-
/**
|
|
609
|
-
* @typedef SubscriptionLimitOtherPlatform
|
|
610
|
-
* @property {boolean} [enabled] - Indicates whether the other platform limit is enabled.
|
|
611
|
-
*/
|
|
612
|
-
/**
|
|
613
|
-
* @typedef SubscriptionLimitTeam
|
|
614
|
-
* @property {number} [limit] - The limit for team-related features.
|
|
615
|
-
*/
|
|
616
|
-
/**
|
|
617
|
-
* @typedef SubscriptionLimitProducts
|
|
618
|
-
* @property {boolean} [bulk] - Indicates whether bulk product limits are enabled.
|
|
619
|
-
* @property {number} [limit] - The limit for products.
|
|
620
|
-
*/
|
|
621
|
-
/**
|
|
622
|
-
* @typedef SubscriptionLimitExtensions
|
|
623
|
-
* @property {boolean} [enabled] - Indicates whether the extensions limit is enabled.
|
|
624
|
-
* @property {number} [limit] - The limit for extensions.
|
|
625
|
-
*/
|
|
626
|
-
/**
|
|
627
|
-
* @typedef SubscriptionLimitIntegrations
|
|
628
|
-
* @property {boolean} [enabled] - Indicates whether the integrations limit is enabled.
|
|
629
|
-
* @property {number} [limit] - The limit for integrations. A value of `-1`
|
|
630
|
-
* usually indicates no limit.
|
|
631
|
-
*/
|
|
632
|
-
/**
|
|
633
|
-
* @typedef SubscriptionLimit
|
|
634
|
-
* @property {SubscriptionLimitApplication} [application]
|
|
635
|
-
* @property {SubscriptionLimitMarketplace} [marketplace]
|
|
636
|
-
* @property {SubscriptionLimitOtherPlatform} [other_platform]
|
|
637
|
-
* @property {SubscriptionLimitTeam} [team]
|
|
638
|
-
* @property {SubscriptionLimitProducts} [products]
|
|
639
|
-
* @property {SubscriptionLimitExtensions} [extensions]
|
|
640
|
-
* @property {SubscriptionLimitIntegrations} [integrations]
|
|
641
|
-
* @property {boolean} [is_trial_plan] - Indicates whether the subscription is
|
|
642
|
-
* for a trial plan.
|
|
643
|
-
*/
|
|
644
|
-
/**
|
|
645
|
-
* @typedef IntentReq
|
|
646
|
-
* @property {string} [unique_external_id] - A unique identifier for the
|
|
647
|
-
* external resource, used to track and reference the request like company id.
|
|
648
|
-
* @property {string} [plan_id] - The identifier for the plan associated with the intent.
|
|
649
|
-
*/
|
|
650
|
-
/**
|
|
651
|
-
* @typedef PutIntentReq
|
|
652
|
-
* @property {string} [unique_external_id] - A unique identifier for the
|
|
653
|
-
* external resource, used to track and reference the request like company id.
|
|
654
|
-
* @property {string} [setup_intent_id] - The ID of the setup intent for payment
|
|
655
|
-
* methods, if applicable.
|
|
656
|
-
* @property {string} [payment_method_id] - The ID of the payment method to use
|
|
657
|
-
* for the intent.
|
|
658
|
-
* @property {boolean} [set_default] - Indicates whether the payment method
|
|
659
|
-
* should be set as default.
|
|
660
|
-
*/
|
|
661
|
-
/**
|
|
662
|
-
* @typedef SubscriptionActivateReq
|
|
663
|
-
* @property {string} [unique_id] - A unique identifier for the subscription
|
|
664
|
-
* activation request.
|
|
665
|
-
* @property {string} [type] - The type of subscriber account, e.g., company or developer.
|
|
666
|
-
* @property {string} [product_suite] - The product suite associated with the
|
|
667
|
-
* subscription.
|
|
668
|
-
* @property {string} [plan_id] - The ID of the plan to be activated for the subscription.
|
|
669
|
-
* @property {string} [payment_method] - The payment method ID to be used for
|
|
670
|
-
* this subscription.
|
|
671
|
-
* @property {string} [subscription_id] - The ID of the subscription to be
|
|
672
|
-
* activated, if applicable.
|
|
673
|
-
* @property {string} [coupon] - A coupon code for applying discounts, if applicable.
|
|
674
|
-
* @property {Object} [meta] - Additional metadata related to the subscription
|
|
675
|
-
* activation request.
|
|
676
|
-
*/
|
|
677
|
-
/**
|
|
678
|
-
* @typedef SubscriptionActivateRes
|
|
679
|
-
* @property {boolean} [success] - Indicates whether the subscription activation
|
|
680
|
-
* was successful.
|
|
681
|
-
* @property {Subscription} [data]
|
|
682
|
-
*/
|
|
683
|
-
/**
|
|
684
|
-
* @typedef CancelSubscriptionReq
|
|
685
|
-
* @property {string} [unique_id] - A unique identifier for the subscription
|
|
686
|
-
* cancellation request like company id.
|
|
687
|
-
* @property {string} [type] - The type of subscription to be canceled, e.g.,
|
|
688
|
-
* company or developer.
|
|
689
|
-
* @property {string} [product_suite] - The product suite associated with the
|
|
690
|
-
* subscription to be canceled.
|
|
691
|
-
* @property {string} [subscription_id] - The ID of the subscription to be canceled.
|
|
692
|
-
*/
|
|
693
|
-
/**
|
|
694
|
-
* @typedef CancelSubscriptionRes
|
|
695
|
-
* @property {boolean} [success]
|
|
696
|
-
* @property {Subscription} [data]
|
|
697
|
-
*/
|
|
698
|
-
/**
|
|
699
|
-
* @typedef PlanStatusUpdateReq
|
|
700
|
-
* @property {string} [plan_id] - The identifier of the plan whose status is
|
|
701
|
-
* being updated.
|
|
702
|
-
* @property {string} [reason] - The reason for updating the plan status.
|
|
703
|
-
* @property {string} [seller_status] - The new status of the plan as set by the
|
|
704
|
-
* seller (e.g., approved, rejected, pending).
|
|
705
|
-
*/
|
|
706
|
-
/**
|
|
707
|
-
* @typedef SubscribePlan
|
|
708
|
-
* @property {string} [entity_type] - The type of entity for which the plan is
|
|
709
|
-
* being subscribed (e.g., subscription, extension).
|
|
710
|
-
* @property {string} [collection_type] - The method of collection for the
|
|
711
|
-
* subscription (e.g., online, offline).
|
|
712
|
-
* @property {string} [plan_id] - The identifier of the plan to subscribe to.
|
|
713
|
-
* @property {string} [callback_url] - URL to which the payment result will be sent
|
|
714
|
-
* @property {Meta} [meta]
|
|
715
|
-
*/
|
|
716
|
-
/**
|
|
717
|
-
* @typedef Meta
|
|
718
|
-
* @property {boolean} [subscribe] - Indicates whether the subscription is being
|
|
719
|
-
* initiated.
|
|
720
|
-
* @property {boolean} [is_custom_plan] - Indicates if the plan is a custom plan
|
|
721
|
-
* rather than a standard one.
|
|
722
|
-
* @property {boolean} [is_plan_upgrade] - Indicates whether this subscription
|
|
723
|
-
* is an upgrade from a previous plan.
|
|
724
|
-
*/
|
|
725
|
-
/**
|
|
726
|
-
* @typedef SubscribePlanRes
|
|
727
|
-
* @property {string} [redirect_url] - The URL to which the user should be
|
|
728
|
-
* redirected after completion of subscription process.
|
|
729
|
-
* @property {string} [transaction_id] - The unique identifier for the
|
|
730
|
-
* subscription transaction.
|
|
731
|
-
* @property {string} [current_status] - The current status of the subscription
|
|
732
|
-
* process (e.g., initiated, success, failed).
|
|
733
|
-
* @property {Meta} [meta]
|
|
734
|
-
*/
|
|
735
|
-
/**
|
|
736
|
-
* @typedef EntityDetail
|
|
737
|
-
* @property {string} [entity] - Specifies the type of entity (e.g., subscription, user).
|
|
738
|
-
* @property {Subscription} [item]
|
|
186
|
+
* @typedef EntityChargeRecurring
|
|
187
|
+
* @property {string} interval - The interval of the subscription.
|
|
739
188
|
*/
|
|
740
189
|
/**
|
|
741
|
-
* @typedef
|
|
742
|
-
* @property {string} [_id] - Unique identifier for the
|
|
743
|
-
* @property {string} [
|
|
744
|
-
* @property {string} [
|
|
745
|
-
*
|
|
746
|
-
* @property {string} [
|
|
747
|
-
*
|
|
748
|
-
* @property {string} [
|
|
749
|
-
*
|
|
750
|
-
* @property {string} [
|
|
190
|
+
* @typedef EntityChargeDetails
|
|
191
|
+
* @property {string} [_id] - Unique identifier for the charge.
|
|
192
|
+
* @property {string} [subscription_id] - Unique identifier of the extension subscription.
|
|
193
|
+
* @property {string} [subscriber_id] - Unique identifier of the
|
|
194
|
+
* subscriber/company who installed extension subscription.
|
|
195
|
+
* @property {string} [entity_type] - The type of entity associated with the
|
|
196
|
+
* charge (e.g., 'extension', 'subscription').
|
|
197
|
+
* @property {string} [entity_id] - Unique identifier for the entity associated
|
|
198
|
+
* with the charge.
|
|
199
|
+
* @property {string} [name] - The name of the charge.
|
|
200
|
+
* @property {string} [term] - Description of the charge term.
|
|
201
|
+
* @property {string} [charge_type] - The type of charge (e.g., 'standalone',
|
|
202
|
+
* 'recurring').
|
|
203
|
+
* @property {string} [pricing_type] - The pricing model for the charge (e.g.,
|
|
204
|
+
* 'one_time', 'recurring').
|
|
205
|
+
* @property {EntityChargePrice} [price]
|
|
206
|
+
* @property {ChargeRecurring} [recurring]
|
|
207
|
+
* @property {string} [status] - Current status of the charge.
|
|
208
|
+
* @property {number} [capped_amount] - Maximum amount that can be charged, if applicable.
|
|
209
|
+
* @property {string} [activated_on] - Date and time when the charge was activated.
|
|
210
|
+
* @property {string} [cancelled_on] - Date and time when the charge was cancelled.
|
|
211
|
+
* @property {string} [billing_date] - Date and time when the charge was billed.
|
|
212
|
+
* @property {SubscriptionTrialPeriod} [current_period]
|
|
213
|
+
* @property {string} [modified_at] - Date and time when the charge details were
|
|
751
214
|
* last modified.
|
|
752
|
-
* @property {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
* @
|
|
756
|
-
* @property {
|
|
757
|
-
* @property {string} [razorpay_order_id] - Unique identifier for the Razorpay order.
|
|
758
|
-
* @property {string} [razorpay_signature] - Signature generated by Razorpay to
|
|
759
|
-
* verify the payment.
|
|
760
|
-
* @property {number} [status_code] - HTTP status code of the payment
|
|
761
|
-
* verification response.
|
|
762
|
-
* @property {string} [provider_type] - The payment provider used for the transaction.
|
|
763
|
-
*/
|
|
764
|
-
/**
|
|
765
|
-
* @typedef Documents
|
|
766
|
-
* @property {string} [pan] - Permanent Account Number (PAN) used for tax purposes.
|
|
767
|
-
* @property {string} [gst] - Goods and Services Tax (GST) number for business taxation.
|
|
768
|
-
*/
|
|
769
|
-
/**
|
|
770
|
-
* @typedef BillingAddress
|
|
771
|
-
* @property {string} [country] - The country where the billing address is located.
|
|
772
|
-
* @property {string} [state] - The state or region within the country.
|
|
773
|
-
* @property {string} [city] - The city of the billing address.
|
|
774
|
-
* @property {string} [line1] - The first line of the billing address.
|
|
775
|
-
* @property {string} [line2] - The second line of the billing address (if applicable).
|
|
776
|
-
* @property {string} [postal_code] - The ZIP code of the billing address.
|
|
777
|
-
* @property {string} [country_code] - ISO country code for the country of the
|
|
778
|
-
* billing address.
|
|
779
|
-
*/
|
|
780
|
-
/**
|
|
781
|
-
* @typedef Currency
|
|
782
|
-
* @property {string} [code] - Currency code as per ISO 4217.
|
|
783
|
-
* @property {string} [symbol] - Symbol representing the currency.
|
|
784
|
-
* @property {string} [name] - Full name of the currency.
|
|
785
|
-
*/
|
|
786
|
-
/**
|
|
787
|
-
* @typedef BusinessCountryInfo
|
|
788
|
-
* @property {string} [country] - The country where the business is registered.
|
|
789
|
-
* @property {string} [country_code] - ISO country code for the business's country.
|
|
790
|
-
* @property {Currency} [currency]
|
|
791
|
-
* @property {string} [timezone] - Timezone in which the business operates.
|
|
792
|
-
*/
|
|
793
|
-
/**
|
|
794
|
-
* @typedef SubscriberData
|
|
795
|
-
* @property {boolean} [pg_user_exists] - Indicates if the user exists in the
|
|
796
|
-
* payment gateway system.
|
|
797
|
-
* @property {string} [id] - Unique identifier for the subscriber.
|
|
798
|
-
* @property {string} [pg_customer_id] - Unique customer ID assigned by the
|
|
799
|
-
* payment gateway.
|
|
800
|
-
* @property {string} [default_payment_method] - Identifier for the default
|
|
801
|
-
* payment method used by the subscriber.
|
|
802
|
-
*/
|
|
803
|
-
/**
|
|
804
|
-
* @typedef Subscriber
|
|
805
|
-
* @property {Documents} [documents]
|
|
806
|
-
* @property {Object} [phone] - Contact information for the subscriber, such as
|
|
807
|
-
* phone number.
|
|
808
|
-
* @property {BillingAddress} [billing_address]
|
|
809
|
-
* @property {boolean} [consent] - Indicates whether the subscriber has given
|
|
810
|
-
* consent for processing.
|
|
811
|
-
* @property {boolean} [comms] - Indicates whether the subscriber has opted in
|
|
812
|
-
* for communications.
|
|
813
|
-
* @property {string} [_id] - Unique identifier for the subscriber in the system.
|
|
814
|
-
* @property {string} [type] - The type of the subscriber, such as 'individual'
|
|
815
|
-
* or 'company'.
|
|
816
|
-
* @property {string} [unique_id] - A unique identifier assigned to the subscriber.
|
|
817
|
-
* @property {string} [name] - The name of the subscriber.
|
|
818
|
-
* @property {string} [email] - Email address of the subscriber.
|
|
819
|
-
* @property {BusinessCountryInfo} [business_country_info]
|
|
820
|
-
* @property {string} [created_at] - The date and time when the subscriber was created.
|
|
821
|
-
* @property {string} [modified_at] - The date and time when the subscriber
|
|
822
|
-
* details were last modified.
|
|
823
|
-
* @property {number} [credit_balance] - The current credit balance for the
|
|
824
|
-
* subscriber, if any.
|
|
825
|
-
* @property {SubscriberData} [data]
|
|
826
|
-
*/
|
|
827
|
-
/**
|
|
828
|
-
* @typedef AuthorModifiedDetails
|
|
829
|
-
* @property {string} [first_name] - The first name of the author who made modifications.
|
|
830
|
-
* @property {string} [last_name] - The last name of the author who made modifications.
|
|
831
|
-
* @property {boolean} [is_admin] - Indicates whether the author has
|
|
832
|
-
* administrative privileges.
|
|
833
|
-
*/
|
|
834
|
-
/**
|
|
835
|
-
* @typedef Author
|
|
836
|
-
* @property {AuthorModifiedDetails} [modified_by_details]
|
|
837
|
-
* @property {string} [created_by] - Identifier of the user who created the record.
|
|
838
|
-
* @property {string} [modified_by] - Identifier of the user who last modified the record.
|
|
839
|
-
*/
|
|
840
|
-
/**
|
|
841
|
-
* @typedef EndingBalance
|
|
842
|
-
* @property {number} [amount] - The ending balance amount.
|
|
843
|
-
* @property {string} [old_entry_ref] - Reference to the previous entry if applicable.
|
|
844
|
-
*/
|
|
845
|
-
/**
|
|
846
|
-
* @typedef PaymentData
|
|
847
|
-
* @property {string} [transaction_id] - The unique identifier for the transaction.
|
|
848
|
-
* @property {string} [aggregator] - The payment aggregator used for the transaction.
|
|
849
|
-
* @property {string} [aggregator_order_id] - The order ID generated by the
|
|
850
|
-
* payment aggregator.
|
|
851
|
-
* @property {string} [receipt_date] - The date and time when the receipt was generated.
|
|
852
|
-
* @property {string} [unique_transaction_reference] - A unique reference for
|
|
853
|
-
* the transaction.
|
|
854
|
-
*/
|
|
855
|
-
/**
|
|
856
|
-
* @typedef CreditTransaction
|
|
857
|
-
* @property {Object} [entity] - The entity associated with the transaction.
|
|
858
|
-
* @property {Author} [author]
|
|
859
|
-
* @property {string} [_id] - The unique identifier for the credit transaction.
|
|
860
|
-
* @property {number} [amount] - The amount credited in the transaction.
|
|
861
|
-
* @property {string} [currency] - The currency of the transaction amount.
|
|
862
|
-
* @property {string} [subscriber_id] - The unique identifier of the subscriber
|
|
863
|
-
* involved in the transaction.
|
|
864
|
-
* @property {string} [description] - A brief description of the transaction.
|
|
865
|
-
* @property {string} [is_test] - Indicates if the transaction is a test transaction.
|
|
866
|
-
* @property {EndingBalance} [ending_balance]
|
|
867
|
-
* @property {PaymentData} [payment]
|
|
868
|
-
* @property {string} [type] - The type of credit transaction.
|
|
869
|
-
* @property {string} [created_at] - The date and time when the transaction was created.
|
|
870
|
-
* @property {string} [modified_at] - The date and time when the transaction was
|
|
871
|
-
* last modified.
|
|
872
|
-
*/
|
|
873
|
-
/**
|
|
874
|
-
* @typedef VerifyPaymentData
|
|
875
|
-
* @property {boolean} [success] - Indicates if the payment verification was successful.
|
|
876
|
-
* @property {Subscriber} [subscriber]
|
|
877
|
-
* @property {CreditTransaction} [credit_transaction]
|
|
878
|
-
*/
|
|
879
|
-
/**
|
|
880
|
-
* @typedef VerifyPaymentRes
|
|
881
|
-
* @property {string} [status] - The status of the payment verification.
|
|
882
|
-
* @property {VerifyPaymentData} [data]
|
|
883
|
-
*/
|
|
884
|
-
/**
|
|
885
|
-
* @typedef DefaultMerchants
|
|
886
|
-
* @property {string} [stripe] - The default Stripe merchant identifier.
|
|
887
|
-
*/
|
|
888
|
-
/**
|
|
889
|
-
* @typedef GlobalSettingsPayment
|
|
890
|
-
* @property {DefaultMerchants} [default_merchants]
|
|
891
|
-
*/
|
|
892
|
-
/**
|
|
893
|
-
* @typedef GlobalSettingsData
|
|
894
|
-
* @property {GlobalSettingsPayment} [payment]
|
|
895
|
-
* @property {boolean} [freeze_panel] - Indicates if the panel is frozen.
|
|
896
|
-
* @property {string} [_id] - Unique identifier for the global settings.
|
|
897
|
-
* @property {string} [created_at] - The date and time when the global settings
|
|
898
|
-
* were created.
|
|
899
|
-
* @property {string} [modified_at] - The date and time when the global settings
|
|
900
|
-
* were last modified.
|
|
901
|
-
*/
|
|
902
|
-
/**
|
|
903
|
-
* @typedef GlobalSettings
|
|
904
|
-
* @property {string} [status] - The status of the global settings retrieval.
|
|
905
|
-
* @property {GlobalSettingsData} [data]
|
|
906
|
-
*/
|
|
907
|
-
/**
|
|
908
|
-
* @typedef MethodChecks
|
|
909
|
-
* @property {string} [address_line1_check] - Result of the address line 1 check.
|
|
910
|
-
* @property {string} [address_postal_code_check] - Result of the address postal
|
|
911
|
-
* code check.
|
|
912
|
-
* @property {string} [cvc_check] - Result of the CVC check.
|
|
913
|
-
*/
|
|
914
|
-
/**
|
|
915
|
-
* @typedef MethodNetworks
|
|
916
|
-
* @property {string[]} [available] - List of available networks for the payment method.
|
|
917
|
-
* @property {string} [preferred] - Preferred network for the payment method.
|
|
918
|
-
*/
|
|
919
|
-
/**
|
|
920
|
-
* @typedef MethodSecureUsage
|
|
921
|
-
* @property {boolean} [supported] - Indicates if 3D Secure is supported for the
|
|
922
|
-
* payment method.
|
|
923
|
-
*/
|
|
924
|
-
/**
|
|
925
|
-
* @typedef MethodDetails
|
|
926
|
-
* @property {string} [id] - Unique identifier for the payment method.
|
|
927
|
-
* @property {string} [type] - Type of payment method.
|
|
928
|
-
* @property {boolean} [mandate_available] - Indicates if a mandate is available
|
|
929
|
-
* for the payment method.
|
|
930
|
-
* @property {number} [mandate_amount] - Mandate amount for the payment method.
|
|
931
|
-
* @property {string} [pg_payment_method_id] - Payment gateway's payment method
|
|
932
|
-
* identifier.
|
|
933
|
-
* @property {boolean} [is_default] - Indicates if the payment method is the default.
|
|
934
|
-
* @property {SubscriptionMethodData} [data]
|
|
935
|
-
*/
|
|
936
|
-
/**
|
|
937
|
-
* @typedef SubscriptionMethodData
|
|
938
|
-
* @property {string} [brand] - Brand of the payment method.
|
|
939
|
-
* @property {MethodChecks} [checks]
|
|
940
|
-
* @property {string} [country] - Country of the payment method.
|
|
941
|
-
* @property {number} [exp_month] - Expiration month of the payment method.
|
|
942
|
-
* @property {number} [exp_year] - Expiration year of the payment method.
|
|
943
|
-
* @property {string} [fingerprint] - Fingerprint of the payment method.
|
|
944
|
-
* @property {string} [funding] - Funding type of the payment method.
|
|
945
|
-
* @property {string} [generated_from] - Source from which the payment method
|
|
946
|
-
* was generated.
|
|
947
|
-
* @property {string} [last4] - Last 4 digits of the payment method.
|
|
948
|
-
* @property {MethodNetworks} [networks]
|
|
949
|
-
* @property {MethodSecureUsage} [three_d_secure_usage]
|
|
950
|
-
* @property {string} [wallet] - Wallet associated with the payment method.
|
|
951
|
-
* @property {string} [name] - Name associated with the payment method.
|
|
952
|
-
* @property {boolean} [is_default] - Indicates if the payment method is the default.
|
|
953
|
-
*/
|
|
954
|
-
/**
|
|
955
|
-
* @typedef SubscriptionMethods
|
|
956
|
-
* @property {boolean} [success] - Indicates if the retrieval of subscription
|
|
957
|
-
* methods was successful.
|
|
958
|
-
* @property {MethodDetails[]} [data] - List of subscription methods.
|
|
959
|
-
*/
|
|
960
|
-
/**
|
|
961
|
-
* @typedef ConfigPublicKey
|
|
962
|
-
* @property {string} [public_key] - Public key for the payment aggregator.
|
|
963
|
-
*/
|
|
964
|
-
/**
|
|
965
|
-
* @typedef ConfigRes
|
|
966
|
-
* @property {boolean} [success] - Indicates if the retrieval of configuration
|
|
967
|
-
* was successful.
|
|
968
|
-
* @property {string} [aggregator] - The payment aggregator.
|
|
969
|
-
* @property {ConfigPublicKey} [config]
|
|
970
|
-
*/
|
|
971
|
-
/**
|
|
972
|
-
* @typedef PlanChangeData
|
|
973
|
-
* @property {number} [total] - The total amount after the plan change.
|
|
974
|
-
* @property {number} [credit_note_amount] - The amount credited due to the plan change.
|
|
975
|
-
* @property {number} [settlement] - The settlement amount for the plan change.
|
|
976
|
-
* @property {number} [taxable_amount] - The taxable amount for the plan change.
|
|
977
|
-
* @property {number} [gst_amount] - The GST amount for the plan change.
|
|
978
|
-
* @property {number} [gross_total] - The gross total amount for the plan change.
|
|
979
|
-
* @property {number} [gst] - The GST for the plan change.
|
|
980
|
-
* @property {number} [discount] - The discount amount applied to the plan change.
|
|
981
|
-
*/
|
|
982
|
-
/**
|
|
983
|
-
* @typedef PlanChangeDetails
|
|
984
|
-
* @property {string} [status] - Status of the plan change.
|
|
985
|
-
* @property {PlanChangeData} [data]
|
|
986
|
-
*/
|
|
987
|
-
/**
|
|
988
|
-
* @typedef TransactionMeta
|
|
989
|
-
* @property {string} [invoice_id] - Invoice ID associated with the transaction.
|
|
990
|
-
*/
|
|
991
|
-
/**
|
|
992
|
-
* @typedef PaymentTransactionDetails
|
|
993
|
-
* @property {Object} [aggregator] - Payment aggregator details.
|
|
994
|
-
* @property {string} [currency] - Currency used in the transaction.
|
|
995
|
-
* @property {string} [current_status] - Current status of the transaction.
|
|
996
|
-
* @property {string} [_id] - Unique identifier for the payment transaction.
|
|
997
|
-
* @property {string} [subscriber_id] - Unique identifier for the subscriber.
|
|
998
|
-
* @property {number} [amount] - Amount involved in the transaction.
|
|
999
|
-
* @property {string} [entity_type] - Type of entity involved in the transaction.
|
|
1000
|
-
* @property {string} [collection_type] - Type of collection for the transaction.
|
|
1001
|
-
* @property {TransactionMeta} [meta]
|
|
1002
|
-
* @property {string} [created_at] - Timestamp when the transaction was created.
|
|
1003
|
-
* @property {string} [modified_at] - Timestamp when the transaction was last modified.
|
|
1004
|
-
*/
|
|
1005
|
-
/**
|
|
1006
|
-
* @typedef PaymentItems
|
|
1007
|
-
* @property {string} [name] - Name of the payment option.
|
|
1008
|
-
* @property {string} [code] - Code for the payment option
|
|
1009
|
-
* @property {string} [aggregator] - Aggregator used for the payment option.
|
|
1010
|
-
*/
|
|
1011
|
-
/**
|
|
1012
|
-
* @typedef GetPaymentOptions
|
|
1013
|
-
* @property {PaymentItems[]} [payment_options] - List of available payment options.
|
|
1014
|
-
*/
|
|
1015
|
-
/**
|
|
1016
|
-
* @typedef TopupReq
|
|
1017
|
-
* @property {number} [amount] - Amount to be topped up.
|
|
1018
|
-
* @property {string} [currency] - Currency in which the top-up is made.
|
|
1019
|
-
* @property {string} [provider_type] - Provider type for the top-up.
|
|
1020
|
-
*/
|
|
1021
|
-
/**
|
|
1022
|
-
* @typedef SetupMandateReq
|
|
1023
|
-
* @property {string} [intent_id] - ID of the setup intent.
|
|
1024
|
-
* @property {string} [payment_method_id] - ID of the payment method.
|
|
1025
|
-
*/
|
|
1026
|
-
/**
|
|
1027
|
-
* @typedef SetupPaymentReq
|
|
1028
|
-
* @property {string} [payment_method] - Payment method to be used.
|
|
1029
|
-
* @property {string} [payment_id] - ID of the payment.
|
|
1030
|
-
* @property {string} [plan_id] - ID of the plan.
|
|
1031
|
-
* @property {string} [invoice_id] - ID of the invoice.
|
|
1032
|
-
*/
|
|
1033
|
-
/**
|
|
1034
|
-
* @typedef SubscriptionRenewReq
|
|
1035
|
-
* @property {string} [invoice_id] - ID of the invoice for renewal.
|
|
1036
|
-
* @property {string} [entity_type] - Type of entity for the renewal.
|
|
1037
|
-
* @property {string} [collection_type] - Collection type for the renewal.
|
|
1038
|
-
* @property {string} [callback_url] - URL to which the payment result will be sent
|
|
1039
|
-
* @property {RenewMeta} [meta]
|
|
1040
|
-
*/
|
|
1041
|
-
/**
|
|
1042
|
-
* @typedef RenewMeta
|
|
1043
|
-
* @property {boolean} [invoice_payment] - Indicates whether the invoice payment
|
|
1044
|
-
* is involved in the renewal.
|
|
1045
|
-
* @property {boolean} [renew] - Indicates whether the subscription is being renewed.
|
|
1046
|
-
*/
|
|
1047
|
-
/**
|
|
1048
|
-
* @typedef SubscriptionMethodsReq
|
|
1049
|
-
* @property {string} [unique_external_id] - The unique external identifier for
|
|
1050
|
-
* the subscription method.
|
|
1051
|
-
* @property {string} [setup_intent_id] - The setup intent ID for the subscription method.
|
|
1052
|
-
* @property {string} [pg_payment_method_id] - The payment gateway payment method ID.
|
|
1053
|
-
* @property {boolean} [set_default] - Indicates whether this payment method
|
|
1054
|
-
* should be set as the default.
|
|
1055
|
-
*/
|
|
1056
|
-
/**
|
|
1057
|
-
* @typedef CreditTransactionResponse
|
|
1058
|
-
* @property {number} [total] - Total number of transactions.
|
|
1059
|
-
* @property {number} [limit] - Maximum number of transactions per page.
|
|
1060
|
-
* @property {number} [page] - Current page number.
|
|
1061
|
-
* @property {number} [pages] - Total number of pages.
|
|
1062
|
-
* @property {CreditTransaction[]} [items] - List of credit transactions.
|
|
1063
|
-
*/
|
|
1064
|
-
/**
|
|
1065
|
-
* @typedef DowngradePlanReq
|
|
1066
|
-
* @property {string} [unique_id] - Unique identifier for the request.
|
|
1067
|
-
* @property {string} [type] - Type of entity requesting the downgrade.
|
|
1068
|
-
* @property {string} [product_suite] - Product suite for the plan.
|
|
1069
|
-
* @property {string} [plan_id] - Plan ID for the downgrade request.
|
|
1070
|
-
* @property {string} [reason] - Reason for downgrading the plan.
|
|
1071
|
-
* @property {string} [platform] - Platform from which the request is made.
|
|
1072
|
-
*/
|
|
1073
|
-
/**
|
|
1074
|
-
* @typedef Taxation
|
|
1075
|
-
* @property {number} [gst] - GST percentage.
|
|
1076
|
-
*/
|
|
1077
|
-
/**
|
|
1078
|
-
* @typedef OneTimeFees
|
|
1079
|
-
* @property {number} [developement] - One-time development fee.
|
|
1080
|
-
* @property {number} [marketing] - One-time marketing fee.
|
|
1081
|
-
*/
|
|
1082
|
-
/**
|
|
1083
|
-
* @typedef CreditLine
|
|
1084
|
-
* @property {boolean} [is_active] - Indicates whether the credit line is active.
|
|
1085
|
-
*/
|
|
1086
|
-
/**
|
|
1087
|
-
* @typedef StatusMessage
|
|
1088
|
-
* @property {string} [status] - Status of the request.
|
|
1089
|
-
* @property {string} [message] - Detailed message regarding the status.
|
|
1090
|
-
* @property {boolean} [success] - Indicates whether the operation was successful.
|
|
1091
|
-
* @property {string} [code] - Status code of the operation.
|
|
1092
|
-
*/
|
|
1093
|
-
/**
|
|
1094
|
-
* @typedef PaymentCollectReq
|
|
1095
|
-
* @property {string} [transaction_id] - ID of the transaction to collect payment for.
|
|
1096
|
-
* @property {boolean} [credit_balance] - Indicates whether to use credit
|
|
1097
|
-
* balance for the payment.
|
|
1098
|
-
* @property {string} [payment_mode] - Mode of payment.
|
|
1099
|
-
* @property {string} [payment_method] - Payment method to be used.
|
|
1100
|
-
* @property {string} [invoice_id] - ID of the invoice for which the payment is collected.
|
|
1101
|
-
*/
|
|
1102
|
-
/**
|
|
1103
|
-
* @typedef SubscriptionRenewResMeta
|
|
1104
|
-
* @property {boolean} [invoice_payment] - Indicates whether the invoice payment
|
|
1105
|
-
* is involved in the renewal.
|
|
1106
|
-
* @property {boolean} [renew] - Indicates whether the subscription is being renewed.
|
|
1107
|
-
*/
|
|
1108
|
-
/**
|
|
1109
|
-
* @typedef SubscriptionRenewRes
|
|
1110
|
-
* @property {string} [redirect_url] - URL to redirect the user for completing
|
|
1111
|
-
* the renewal.
|
|
1112
|
-
* @property {string} [transaction_id] - ID of the renewal transaction.
|
|
1113
|
-
* @property {string} [current_status] - Current status of the renewal process.
|
|
1114
|
-
* @property {SubscriptionRenewResMeta} [meta]
|
|
1115
|
-
*/
|
|
1116
|
-
/**
|
|
1117
|
-
* @typedef SetupIntentRes
|
|
1118
|
-
* @property {boolean} [success] - Indicates if the setup intent was successful.
|
|
1119
|
-
* @property {SetupIntentData} [data]
|
|
1120
|
-
*/
|
|
1121
|
-
/**
|
|
1122
|
-
* @typedef SetupIntentData
|
|
1123
|
-
* @property {string} [id] - The ID of the setup intent.
|
|
1124
|
-
* @property {string} [client_secret] - The client secret of the setup intent.
|
|
1125
|
-
* @property {string} [customer] - The customer associated with the setup intent.
|
|
1126
|
-
* @property {string} [status] - The status of the setup intent.
|
|
1127
|
-
*/
|
|
1128
|
-
/**
|
|
1129
|
-
* @typedef SetupPayment
|
|
1130
|
-
* @property {string} [id] - The ID of the setup payment.
|
|
1131
|
-
* @property {string} [status] - The status of the setup payment.
|
|
1132
|
-
* @property {string} [customer] - The customer associated with the setup payment.
|
|
1133
|
-
* @property {string} [client_secret] - The client secret of the setup payment.
|
|
1134
|
-
* @property {string} [payment_method] - The payment method used for the setup payment.
|
|
1135
|
-
* @property {string} [mandate] - The mandate ID associated with the setup payment.
|
|
1136
|
-
* @property {PaymentMethodOptions} [payment_method_options]
|
|
1137
|
-
*/
|
|
1138
|
-
/**
|
|
1139
|
-
* @typedef PaymentMethodOptions
|
|
1140
|
-
* @property {Card} [card]
|
|
1141
|
-
*/
|
|
1142
|
-
/**
|
|
1143
|
-
* @typedef Card
|
|
1144
|
-
* @property {MandateOptions} [mandate_options]
|
|
1145
|
-
*/
|
|
1146
|
-
/**
|
|
1147
|
-
* @typedef MandateOptions
|
|
1148
|
-
* @property {number} [amount] - The mandate amount.
|
|
1149
|
-
*/
|
|
1150
|
-
/**
|
|
1151
|
-
* @typedef Message
|
|
1152
|
-
* @property {string} [message] - A message providing details about the operation status.
|
|
1153
|
-
*/
|
|
1154
|
-
/**
|
|
1155
|
-
* @typedef TopupRes
|
|
1156
|
-
* @property {string} [status] - The status of the top-up request.
|
|
1157
|
-
* @property {string} [aggregator_order_id] - The order ID from the aggregator.
|
|
1158
|
-
* @property {number} [amount] - The amount of the top-up.
|
|
1159
|
-
* @property {string} [currency] - The currency of the top-up.
|
|
1160
|
-
* @property {string} [transaction_id] - The transaction ID for the top-up.
|
|
1161
|
-
*/
|
|
1162
|
-
/**
|
|
1163
|
-
* @typedef CancelTopupReq
|
|
1164
|
-
* @property {string} [order_id] - The order ID of the top-up to cancel.
|
|
1165
|
-
*/
|
|
1166
|
-
/**
|
|
1167
|
-
* @typedef CancelTopupRes
|
|
1168
|
-
* @property {string} [_id] - The ID of the canceled top-up.
|
|
1169
|
-
* @property {string} [subscriber_id] - The subscriber ID associated with the top-up.
|
|
1170
|
-
* @property {number} [amount] - The amount of the canceled top-up.
|
|
1171
|
-
* @property {string} [currency] - The currency of the canceled top-up.
|
|
1172
|
-
* @property {string} [aggregator] - The aggregator used for the top-up.
|
|
1173
|
-
* @property {string} [aggregator_order_id] - The order ID from the aggregator.
|
|
1174
|
-
* @property {string} [created_at] - The date and time when the top-up was created.
|
|
1175
|
-
* @property {string} [modified_at] - The date and time when the top-up was modified.
|
|
1176
|
-
* @property {number} [__v] - The version key, used for internal purposes.
|
|
1177
|
-
* @property {string} [aggregator_status] - The status of the top-up with the aggregator.
|
|
1178
|
-
* @property {string} [current_status] - The current status of the top-up.
|
|
1179
|
-
*/
|
|
1180
|
-
/**
|
|
1181
|
-
* @typedef DefaultReq
|
|
1182
|
-
* @property {string} [payment_method_id] - The ID of the payment method to set
|
|
1183
|
-
* as default.
|
|
215
|
+
* @property {string} [created_at] - Date and time when the charge was created.
|
|
216
|
+
* @property {boolean} [is_test] - Indicates whether the charge is for testing purposes.
|
|
217
|
+
* @property {string} [company_id] - Company id.
|
|
218
|
+
* @property {Object} [meta] - Additional metadata associated with the charge.
|
|
219
|
+
* @property {number} [__v] - Internal version key for the charge record.
|
|
1184
220
|
*/
|
|
1185
221
|
declare class BillingPlatformModel {
|
|
1186
222
|
}
|
|
1187
223
|
declare namespace BillingPlatformModel {
|
|
1188
|
-
export {
|
|
224
|
+
export { SubscriptionChargeRes, ChargeDetails, ResourceNotFound, CreateOneTimeCharge, CreateOneTimeChargeResponse, BadRequest, CreateSubscriptionCharge, CreateSubscriptionResponse, EntityChargePrice, ChargeRecurring, SubscriptionTrialPeriod, Charge, OneTimeChargeItem, ChargeLineItem, EntitySubscription, OneTimeChargeEntity, EntityChargeRecurring, EntityChargeDetails };
|
|
1189
225
|
}
|
|
1190
|
-
/** @returns {CompanyInfo} */
|
|
1191
|
-
declare function CompanyInfo(): CompanyInfo;
|
|
1192
|
-
type CompanyInfo = {
|
|
1193
|
-
/**
|
|
1194
|
-
* - Name of the company
|
|
1195
|
-
*/
|
|
1196
|
-
company_name?: string;
|
|
1197
|
-
/**
|
|
1198
|
-
* - Goods and Services Tax Identification Number
|
|
1199
|
-
*/
|
|
1200
|
-
gstin?: string;
|
|
1201
|
-
/**
|
|
1202
|
-
* - Main address of the company
|
|
1203
|
-
*/
|
|
1204
|
-
address?: string;
|
|
1205
|
-
address_details?: AddressDetails;
|
|
1206
|
-
/**
|
|
1207
|
-
* - Permanent Account Number of the company
|
|
1208
|
-
*/
|
|
1209
|
-
pan?: string;
|
|
1210
|
-
/**
|
|
1211
|
-
* - Contact phone number for the company
|
|
1212
|
-
*/
|
|
1213
|
-
phone?: string;
|
|
1214
|
-
/**
|
|
1215
|
-
* - Contact email address for the company
|
|
1216
|
-
*/
|
|
1217
|
-
email?: string;
|
|
1218
|
-
/**
|
|
1219
|
-
* - Corporate Identification Number
|
|
1220
|
-
*/
|
|
1221
|
-
cin?: string;
|
|
1222
|
-
};
|
|
1223
|
-
/** @returns {AddressDetails} */
|
|
1224
|
-
declare function AddressDetails(): AddressDetails;
|
|
1225
|
-
type AddressDetails = {
|
|
1226
|
-
/**
|
|
1227
|
-
* - First line of the address
|
|
1228
|
-
*/
|
|
1229
|
-
address_line_1?: string;
|
|
1230
|
-
/**
|
|
1231
|
-
* - Second line of the address (optional)
|
|
1232
|
-
*/
|
|
1233
|
-
address_line_2?: string;
|
|
1234
|
-
/**
|
|
1235
|
-
* - Company city
|
|
1236
|
-
*/
|
|
1237
|
-
city?: string;
|
|
1238
|
-
/**
|
|
1239
|
-
* - Company pincode
|
|
1240
|
-
*/
|
|
1241
|
-
pincode?: string;
|
|
1242
|
-
/**
|
|
1243
|
-
* - Company state
|
|
1244
|
-
*/
|
|
1245
|
-
state?: string;
|
|
1246
|
-
/**
|
|
1247
|
-
* - Company country
|
|
1248
|
-
*/
|
|
1249
|
-
country?: string;
|
|
1250
|
-
};
|
|
1251
|
-
/** @returns {InvoiceData} */
|
|
1252
|
-
declare function InvoiceData(): InvoiceData;
|
|
1253
|
-
type InvoiceData = {
|
|
1254
|
-
invoice?: InvoiceDetailsData;
|
|
1255
|
-
invoice_items?: InvoiceItems[];
|
|
1256
|
-
shopsense_details?: CompanyInfo;
|
|
1257
|
-
};
|
|
1258
|
-
/** @returns {InvoiceDetailsData} */
|
|
1259
|
-
declare function InvoiceDetailsData(): InvoiceDetailsData;
|
|
1260
|
-
type InvoiceDetailsData = {
|
|
1261
|
-
/**
|
|
1262
|
-
* - Number of attempts made to collect the invoice payment
|
|
1263
|
-
*/
|
|
1264
|
-
attemp?: number;
|
|
1265
|
-
/**
|
|
1266
|
-
* - Documents associated with the invoice
|
|
1267
|
-
*/
|
|
1268
|
-
documents?: any;
|
|
1269
|
-
/**
|
|
1270
|
-
* - Payment details related to the invoice
|
|
1271
|
-
*/
|
|
1272
|
-
payment?: any;
|
|
1273
|
-
period?: Period;
|
|
1274
|
-
client?: Client;
|
|
1275
|
-
/**
|
|
1276
|
-
* - Discount applied to the invoice
|
|
1277
|
-
*/
|
|
1278
|
-
discount?: any;
|
|
1279
|
-
/**
|
|
1280
|
-
* - Taxation applied to the invoice
|
|
1281
|
-
*/
|
|
1282
|
-
taxation?: any;
|
|
1283
|
-
/**
|
|
1284
|
-
* - Unique identifier for the invoice
|
|
1285
|
-
*/
|
|
1286
|
-
_id?: string;
|
|
1287
|
-
/**
|
|
1288
|
-
* - Indicates if the invoice will
|
|
1289
|
-
* automatically advance to the next stage of collection
|
|
1290
|
-
*/
|
|
1291
|
-
auto_advance?: boolean;
|
|
1292
|
-
/**
|
|
1293
|
-
* - Method of collection (e.g.,
|
|
1294
|
-
* charge_automatically, send_invoice)
|
|
1295
|
-
*/
|
|
1296
|
-
collection_method?: string;
|
|
1297
|
-
/**
|
|
1298
|
-
* - Identifier for the subscriber associated
|
|
1299
|
-
* with the invoice
|
|
1300
|
-
*/
|
|
1301
|
-
subscriber_id?: string;
|
|
1302
|
-
/**
|
|
1303
|
-
* - Currency in which the invoice is issued
|
|
1304
|
-
*/
|
|
1305
|
-
currency?: string;
|
|
1306
|
-
/**
|
|
1307
|
-
* - URL to view the invoice pdf
|
|
1308
|
-
*/
|
|
1309
|
-
invoice_url?: string;
|
|
1310
|
-
/**
|
|
1311
|
-
* - Invoice number
|
|
1312
|
-
*/
|
|
1313
|
-
number?: string;
|
|
1314
|
-
/**
|
|
1315
|
-
* - Indicates if the invoice has been paid
|
|
1316
|
-
*/
|
|
1317
|
-
paid?: boolean;
|
|
1318
|
-
/**
|
|
1319
|
-
* - Payment gateway data related to the invoice
|
|
1320
|
-
*/
|
|
1321
|
-
pg_data?: any;
|
|
1322
|
-
/**
|
|
1323
|
-
* - Receipt number for the invoice payment
|
|
1324
|
-
*/
|
|
1325
|
-
receipt_number?: string;
|
|
1326
|
-
/**
|
|
1327
|
-
* - Statement descriptor for the invoice
|
|
1328
|
-
*/
|
|
1329
|
-
statement_descriptor?: string;
|
|
1330
|
-
/**
|
|
1331
|
-
* - Current status of the invoice (e.g., paid, open)
|
|
1332
|
-
*/
|
|
1333
|
-
current_status?: string;
|
|
1334
|
-
/**
|
|
1335
|
-
* - Trail of status changes for the invoice
|
|
1336
|
-
*/
|
|
1337
|
-
status_trail?: StatusTrail[];
|
|
1338
|
-
/**
|
|
1339
|
-
* - Subtotal amount of the invoice
|
|
1340
|
-
*/
|
|
1341
|
-
subtotal?: number;
|
|
1342
|
-
/**
|
|
1343
|
-
* - Total amount of the invoice
|
|
1344
|
-
*/
|
|
1345
|
-
total?: number;
|
|
1346
|
-
/**
|
|
1347
|
-
* - Previous settlement amount (if any)
|
|
1348
|
-
*/
|
|
1349
|
-
old_settlement?: number;
|
|
1350
|
-
/**
|
|
1351
|
-
* - Credit balance applied to the invoice
|
|
1352
|
-
*/
|
|
1353
|
-
credit_balance?: number;
|
|
1354
|
-
/**
|
|
1355
|
-
* - Subscription associated with the invoice
|
|
1356
|
-
*/
|
|
1357
|
-
subscription?: string;
|
|
1358
|
-
/**
|
|
1359
|
-
* - Number of attempts made to pay the invoice
|
|
1360
|
-
*/
|
|
1361
|
-
attempt?: number;
|
|
1362
|
-
/**
|
|
1363
|
-
* - Timestamp for the next action on the invoice
|
|
1364
|
-
*/
|
|
1365
|
-
next_action_time?: string;
|
|
1366
|
-
/**
|
|
1367
|
-
* - Amount of credit notes applied to the invoice
|
|
1368
|
-
*/
|
|
1369
|
-
credit_note_amount?: number;
|
|
1370
|
-
/**
|
|
1371
|
-
* - Timestamp when the invoice was created
|
|
1372
|
-
*/
|
|
1373
|
-
created_at?: string;
|
|
1374
|
-
/**
|
|
1375
|
-
* - Timestamp when the invoice was last modified
|
|
1376
|
-
*/
|
|
1377
|
-
modified_at?: string;
|
|
1378
|
-
/**
|
|
1379
|
-
* - Type of invoice (e.g., subscription, extension)
|
|
1380
|
-
*/
|
|
1381
|
-
invoice_type?: string;
|
|
1382
|
-
};
|
|
1383
|
-
/** @returns {Client} */
|
|
1384
|
-
declare function Client(): Client;
|
|
1385
|
-
type Client = {
|
|
1386
|
-
/**
|
|
1387
|
-
* - Name of the client
|
|
1388
|
-
*/
|
|
1389
|
-
name?: string;
|
|
1390
|
-
/**
|
|
1391
|
-
* - Email address of the client
|
|
1392
|
-
*/
|
|
1393
|
-
email?: string;
|
|
1394
|
-
/**
|
|
1395
|
-
* - Phone number of the client
|
|
1396
|
-
*/
|
|
1397
|
-
phone?: string;
|
|
1398
|
-
/**
|
|
1399
|
-
* - List of address lines for the client's address
|
|
1400
|
-
*/
|
|
1401
|
-
address_lines?: string[];
|
|
1402
|
-
};
|
|
1403
|
-
/** @returns {Period} */
|
|
1404
|
-
declare function Period(): Period;
|
|
1405
|
-
type Period = {
|
|
1406
|
-
/**
|
|
1407
|
-
* - Start date of the period
|
|
1408
|
-
*/
|
|
1409
|
-
start?: string;
|
|
1410
|
-
/**
|
|
1411
|
-
* - End date of the period
|
|
1412
|
-
*/
|
|
1413
|
-
end?: string;
|
|
1414
|
-
};
|
|
1415
|
-
/** @returns {StatusTrail} */
|
|
1416
|
-
declare function StatusTrail(): StatusTrail;
|
|
1417
|
-
type StatusTrail = {
|
|
1418
|
-
/**
|
|
1419
|
-
* - The status value of the invoice at a particular
|
|
1420
|
-
* timestamp (e.g., open, paid, payment_due)
|
|
1421
|
-
*/
|
|
1422
|
-
value?: string;
|
|
1423
|
-
/**
|
|
1424
|
-
* - The date and time when the status was
|
|
1425
|
-
* recorded, in ISO 8601 format
|
|
1426
|
-
*/
|
|
1427
|
-
timestamp?: string;
|
|
1428
|
-
/**
|
|
1429
|
-
* - Unique identifier for the status trail entry
|
|
1430
|
-
*/
|
|
1431
|
-
_id?: string;
|
|
1432
|
-
};
|
|
1433
|
-
/** @returns {PaymentCollectRes} */
|
|
1434
|
-
declare function PaymentCollectRes(): PaymentCollectRes;
|
|
1435
|
-
type PaymentCollectRes = {
|
|
1436
|
-
/**
|
|
1437
|
-
* - Unique identifier for the transaction
|
|
1438
|
-
*/
|
|
1439
|
-
transaction_id?: string;
|
|
1440
|
-
/**
|
|
1441
|
-
* - Current status of the payment
|
|
1442
|
-
* collection (e.g., pending, completed, failed)
|
|
1443
|
-
*/
|
|
1444
|
-
current_status?: string;
|
|
1445
|
-
};
|
|
1446
226
|
/** @returns {SubscriptionChargeRes} */
|
|
1447
227
|
declare function SubscriptionChargeRes(): SubscriptionChargeRes;
|
|
1448
228
|
type SubscriptionChargeRes = {
|
|
@@ -1504,2677 +284,503 @@ type SubscriptionChargeRes = {
|
|
|
1504
284
|
*/
|
|
1505
285
|
line_items?: any[];
|
|
1506
286
|
};
|
|
1507
|
-
/** @returns {
|
|
1508
|
-
declare function
|
|
1509
|
-
type
|
|
1510
|
-
success?: boolean;
|
|
1511
|
-
data?: DowngradeRes;
|
|
1512
|
-
};
|
|
1513
|
-
/** @returns {DowngradeRes} */
|
|
1514
|
-
declare function DowngradeRes(): DowngradeRes;
|
|
1515
|
-
type DowngradeRes = {
|
|
287
|
+
/** @returns {ChargeDetails} */
|
|
288
|
+
declare function ChargeDetails(): ChargeDetails;
|
|
289
|
+
type ChargeDetails = {
|
|
1516
290
|
/**
|
|
1517
|
-
* - Unique identifier for the
|
|
291
|
+
* - Unique identifier for the charge.
|
|
1518
292
|
*/
|
|
1519
293
|
_id?: string;
|
|
1520
294
|
/**
|
|
1521
|
-
* -
|
|
1522
|
-
*
|
|
295
|
+
* - The type of entity associated with the
|
|
296
|
+
* charge (e.g., 'extension', 'subscription').
|
|
1523
297
|
*/
|
|
1524
|
-
|
|
298
|
+
entity_type?: string;
|
|
1525
299
|
/**
|
|
1526
|
-
* - Unique identifier for the
|
|
1527
|
-
*
|
|
300
|
+
* - Unique identifier for the entity associated
|
|
301
|
+
* with the charge.
|
|
1528
302
|
*/
|
|
1529
|
-
|
|
303
|
+
entity_id?: string;
|
|
1530
304
|
/**
|
|
1531
|
-
* -
|
|
305
|
+
* - The name of the charge.
|
|
1532
306
|
*/
|
|
1533
|
-
|
|
307
|
+
name?: string;
|
|
1534
308
|
/**
|
|
1535
|
-
* -
|
|
309
|
+
* - Description of the charge term.
|
|
1536
310
|
*/
|
|
1537
|
-
|
|
311
|
+
term?: string;
|
|
1538
312
|
/**
|
|
1539
|
-
* -
|
|
1540
|
-
*
|
|
313
|
+
* - The type of charge (e.g., 'standalone',
|
|
314
|
+
* 'recurring').
|
|
1541
315
|
*/
|
|
1542
|
-
|
|
316
|
+
charge_type?: string;
|
|
1543
317
|
/**
|
|
1544
|
-
* -
|
|
318
|
+
* - The pricing model for the charge (e.g.,
|
|
319
|
+
* 'one_time', 'recurring').
|
|
1545
320
|
*/
|
|
1546
|
-
|
|
321
|
+
pricing_type?: string;
|
|
322
|
+
price?: EntityChargePrice;
|
|
323
|
+
recurring?: ChargeRecurring;
|
|
1547
324
|
/**
|
|
1548
|
-
* -
|
|
1549
|
-
*/
|
|
1550
|
-
reason?: string;
|
|
1551
|
-
/**
|
|
1552
|
-
* - ID of the user who initiated the
|
|
1553
|
-
* downgrade request
|
|
1554
|
-
*/
|
|
1555
|
-
request_user_id?: string;
|
|
1556
|
-
/**
|
|
1557
|
-
* - ID of the subscription associated with
|
|
1558
|
-
* the downgrade request
|
|
1559
|
-
*/
|
|
1560
|
-
subscription_id?: string;
|
|
1561
|
-
};
|
|
1562
|
-
/** @returns {PaymentStatusData} */
|
|
1563
|
-
declare function PaymentStatusData(): PaymentStatusData;
|
|
1564
|
-
type PaymentStatusData = {
|
|
1565
|
-
/**
|
|
1566
|
-
* - Unique identifier for the payment status data
|
|
1567
|
-
*/
|
|
1568
|
-
_id?: string;
|
|
1569
|
-
/**
|
|
1570
|
-
* - Payment journey status, such as 'forward' or 'backward'
|
|
1571
|
-
*/
|
|
1572
|
-
journey?: string;
|
|
1573
|
-
/**
|
|
1574
|
-
* - List of responses received from
|
|
1575
|
-
* webhooks related to the payment
|
|
1576
|
-
*/
|
|
1577
|
-
webhook_response?: any[];
|
|
1578
|
-
/**
|
|
1579
|
-
* - Status of the payment as provided by
|
|
1580
|
-
* the aggregator (e.g., succeeded, failed)
|
|
1581
|
-
*/
|
|
1582
|
-
aggregator_status?: string;
|
|
1583
|
-
/**
|
|
1584
|
-
* - Current status of the payment (e.g.,
|
|
1585
|
-
* paid, pending)
|
|
1586
|
-
*/
|
|
1587
|
-
current_status?: string;
|
|
1588
|
-
/**
|
|
1589
|
-
* - Timestamp when the payment status data was created
|
|
1590
|
-
*/
|
|
1591
|
-
created_at?: string;
|
|
1592
|
-
/**
|
|
1593
|
-
* - Timestamp when the payment status data was
|
|
1594
|
-
* last modified
|
|
1595
|
-
*/
|
|
1596
|
-
modified_at?: string;
|
|
1597
|
-
/**
|
|
1598
|
-
* - Version key for the payment status data (typically
|
|
1599
|
-
* used for versioning in databases)
|
|
1600
|
-
*/
|
|
1601
|
-
__v?: number;
|
|
1602
|
-
/**
|
|
1603
|
-
* - Unique identifier for the order
|
|
1604
|
-
* provided by the payment aggregator
|
|
1605
|
-
*/
|
|
1606
|
-
aggregator_order_id?: string;
|
|
1607
|
-
};
|
|
1608
|
-
/** @returns {PaymentStatusResponse} */
|
|
1609
|
-
declare function PaymentStatusResponse(): PaymentStatusResponse;
|
|
1610
|
-
type PaymentStatusResponse = {
|
|
1611
|
-
/**
|
|
1612
|
-
* - The status of the payment.
|
|
1613
|
-
*/
|
|
1614
|
-
status?: string;
|
|
1615
|
-
data?: PaymentStatusData;
|
|
1616
|
-
};
|
|
1617
|
-
/** @returns {BadRequest} */
|
|
1618
|
-
declare function BadRequest(): BadRequest;
|
|
1619
|
-
type BadRequest = {
|
|
1620
|
-
/**
|
|
1621
|
-
* - Failure message.
|
|
1622
|
-
*/
|
|
1623
|
-
message?: string;
|
|
1624
|
-
};
|
|
1625
|
-
/** @returns {ResourceNotFound} */
|
|
1626
|
-
declare function ResourceNotFound(): ResourceNotFound;
|
|
1627
|
-
type ResourceNotFound = {
|
|
1628
|
-
/**
|
|
1629
|
-
* - Resource not found with {id}
|
|
1630
|
-
*/
|
|
1631
|
-
message?: string;
|
|
1632
|
-
code?: any;
|
|
1633
|
-
success?: any;
|
|
1634
|
-
};
|
|
1635
|
-
/** @returns {InternalServerError} */
|
|
1636
|
-
declare function InternalServerError(): InternalServerError;
|
|
1637
|
-
type InternalServerError = {
|
|
1638
|
-
/**
|
|
1639
|
-
* - Internal server error
|
|
1640
|
-
*/
|
|
1641
|
-
message?: string;
|
|
1642
|
-
/**
|
|
1643
|
-
* - Error code
|
|
1644
|
-
*/
|
|
1645
|
-
code?: string;
|
|
1646
|
-
};
|
|
1647
|
-
/** @returns {CheckValidityResponse} */
|
|
1648
|
-
declare function CheckValidityResponse(): CheckValidityResponse;
|
|
1649
|
-
type CheckValidityResponse = {
|
|
1650
|
-
/**
|
|
1651
|
-
* - Indicates whether the request is valid.
|
|
1652
|
-
*/
|
|
1653
|
-
is_valid?: boolean;
|
|
1654
|
-
/**
|
|
1655
|
-
* - The amount of discount applicable.
|
|
1656
|
-
*/
|
|
1657
|
-
discount_amount?: number;
|
|
1658
|
-
};
|
|
1659
|
-
/** @returns {PlanRecurring} */
|
|
1660
|
-
declare function PlanRecurring(): PlanRecurring;
|
|
1661
|
-
type PlanRecurring = {
|
|
1662
|
-
/**
|
|
1663
|
-
* - The interval at which the plan recurs.
|
|
1664
|
-
*/
|
|
1665
|
-
interval?: string;
|
|
1666
|
-
interval_count?: number;
|
|
1667
|
-
};
|
|
1668
|
-
/** @returns {PlanMeta} */
|
|
1669
|
-
declare function PlanMeta(): PlanMeta;
|
|
1670
|
-
type PlanMeta = {
|
|
1671
|
-
/**
|
|
1672
|
-
* - Status of the seller associated with the plan.
|
|
1673
|
-
*/
|
|
1674
|
-
seller_status?: string;
|
|
1675
|
-
/**
|
|
1676
|
-
* - Name of the company offering the plan.
|
|
1677
|
-
*/
|
|
1678
|
-
company?: string;
|
|
1679
|
-
/**
|
|
1680
|
-
* - Display name for platform slug.
|
|
1681
|
-
*/
|
|
1682
|
-
plan_platform_display_name?: string;
|
|
1683
|
-
/**
|
|
1684
|
-
* - Tags associated with the plan for
|
|
1685
|
-
* categorization or identification.
|
|
1686
|
-
*/
|
|
1687
|
-
tags?: string[];
|
|
1688
|
-
};
|
|
1689
|
-
/** @returns {CountryRes} */
|
|
1690
|
-
declare function CountryRes(): CountryRes;
|
|
1691
|
-
type CountryRes = {
|
|
1692
|
-
/**
|
|
1693
|
-
* - Name of the country.
|
|
1694
|
-
*/
|
|
1695
|
-
name?: string;
|
|
1696
|
-
/**
|
|
1697
|
-
* - Country code.
|
|
1698
|
-
*/
|
|
1699
|
-
code?: string;
|
|
1700
|
-
};
|
|
1701
|
-
/** @returns {Plan} */
|
|
1702
|
-
declare function Plan(): Plan;
|
|
1703
|
-
type Plan = {
|
|
1704
|
-
/**
|
|
1705
|
-
* - List of fee components associated
|
|
1706
|
-
* with the plan. Each component may be represented as a string or an object.
|
|
1707
|
-
*/
|
|
1708
|
-
fee_components?: any[];
|
|
1709
|
-
recurring?: PlanRecurring;
|
|
1710
|
-
/**
|
|
1711
|
-
* - Indicates whether the plan is a trial plan.
|
|
1712
|
-
*/
|
|
1713
|
-
is_trial_plan?: boolean;
|
|
1714
|
-
/**
|
|
1715
|
-
* - Group or category of the plan.
|
|
1716
|
-
*/
|
|
1717
|
-
plan_group?: string;
|
|
1718
|
-
/**
|
|
1719
|
-
* - List of tag lines or descriptions
|
|
1720
|
-
* associated with the plan.
|
|
1721
|
-
*/
|
|
1722
|
-
tag_lines?: string[];
|
|
1723
|
-
/**
|
|
1724
|
-
* - Currency code used for the plan's pricing.
|
|
1725
|
-
*/
|
|
1726
|
-
currency?: string;
|
|
1727
|
-
/**
|
|
1728
|
-
* - Identifier of the user or system that
|
|
1729
|
-
* approved the plan.
|
|
1730
|
-
*/
|
|
1731
|
-
approved_by?: string;
|
|
1732
|
-
/**
|
|
1733
|
-
* - Indicates if the plan is currently active.
|
|
1734
|
-
*/
|
|
1735
|
-
is_active?: boolean;
|
|
1736
|
-
/**
|
|
1737
|
-
* - Indicates if the plan is visible to users.
|
|
1738
|
-
*/
|
|
1739
|
-
is_visible?: boolean;
|
|
1740
|
-
/**
|
|
1741
|
-
* - Number of days for the trial period, if applicable.
|
|
1742
|
-
*/
|
|
1743
|
-
trial_period?: number;
|
|
1744
|
-
/**
|
|
1745
|
-
* - List of add-ons available for the plan.
|
|
1746
|
-
*/
|
|
1747
|
-
addons?: string[];
|
|
1748
|
-
/**
|
|
1749
|
-
* - List of tags associated with the plan.
|
|
1750
|
-
*/
|
|
1751
|
-
tags?: string[];
|
|
1752
|
-
/**
|
|
1753
|
-
* - Type of the plan (e.g., public, private).
|
|
1754
|
-
*/
|
|
1755
|
-
type?: string;
|
|
1756
|
-
country?: CountryRes;
|
|
1757
|
-
/**
|
|
1758
|
-
* - Unique identifier for the plan.
|
|
1759
|
-
*/
|
|
1760
|
-
_id?: string;
|
|
1761
|
-
/**
|
|
1762
|
-
* - Name of the plan.
|
|
1763
|
-
*/
|
|
1764
|
-
name?: string;
|
|
1765
|
-
/**
|
|
1766
|
-
* - Description of the plan.
|
|
1767
|
-
*/
|
|
1768
|
-
description?: string;
|
|
1769
|
-
/**
|
|
1770
|
-
* - Amount to be charged for the plan.
|
|
1771
|
-
*/
|
|
1772
|
-
amount?: number;
|
|
1773
|
-
/**
|
|
1774
|
-
* - Identifier of the product suite to
|
|
1775
|
-
* which the plan belongs.
|
|
1776
|
-
*/
|
|
1777
|
-
product_suite_id?: string;
|
|
1778
|
-
/**
|
|
1779
|
-
* - Timestamp when the plan was created.
|
|
1780
|
-
*/
|
|
1781
|
-
created_at?: string;
|
|
1782
|
-
/**
|
|
1783
|
-
* - Timestamp when the plan was last modified.
|
|
1784
|
-
*/
|
|
1785
|
-
modified_at?: string;
|
|
1786
|
-
taxation?: Taxation;
|
|
1787
|
-
one_time_fees?: OneTimeFees;
|
|
1788
|
-
credit_line?: CreditLine;
|
|
1789
|
-
/**
|
|
1790
|
-
* - Current status of the plan (e.g.,
|
|
1791
|
-
* active, inactive).
|
|
1792
|
-
*/
|
|
1793
|
-
current_status?: string;
|
|
1794
|
-
/**
|
|
1795
|
-
* - Type of channel where the plan is offered
|
|
1796
|
-
* (e.g., ecomm, retail).
|
|
1797
|
-
*/
|
|
1798
|
-
channel_type?: string;
|
|
1799
|
-
/**
|
|
1800
|
-
* - List of company IDs associated with the
|
|
1801
|
-
* plan. Can be null.
|
|
1802
|
-
*/
|
|
1803
|
-
company_ids?: string[];
|
|
1804
|
-
/**
|
|
1805
|
-
* - Platform where the plan is available (e.g.,
|
|
1806
|
-
* web, mobile). Can be null.
|
|
1807
|
-
*/
|
|
1808
|
-
platform?: string;
|
|
1809
|
-
/**
|
|
1810
|
-
* - Timestamp when the plan was activated.
|
|
1811
|
-
*/
|
|
1812
|
-
activated_on?: string;
|
|
1813
|
-
meta?: PlanMeta;
|
|
1814
|
-
/**
|
|
1815
|
-
* - Identifier of the user who created the plan.
|
|
1816
|
-
*/
|
|
1817
|
-
created_by?: string;
|
|
1818
|
-
};
|
|
1819
|
-
/** @returns {SubscriptionTrialPeriod} */
|
|
1820
|
-
declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod;
|
|
1821
|
-
type SubscriptionTrialPeriod = {
|
|
1822
|
-
/**
|
|
1823
|
-
* - The start date and time of the trial period.
|
|
1824
|
-
*/
|
|
1825
|
-
start_date?: string;
|
|
1826
|
-
/**
|
|
1827
|
-
* - The end date and time of the trial period.
|
|
1828
|
-
*/
|
|
1829
|
-
end_date?: string;
|
|
1830
|
-
};
|
|
1831
|
-
/** @returns {EntityChargePrice} */
|
|
1832
|
-
declare function EntityChargePrice(): EntityChargePrice;
|
|
1833
|
-
type EntityChargePrice = {
|
|
1834
|
-
/**
|
|
1835
|
-
* - The amount for the price. The minimum value is 1.
|
|
1836
|
-
*/
|
|
1837
|
-
amount?: number;
|
|
1838
|
-
/**
|
|
1839
|
-
* - The currency code for the price
|
|
1840
|
-
*/
|
|
1841
|
-
currency_code?: string;
|
|
1842
|
-
};
|
|
1843
|
-
/** @returns {OneTimeChargeItem} */
|
|
1844
|
-
declare function OneTimeChargeItem(): OneTimeChargeItem;
|
|
1845
|
-
type OneTimeChargeItem = {
|
|
1846
|
-
/**
|
|
1847
|
-
* - The name of the one-time charge item.
|
|
1848
|
-
*/
|
|
1849
|
-
name?: string;
|
|
1850
|
-
/**
|
|
1851
|
-
* - The term or description of the charge.
|
|
1852
|
-
*/
|
|
1853
|
-
term?: string;
|
|
1854
|
-
/**
|
|
1855
|
-
* - The type of pricing for the charge item.
|
|
1856
|
-
*/
|
|
1857
|
-
pricing_type?: string;
|
|
1858
|
-
price?: EntityChargePrice;
|
|
1859
|
-
/**
|
|
1860
|
-
* - The maximum amount that can be charged
|
|
1861
|
-
* for this item, if applicable.
|
|
1862
|
-
*/
|
|
1863
|
-
capped_amount?: number;
|
|
1864
|
-
/**
|
|
1865
|
-
* - Indicates whether the charge item is for
|
|
1866
|
-
* testing purposes.
|
|
1867
|
-
*/
|
|
1868
|
-
is_test?: boolean;
|
|
1869
|
-
/**
|
|
1870
|
-
* - Additional metadata associated with the charge item.
|
|
1871
|
-
*/
|
|
1872
|
-
metadata?: any;
|
|
1873
|
-
};
|
|
1874
|
-
/** @returns {CreateOneTimeCharge} */
|
|
1875
|
-
declare function CreateOneTimeCharge(): CreateOneTimeCharge;
|
|
1876
|
-
type CreateOneTimeCharge = {
|
|
1877
|
-
/**
|
|
1878
|
-
* - The name of the one-time charge to be created.
|
|
1879
|
-
*/
|
|
1880
|
-
name?: string;
|
|
1881
|
-
charge?: OneTimeChargeItem;
|
|
1882
|
-
/**
|
|
1883
|
-
* - Indicates whether the charge creation is for
|
|
1884
|
-
* testing purposes.
|
|
1885
|
-
*/
|
|
1886
|
-
is_test?: boolean;
|
|
1887
|
-
/**
|
|
1888
|
-
* - URL to which the user will be redirected
|
|
1889
|
-
* after creating the charge.
|
|
1890
|
-
*/
|
|
1891
|
-
return_url?: string;
|
|
1892
|
-
};
|
|
1893
|
-
/** @returns {ChargeRecurring} */
|
|
1894
|
-
declare function ChargeRecurring(): ChargeRecurring;
|
|
1895
|
-
type ChargeRecurring = {
|
|
1896
|
-
interval?: string;
|
|
1897
|
-
interval_time?: number;
|
|
1898
|
-
};
|
|
1899
|
-
/** @returns {ChargeDetails} */
|
|
1900
|
-
declare function ChargeDetails(): ChargeDetails;
|
|
1901
|
-
type ChargeDetails = {
|
|
1902
|
-
/**
|
|
1903
|
-
* - Unique identifier for the charge.
|
|
1904
|
-
*/
|
|
1905
|
-
_id?: string;
|
|
1906
|
-
/**
|
|
1907
|
-
* - The type of entity associated with the
|
|
1908
|
-
* charge (e.g., 'extension', 'subscription').
|
|
1909
|
-
*/
|
|
1910
|
-
entity_type?: string;
|
|
1911
|
-
/**
|
|
1912
|
-
* - Unique identifier for the entity associated
|
|
1913
|
-
* with the charge.
|
|
1914
|
-
*/
|
|
1915
|
-
entity_id?: string;
|
|
1916
|
-
/**
|
|
1917
|
-
* - The name of the charge.
|
|
1918
|
-
*/
|
|
1919
|
-
name?: string;
|
|
1920
|
-
/**
|
|
1921
|
-
* - Description of the charge term.
|
|
1922
|
-
*/
|
|
1923
|
-
term?: string;
|
|
1924
|
-
/**
|
|
1925
|
-
* - The type of charge (e.g., 'standalone',
|
|
1926
|
-
* 'recurring').
|
|
1927
|
-
*/
|
|
1928
|
-
charge_type?: string;
|
|
1929
|
-
/**
|
|
1930
|
-
* - The pricing model for the charge (e.g.,
|
|
1931
|
-
* 'one_time', 'recurring').
|
|
1932
|
-
*/
|
|
1933
|
-
pricing_type?: string;
|
|
1934
|
-
price?: EntityChargePrice;
|
|
1935
|
-
recurring?: ChargeRecurring;
|
|
1936
|
-
/**
|
|
1937
|
-
* - Current status of the charge.
|
|
1938
|
-
*/
|
|
1939
|
-
status?: string;
|
|
1940
|
-
/**
|
|
1941
|
-
* - Maximum amount that can be charged, if applicable.
|
|
1942
|
-
*/
|
|
1943
|
-
capped_amount?: number;
|
|
1944
|
-
/**
|
|
1945
|
-
* - Date and time when the charge was activated.
|
|
1946
|
-
*/
|
|
1947
|
-
activated_on?: string;
|
|
1948
|
-
/**
|
|
1949
|
-
* - Date and time when the charge was cancelled.
|
|
1950
|
-
*/
|
|
1951
|
-
cancelled_on?: string;
|
|
1952
|
-
/**
|
|
1953
|
-
* - Date and time when the charge was billed.
|
|
1954
|
-
*/
|
|
1955
|
-
billing_date?: string;
|
|
1956
|
-
current_period?: SubscriptionTrialPeriod;
|
|
1957
|
-
/**
|
|
1958
|
-
* - Date and time when the charge details were
|
|
1959
|
-
* last modified.
|
|
1960
|
-
*/
|
|
1961
|
-
modified_at?: string;
|
|
1962
|
-
/**
|
|
1963
|
-
* - Date and time when the charge was created.
|
|
1964
|
-
*/
|
|
1965
|
-
created_at?: string;
|
|
1966
|
-
/**
|
|
1967
|
-
* - Indicates whether the charge is for testing purposes.
|
|
1968
|
-
*/
|
|
1969
|
-
is_test?: boolean;
|
|
1970
|
-
/**
|
|
1971
|
-
* - Company id.
|
|
1972
|
-
*/
|
|
1973
|
-
company_id?: string;
|
|
1974
|
-
/**
|
|
1975
|
-
* - Additional metadata associated with the charge.
|
|
1976
|
-
*/
|
|
1977
|
-
meta?: any;
|
|
1978
|
-
/**
|
|
1979
|
-
* - Internal version key for the charge record.
|
|
1980
|
-
*/
|
|
1981
|
-
__v?: number;
|
|
1982
|
-
};
|
|
1983
|
-
/** @returns {OneTimeChargeEntity} */
|
|
1984
|
-
declare function OneTimeChargeEntity(): OneTimeChargeEntity;
|
|
1985
|
-
type OneTimeChargeEntity = {
|
|
1986
|
-
/**
|
|
1987
|
-
* - Description of the charge term or usage.
|
|
1988
|
-
*/
|
|
1989
|
-
term?: string;
|
|
1990
|
-
/**
|
|
1991
|
-
* - Type of the charge (e.g., 'subscription',
|
|
1992
|
-
* 'extension').
|
|
1993
|
-
*/
|
|
1994
|
-
charge_type?: string;
|
|
1995
|
-
/**
|
|
1996
|
-
* - Maximum amount that can be charged. If
|
|
1997
|
-
* no cap, the value should be 0.
|
|
1998
|
-
*/
|
|
1999
|
-
capped_amount?: number;
|
|
2000
|
-
/**
|
|
2001
|
-
* - Date when the charge was billed. Null if
|
|
2002
|
-
* not yet billed.
|
|
2003
|
-
*/
|
|
2004
|
-
billing_date?: string;
|
|
2005
|
-
/**
|
|
2006
|
-
* - Date and time when the charge entity was created.
|
|
2007
|
-
*/
|
|
2008
|
-
created_at?: string;
|
|
2009
|
-
/**
|
|
2010
|
-
* - Date and time when the charge entity was
|
|
2011
|
-
* last modified.
|
|
2012
|
-
*/
|
|
2013
|
-
modified_at?: string;
|
|
2014
|
-
/**
|
|
2015
|
-
* - Internal version key for the charge record.
|
|
2016
|
-
*/
|
|
2017
|
-
__v?: number;
|
|
2018
|
-
/**
|
|
2019
|
-
* - Unique identifier for the charge entity.
|
|
2020
|
-
*/
|
|
2021
|
-
_id?: string;
|
|
2022
|
-
/**
|
|
2023
|
-
* - The name of the one-time charge.
|
|
2024
|
-
*/
|
|
2025
|
-
name?: string;
|
|
2026
|
-
/**
|
|
2027
|
-
* - Current status of the charge (e.g., 'pending',
|
|
2028
|
-
* 'completed').
|
|
2029
|
-
*/
|
|
2030
|
-
status?: string;
|
|
2031
|
-
/**
|
|
2032
|
-
* - Date and time when the charge was
|
|
2033
|
-
* activated. Null if not yet activated.
|
|
2034
|
-
*/
|
|
2035
|
-
activated_on?: string;
|
|
2036
|
-
/**
|
|
2037
|
-
* - Date and time when the charge was
|
|
2038
|
-
* cancelled. Null if not cancelled.
|
|
2039
|
-
*/
|
|
2040
|
-
cancelled_on?: string;
|
|
2041
|
-
/**
|
|
2042
|
-
* - Additional metadata associated with the charge.
|
|
2043
|
-
*/
|
|
2044
|
-
metadata?: any;
|
|
2045
|
-
/**
|
|
2046
|
-
* - URL to redirect to after processing the charge.
|
|
2047
|
-
*/
|
|
2048
|
-
return_url?: string;
|
|
2049
|
-
/**
|
|
2050
|
-
* - Indicates whether the charge is for testing purposes.
|
|
2051
|
-
*/
|
|
2052
|
-
is_test?: boolean;
|
|
2053
|
-
/**
|
|
2054
|
-
* - Pricing model for the charge (e.g., 'one_time').
|
|
2055
|
-
*/
|
|
2056
|
-
pricing_type?: string;
|
|
2057
|
-
/**
|
|
2058
|
-
* - Unique identifier for the subscriber
|
|
2059
|
-
* associated with the charge.
|
|
2060
|
-
*/
|
|
2061
|
-
subscriber_id?: string;
|
|
2062
|
-
/**
|
|
2063
|
-
* - Type of the entity related to the charge
|
|
2064
|
-
* (e.g., 'subscription', 'user').
|
|
2065
|
-
*/
|
|
2066
|
-
entity_type?: string;
|
|
2067
|
-
/**
|
|
2068
|
-
* - Unique identifier for the entity associated
|
|
2069
|
-
* with the charge.
|
|
2070
|
-
*/
|
|
2071
|
-
entity_id?: string;
|
|
2072
|
-
/**
|
|
2073
|
-
* - Additional metadata associated with the charge.
|
|
2074
|
-
*/
|
|
2075
|
-
meta?: any;
|
|
2076
|
-
price?: EntityChargePrice;
|
|
2077
|
-
};
|
|
2078
|
-
/** @returns {CreateOneTimeChargeResponse} */
|
|
2079
|
-
declare function CreateOneTimeChargeResponse(): CreateOneTimeChargeResponse;
|
|
2080
|
-
type CreateOneTimeChargeResponse = {
|
|
2081
|
-
charge?: Charge;
|
|
2082
|
-
/**
|
|
2083
|
-
* - URL to which users are redirected to
|
|
2084
|
-
* confirm or complete the payment or subscription process.
|
|
2085
|
-
*/
|
|
2086
|
-
confirm_url?: string;
|
|
2087
|
-
};
|
|
2088
|
-
/** @returns {Charge} */
|
|
2089
|
-
declare function Charge(): Charge;
|
|
2090
|
-
type Charge = {
|
|
2091
|
-
final_charge?: OneTimeChargeEntity;
|
|
2092
|
-
};
|
|
2093
|
-
/** @returns {InvoiceDetailsStatusTrail} */
|
|
2094
|
-
declare function InvoiceDetailsStatusTrail(): InvoiceDetailsStatusTrail;
|
|
2095
|
-
type InvoiceDetailsStatusTrail = {
|
|
2096
|
-
/**
|
|
2097
|
-
* - Unique identifier for the status trail entry.
|
|
2098
|
-
*/
|
|
2099
|
-
_id?: string;
|
|
2100
|
-
/**
|
|
2101
|
-
* - The status value of the invoice at a particular
|
|
2102
|
-
* point in time.
|
|
2103
|
-
*/
|
|
2104
|
-
value?: string;
|
|
2105
|
-
/**
|
|
2106
|
-
* - The date and time when this status was recorded.
|
|
2107
|
-
*/
|
|
2108
|
-
timestamp?: string;
|
|
2109
|
-
};
|
|
2110
|
-
/** @returns {InvoiceItemsPlanRecurring} */
|
|
2111
|
-
declare function InvoiceItemsPlanRecurring(): InvoiceItemsPlanRecurring;
|
|
2112
|
-
type InvoiceItemsPlanRecurring = {
|
|
2113
|
-
/**
|
|
2114
|
-
* - The interval at which the plan recurs (e.g.,
|
|
2115
|
-
* month, year).
|
|
2116
|
-
*/
|
|
2117
|
-
interval?: string;
|
|
2118
|
-
/**
|
|
2119
|
-
* - The number of intervals for the recurring plan.
|
|
2120
|
-
*/
|
|
2121
|
-
interval_count?: number;
|
|
2122
|
-
};
|
|
2123
|
-
/** @returns {InvoiceItemsPlan} */
|
|
2124
|
-
declare function InvoiceItemsPlan(): InvoiceItemsPlan;
|
|
2125
|
-
type InvoiceItemsPlan = {
|
|
2126
|
-
recurring?: InvoiceItemsPlanRecurring;
|
|
2127
|
-
/**
|
|
2128
|
-
* - Indicates whether the plan is a trial plan.
|
|
2129
|
-
*/
|
|
2130
|
-
is_trial_plan?: boolean;
|
|
2131
|
-
/**
|
|
2132
|
-
* - Group or category to which the plan belongs.
|
|
2133
|
-
*/
|
|
2134
|
-
plan_group?: string;
|
|
2135
|
-
/**
|
|
2136
|
-
* - List of tag lines or short descriptions
|
|
2137
|
-
* for the plan.
|
|
2138
|
-
*/
|
|
2139
|
-
tag_lines?: string[];
|
|
2140
|
-
/**
|
|
2141
|
-
* - Currency code for the pricing of the plan.
|
|
2142
|
-
*/
|
|
2143
|
-
currency?: string;
|
|
2144
|
-
/**
|
|
2145
|
-
* - Indicates whether the plan is currently active.
|
|
2146
|
-
*/
|
|
2147
|
-
is_active?: boolean;
|
|
2148
|
-
/**
|
|
2149
|
-
* - Indicates whether the plan is visible to users.
|
|
2150
|
-
*/
|
|
2151
|
-
is_visible?: boolean;
|
|
2152
|
-
/**
|
|
2153
|
-
* - The number of days for the trial period.
|
|
2154
|
-
*/
|
|
2155
|
-
trial_period?: number;
|
|
2156
|
-
/**
|
|
2157
|
-
* - List of add-ons available with the plan.
|
|
2158
|
-
*/
|
|
2159
|
-
addons?: string[];
|
|
2160
|
-
/**
|
|
2161
|
-
* - Tags associated with the plan for categorization.
|
|
2162
|
-
*/
|
|
2163
|
-
tags?: string[];
|
|
2164
|
-
/**
|
|
2165
|
-
* - Type of the plan (e.g., public, private).
|
|
2166
|
-
*/
|
|
2167
|
-
type?: string;
|
|
2168
|
-
/**
|
|
2169
|
-
* - Country for which plan is created
|
|
2170
|
-
*/
|
|
2171
|
-
country?: string;
|
|
2172
|
-
/**
|
|
2173
|
-
* - Unique identifier for the plan.
|
|
2174
|
-
*/
|
|
2175
|
-
_id?: string;
|
|
2176
|
-
/**
|
|
2177
|
-
* - Name of the plan.
|
|
2178
|
-
*/
|
|
2179
|
-
name?: string;
|
|
2180
|
-
/**
|
|
2181
|
-
* - Detailed description of the plan.
|
|
2182
|
-
*/
|
|
2183
|
-
description?: string;
|
|
2184
|
-
/**
|
|
2185
|
-
* - Price of the plan in the specified currency.
|
|
2186
|
-
*/
|
|
2187
|
-
amount?: number;
|
|
2188
|
-
/**
|
|
2189
|
-
* - Identifier for the product suite to
|
|
2190
|
-
* which the plan belongs.
|
|
2191
|
-
*/
|
|
2192
|
-
product_suite_id?: string;
|
|
2193
|
-
/**
|
|
2194
|
-
* - Timestamp when the plan was created.
|
|
2195
|
-
*/
|
|
2196
|
-
created_at?: string;
|
|
2197
|
-
/**
|
|
2198
|
-
* - Timestamp when the plan was last modified.
|
|
2199
|
-
*/
|
|
2200
|
-
modified_at?: string;
|
|
2201
|
-
};
|
|
2202
|
-
/** @returns {InvoiceItemsPeriod} */
|
|
2203
|
-
declare function InvoiceItemsPeriod(): InvoiceItemsPeriod;
|
|
2204
|
-
type InvoiceItemsPeriod = {
|
|
2205
|
-
/**
|
|
2206
|
-
* - Start date of the invoice period.
|
|
2207
|
-
*/
|
|
2208
|
-
start?: string;
|
|
2209
|
-
/**
|
|
2210
|
-
* - End date of the invoice period.
|
|
2211
|
-
*/
|
|
2212
|
-
end?: string;
|
|
2213
|
-
};
|
|
2214
|
-
/** @returns {InvoiceItems} */
|
|
2215
|
-
declare function InvoiceItems(): InvoiceItems;
|
|
2216
|
-
type InvoiceItems = {
|
|
2217
|
-
/**
|
|
2218
|
-
* - Unique identifier for the invoice item.
|
|
2219
|
-
*/
|
|
2220
|
-
_id?: string;
|
|
2221
|
-
/**
|
|
2222
|
-
* - Currency for the amount.
|
|
2223
|
-
*/
|
|
2224
|
-
currency?: string;
|
|
2225
|
-
plan?: InvoiceItemsPlan;
|
|
2226
|
-
/**
|
|
2227
|
-
* - Name of the invoice item.
|
|
2228
|
-
*/
|
|
2229
|
-
name?: string;
|
|
2230
|
-
/**
|
|
2231
|
-
* - Number of units of the invoice item.
|
|
2232
|
-
*/
|
|
2233
|
-
quantity?: number;
|
|
2234
|
-
/**
|
|
2235
|
-
* - Description of the invoice item.
|
|
2236
|
-
*/
|
|
2237
|
-
description?: string;
|
|
2238
|
-
period?: InvoiceItemsPeriod;
|
|
2239
|
-
/**
|
|
2240
|
-
* - Amount per unit of the invoice item.
|
|
2241
|
-
*/
|
|
2242
|
-
unit_amount?: number;
|
|
2243
|
-
/**
|
|
2244
|
-
* - Total amount for the invoice item.
|
|
2245
|
-
*/
|
|
2246
|
-
amount?: number;
|
|
2247
|
-
/**
|
|
2248
|
-
* - Type of the invoice item (e.g., subscription, extension).
|
|
2249
|
-
*/
|
|
2250
|
-
type?: string;
|
|
2251
|
-
/**
|
|
2252
|
-
* - Identifier for the invoice to which the item belongs.
|
|
2253
|
-
*/
|
|
2254
|
-
invoice_id?: string;
|
|
2255
|
-
/**
|
|
2256
|
-
* - Timestamp when the invoice item was created.
|
|
2257
|
-
*/
|
|
2258
|
-
created_at?: string;
|
|
2259
|
-
/**
|
|
2260
|
-
* - Timestamp when the invoice item was last modified.
|
|
2261
|
-
*/
|
|
2262
|
-
modified_at?: string;
|
|
2263
|
-
};
|
|
2264
|
-
/** @returns {InvoicesDataClient} */
|
|
2265
|
-
declare function InvoicesDataClient(): InvoicesDataClient;
|
|
2266
|
-
type InvoicesDataClient = {
|
|
2267
|
-
/**
|
|
2268
|
-
* - Name of the client.
|
|
2269
|
-
*/
|
|
2270
|
-
name?: string;
|
|
2271
|
-
/**
|
|
2272
|
-
* - Email address of the client.
|
|
2273
|
-
*/
|
|
2274
|
-
email?: string;
|
|
2275
|
-
/**
|
|
2276
|
-
* - Phone number of the client.
|
|
2277
|
-
*/
|
|
2278
|
-
phone?: string;
|
|
2279
|
-
/**
|
|
2280
|
-
* - Array of address lines for the client’s address.
|
|
2281
|
-
*/
|
|
2282
|
-
address_lines?: string[];
|
|
2283
|
-
};
|
|
2284
|
-
/** @returns {InvoicesDataPeriod} */
|
|
2285
|
-
declare function InvoicesDataPeriod(): InvoicesDataPeriod;
|
|
2286
|
-
type InvoicesDataPeriod = {
|
|
2287
|
-
/**
|
|
2288
|
-
* - The start date and time of the invoice period.
|
|
2289
|
-
*/
|
|
2290
|
-
start?: string;
|
|
2291
|
-
/**
|
|
2292
|
-
* - The end date and time of the invoice period.
|
|
2293
|
-
*/
|
|
2294
|
-
end?: string;
|
|
2295
|
-
};
|
|
2296
|
-
/** @returns {InvoicesDataPaymentMethod} */
|
|
2297
|
-
declare function InvoicesDataPaymentMethod(): InvoicesDataPaymentMethod;
|
|
2298
|
-
type InvoicesDataPaymentMethod = {
|
|
2299
|
-
/**
|
|
2300
|
-
* - Payment gateway-specific payment
|
|
2301
|
-
* method identifier. Nullable if not applicable.
|
|
2302
|
-
*/
|
|
2303
|
-
pg_payment_method_id?: string;
|
|
2304
|
-
};
|
|
2305
|
-
/** @returns {InvoicesData} */
|
|
2306
|
-
declare function InvoicesData(): InvoicesData;
|
|
2307
|
-
type InvoicesData = {
|
|
2308
|
-
/**
|
|
2309
|
-
* - Unique identifier for the invoice.
|
|
2310
|
-
*/
|
|
2311
|
-
_id?: string;
|
|
2312
|
-
/**
|
|
2313
|
-
* - Associated documents related to the invoice.
|
|
2314
|
-
*/
|
|
2315
|
-
documents?: any;
|
|
2316
|
-
/**
|
|
2317
|
-
* - Payment details for the invoice.
|
|
2318
|
-
*/
|
|
2319
|
-
payment?: any;
|
|
2320
|
-
/**
|
|
2321
|
-
* - Previous settlement amount, if applicable.
|
|
2322
|
-
*/
|
|
2323
|
-
old_settlement?: number;
|
|
2324
|
-
/**
|
|
2325
|
-
* - Remaining credit balance applied to the
|
|
2326
|
-
* invoice, if any.
|
|
2327
|
-
*/
|
|
2328
|
-
credit_balance?: number;
|
|
2329
|
-
/**
|
|
2330
|
-
* - Details of any discounts applied to the invoice.
|
|
2331
|
-
*/
|
|
2332
|
-
discount?: any;
|
|
2333
|
-
/**
|
|
2334
|
-
* - Taxation details associated with the invoice.
|
|
2335
|
-
*/
|
|
2336
|
-
taxation?: any;
|
|
2337
|
-
/**
|
|
2338
|
-
* - Amount covered by credit notes, if any.
|
|
2339
|
-
*/
|
|
2340
|
-
credit_note_amount?: number;
|
|
2341
|
-
client?: InvoicesDataClient;
|
|
2342
|
-
/**
|
|
2343
|
-
* - Indicates if the invoice should be
|
|
2344
|
-
* auto-advanced in the billing process.
|
|
2345
|
-
*/
|
|
2346
|
-
auto_advance?: boolean;
|
|
2347
|
-
/**
|
|
2348
|
-
* - Currency code used for the invoice amount.
|
|
2349
|
-
*/
|
|
2350
|
-
currency?: string;
|
|
2351
|
-
/**
|
|
2352
|
-
* - Indicates if the invoice has been paid.
|
|
2353
|
-
*/
|
|
2354
|
-
paid?: boolean;
|
|
2355
|
-
/**
|
|
2356
|
-
* - Number of payment attempts made for the invoice.
|
|
2357
|
-
*/
|
|
2358
|
-
attemp?: number;
|
|
2359
|
-
/**
|
|
2360
|
-
* - Method used to collect payment for
|
|
2361
|
-
* the invoice.
|
|
2362
|
-
*/
|
|
2363
|
-
collection_method?: string;
|
|
2364
|
-
/**
|
|
2365
|
-
* - Identifier for the subscriber associated
|
|
2366
|
-
* with the invoice.
|
|
2367
|
-
*/
|
|
2368
|
-
subscriber_id?: string;
|
|
2369
|
-
/**
|
|
2370
|
-
* - URL to view or download the invoice.
|
|
2371
|
-
* "null" if not available.
|
|
2372
|
-
*/
|
|
2373
|
-
invoice_url?: string;
|
|
2374
|
-
/**
|
|
2375
|
-
* - Unique invoice number.
|
|
2376
|
-
*/
|
|
2377
|
-
number?: string;
|
|
2378
|
-
/**
|
|
2379
|
-
* - Payment gateway-related data for the invoice.
|
|
2380
|
-
*/
|
|
2381
|
-
pg_data?: any;
|
|
2382
|
-
period?: InvoicesDataPeriod;
|
|
2383
|
-
/**
|
|
2384
|
-
* - Receipt number for the invoice payment.
|
|
2385
|
-
*/
|
|
2386
|
-
receipt_number?: string;
|
|
2387
|
-
/**
|
|
2388
|
-
* - Descriptor that appears on the
|
|
2389
|
-
* client's statement for the invoice.
|
|
2390
|
-
*/
|
|
2391
|
-
statement_descriptor?: string;
|
|
2392
|
-
/**
|
|
2393
|
-
* - Current status of the invoice (e.g.,
|
|
2394
|
-
* paid, pending).
|
|
2395
|
-
*/
|
|
2396
|
-
current_status?: string;
|
|
2397
|
-
/**
|
|
2398
|
-
* - History of status
|
|
2399
|
-
* changes for the invoice.
|
|
2400
|
-
*/
|
|
2401
|
-
status_trail?: InvoiceDetailsStatusTrail[];
|
|
2402
|
-
/**
|
|
2403
|
-
* - Subtotal amount before taxes and discounts.
|
|
2404
|
-
*/
|
|
2405
|
-
subtotal?: number;
|
|
2406
|
-
/**
|
|
2407
|
-
* - Total amount including taxes and discounts.
|
|
2408
|
-
*/
|
|
2409
|
-
total?: number;
|
|
2410
|
-
/**
|
|
2411
|
-
* - Identifier for the subscription
|
|
2412
|
-
* associated with the invoice.
|
|
2413
|
-
*/
|
|
2414
|
-
subscription?: string;
|
|
2415
|
-
/**
|
|
2416
|
-
* - Scheduled time for the next action
|
|
2417
|
-
* related to the invoice.
|
|
2418
|
-
*/
|
|
2419
|
-
next_action_time?: string;
|
|
2420
|
-
/**
|
|
2421
|
-
* - Timestamp when the invoice was created.
|
|
2422
|
-
*/
|
|
2423
|
-
created_at?: string;
|
|
2424
|
-
/**
|
|
2425
|
-
* - Timestamp when the invoice was last modified.
|
|
2426
|
-
*/
|
|
2427
|
-
modified_at?: string;
|
|
2428
|
-
/**
|
|
2429
|
-
* - Unique hash identifier for the invoice.
|
|
2430
|
-
*/
|
|
2431
|
-
hash_identifier?: string;
|
|
2432
|
-
payment_method?: InvoicesDataPaymentMethod;
|
|
2433
|
-
/**
|
|
2434
|
-
* - List of items included in the invoice.
|
|
2435
|
-
*/
|
|
2436
|
-
invoice_items?: InvoiceItems[];
|
|
2437
|
-
/**
|
|
2438
|
-
* - Type of invoice (e.g., extension, subscription).
|
|
2439
|
-
*/
|
|
2440
|
-
invoice_type?: string;
|
|
2441
|
-
};
|
|
2442
|
-
/** @returns {Invoices} */
|
|
2443
|
-
declare function Invoices(): Invoices;
|
|
2444
|
-
type Invoices = {
|
|
2445
|
-
data?: InvoicesData[];
|
|
2446
|
-
/**
|
|
2447
|
-
* - Index of the first item in the results.
|
|
2448
|
-
*/
|
|
2449
|
-
start?: number;
|
|
2450
|
-
/**
|
|
2451
|
-
* - Index of the last item in the results.
|
|
2452
|
-
*/
|
|
2453
|
-
end?: number;
|
|
2454
|
-
/**
|
|
2455
|
-
* - Number of items per page.
|
|
2456
|
-
*/
|
|
2457
|
-
limit?: number;
|
|
2458
|
-
/**
|
|
2459
|
-
* - Page number of the results.
|
|
2460
|
-
*/
|
|
2461
|
-
page?: number;
|
|
2462
|
-
/**
|
|
2463
|
-
* - Total number of items available.
|
|
2464
|
-
*/
|
|
2465
|
-
total?: number;
|
|
2466
|
-
};
|
|
2467
|
-
/** @returns {Phone} */
|
|
2468
|
-
declare function Phone(): Phone;
|
|
2469
|
-
type Phone = {
|
|
2470
|
-
/**
|
|
2471
|
-
* - The phone number of the contact.
|
|
2472
|
-
*/
|
|
2473
|
-
phone_number?: string;
|
|
2474
|
-
/**
|
|
2475
|
-
* - The country code of the phone number.
|
|
2476
|
-
*/
|
|
2477
|
-
phone_country_code?: string;
|
|
2478
|
-
};
|
|
2479
|
-
/** @returns {SubscriptionBillingAddress} */
|
|
2480
|
-
declare function SubscriptionBillingAddress(): SubscriptionBillingAddress;
|
|
2481
|
-
type SubscriptionBillingAddress = {
|
|
2482
|
-
/**
|
|
2483
|
-
* - Name of the country for the billing address.
|
|
2484
|
-
*/
|
|
2485
|
-
country?: string;
|
|
2486
|
-
/**
|
|
2487
|
-
* - ISO country code for the billing address.
|
|
2488
|
-
*/
|
|
2489
|
-
country_code?: string;
|
|
2490
|
-
/**
|
|
2491
|
-
* - State or province for the billing address.
|
|
2492
|
-
*/
|
|
2493
|
-
state?: string;
|
|
2494
|
-
/**
|
|
2495
|
-
* - City for the billing address.
|
|
2496
|
-
*/
|
|
2497
|
-
city?: string;
|
|
2498
|
-
/**
|
|
2499
|
-
* - First line of the street address.
|
|
2500
|
-
*/
|
|
2501
|
-
line1?: string;
|
|
2502
|
-
/**
|
|
2503
|
-
* - Second line of the street address (optional).
|
|
2504
|
-
*/
|
|
2505
|
-
line2?: string;
|
|
2506
|
-
/**
|
|
2507
|
-
* - Postal or ZIP code for the billing address.
|
|
2508
|
-
*/
|
|
2509
|
-
postal_code?: string;
|
|
2510
|
-
};
|
|
2511
|
-
/** @returns {SubscriptionCustomer} */
|
|
2512
|
-
declare function SubscriptionCustomer(): SubscriptionCustomer;
|
|
2513
|
-
type SubscriptionCustomer = {
|
|
2514
|
-
phone?: Phone;
|
|
2515
|
-
billing_address?: SubscriptionBillingAddress;
|
|
2516
|
-
/**
|
|
2517
|
-
* - Unique identifier for the subscriber.
|
|
2518
|
-
*/
|
|
2519
|
-
_id?: string;
|
|
2520
|
-
/**
|
|
2521
|
-
* - Identifier specific to the company.
|
|
2522
|
-
*/
|
|
2523
|
-
unique_id?: string;
|
|
2524
|
-
/**
|
|
2525
|
-
* - Type of the customer (e.g., developer, company).
|
|
2526
|
-
*/
|
|
2527
|
-
type?: string;
|
|
2528
|
-
/**
|
|
2529
|
-
* - Name of the customer.
|
|
2530
|
-
*/
|
|
2531
|
-
name?: string;
|
|
2532
|
-
/**
|
|
2533
|
-
* - Email address of the customer.
|
|
2534
|
-
*/
|
|
2535
|
-
email?: string;
|
|
2536
|
-
/**
|
|
2537
|
-
* - Timestamp when the customer record was created.
|
|
2538
|
-
*/
|
|
2539
|
-
created_at?: string;
|
|
2540
|
-
/**
|
|
2541
|
-
* - Timestamp when the customer record was
|
|
2542
|
-
* last modified.
|
|
2543
|
-
*/
|
|
2544
|
-
modified_at?: string;
|
|
2545
|
-
/**
|
|
2546
|
-
* - Additional data related to the customer.
|
|
2547
|
-
*/
|
|
2548
|
-
data?: any;
|
|
2549
|
-
/**
|
|
2550
|
-
* - Associated documents related to the customer.
|
|
2551
|
-
*/
|
|
2552
|
-
documents?: any;
|
|
2553
|
-
/**
|
|
2554
|
-
* - Indicates whether the customer has given consent.
|
|
2555
|
-
*/
|
|
2556
|
-
consent?: boolean;
|
|
2557
|
-
/**
|
|
2558
|
-
* - Indicates whether the customer has opted in for
|
|
2559
|
-
* communications.
|
|
2560
|
-
*/
|
|
2561
|
-
comms?: boolean;
|
|
2562
|
-
/**
|
|
2563
|
-
* - Current credit balance for the customer, if any.
|
|
2564
|
-
*/
|
|
2565
|
-
credit_balance?: number;
|
|
2566
|
-
business_country_info?: BusinessCountryInfo;
|
|
2567
|
-
};
|
|
2568
|
-
/** @returns {SubscriptionCustomerCreate} */
|
|
2569
|
-
declare function SubscriptionCustomerCreate(): SubscriptionCustomerCreate;
|
|
2570
|
-
type SubscriptionCustomerCreate = {
|
|
2571
|
-
phone?: Phone;
|
|
2572
|
-
billing_address?: SubscriptionBillingAddress;
|
|
2573
|
-
/**
|
|
2574
|
-
* - Company id for the customer, generated by the client.
|
|
2575
|
-
*/
|
|
2576
|
-
unique_id?: string;
|
|
2577
|
-
/**
|
|
2578
|
-
* - Type of company
|
|
2579
|
-
*/
|
|
2580
|
-
type?: string;
|
|
2581
|
-
/**
|
|
2582
|
-
* - Name of the company
|
|
2583
|
-
*/
|
|
2584
|
-
name?: string;
|
|
2585
|
-
/**
|
|
2586
|
-
* - Email address of the company
|
|
2587
|
-
*/
|
|
2588
|
-
email?: string;
|
|
2589
|
-
};
|
|
2590
|
-
/** @returns {SubscriptionCurrentPeriod} */
|
|
2591
|
-
declare function SubscriptionCurrentPeriod(): SubscriptionCurrentPeriod;
|
|
2592
|
-
type SubscriptionCurrentPeriod = {
|
|
2593
|
-
/**
|
|
2594
|
-
* - The start date and time of the current
|
|
2595
|
-
* subscription period.
|
|
2596
|
-
*/
|
|
2597
|
-
start?: string;
|
|
2598
|
-
/**
|
|
2599
|
-
* - The end date and time of the current subscription period.
|
|
2600
|
-
*/
|
|
2601
|
-
end?: string;
|
|
2602
|
-
};
|
|
2603
|
-
/** @returns {SubscriptionPauseCollection} */
|
|
2604
|
-
declare function SubscriptionPauseCollection(): SubscriptionPauseCollection;
|
|
2605
|
-
type SubscriptionPauseCollection = {
|
|
2606
|
-
/**
|
|
2607
|
-
* - Defines the behavior of the subscription when
|
|
2608
|
-
* it is paused. Possible values could include `keep_as_draft` or `cancel`.
|
|
2609
|
-
*/
|
|
2610
|
-
behavior?: string;
|
|
2611
|
-
/**
|
|
2612
|
-
* - The date and time when the paused
|
|
2613
|
-
* subscription is scheduled to resume.
|
|
2614
|
-
*/
|
|
2615
|
-
resume_at?: string;
|
|
2616
|
-
};
|
|
2617
|
-
/** @returns {SubscriptionTrial} */
|
|
2618
|
-
declare function SubscriptionTrial(): SubscriptionTrial;
|
|
2619
|
-
type SubscriptionTrial = {
|
|
2620
|
-
/**
|
|
2621
|
-
* - The start date and time of the subscription trial period.
|
|
2622
|
-
*/
|
|
2623
|
-
start?: string;
|
|
2624
|
-
/**
|
|
2625
|
-
* - The end date and time of the subscription trial period.
|
|
2626
|
-
*/
|
|
2627
|
-
end?: string;
|
|
2628
|
-
};
|
|
2629
|
-
/** @returns {SubscriptionInvoiceSettings} */
|
|
2630
|
-
declare function SubscriptionInvoiceSettings(): SubscriptionInvoiceSettings;
|
|
2631
|
-
type SubscriptionInvoiceSettings = {
|
|
2632
|
-
/**
|
|
2633
|
-
* - Indicates whether invoices are
|
|
2634
|
-
* automatically generated for the subscription.
|
|
2635
|
-
*/
|
|
2636
|
-
generation?: boolean;
|
|
2637
|
-
/**
|
|
2638
|
-
* - Indicates whether charging is enabled for
|
|
2639
|
-
* the subscription. This setting determines if charges are applied based on
|
|
2640
|
-
* the invoice settings.
|
|
2641
|
-
*/
|
|
2642
|
-
charging?: boolean;
|
|
2643
|
-
};
|
|
2644
|
-
/** @returns {Subscription} */
|
|
2645
|
-
declare function Subscription(): Subscription;
|
|
2646
|
-
type Subscription = {
|
|
2647
|
-
/**
|
|
2648
|
-
* - Additional metadata related to the subscription.
|
|
2649
|
-
*/
|
|
2650
|
-
meta?: any;
|
|
2651
|
-
current_period?: SubscriptionCurrentPeriod;
|
|
2652
|
-
pause_collection?: SubscriptionPauseCollection;
|
|
2653
|
-
trial?: SubscriptionTrial;
|
|
2654
|
-
invoice_settings?: SubscriptionInvoiceSettings;
|
|
2655
|
-
/**
|
|
2656
|
-
* - Indicates whether the subscription is
|
|
2657
|
-
* currently active.
|
|
2658
|
-
*/
|
|
2659
|
-
is_active?: boolean;
|
|
2660
|
-
/**
|
|
2661
|
-
* - Indicates whether the
|
|
2662
|
-
* subscription will be canceled at the end of the current period.
|
|
2663
|
-
*/
|
|
2664
|
-
cancel_at_period_end?: boolean;
|
|
2665
|
-
/**
|
|
2666
|
-
* - Unique identifier for the subscription.
|
|
2667
|
-
*/
|
|
2668
|
-
_id?: string;
|
|
2669
|
-
/**
|
|
2670
|
-
* - Unique identifier for the subscriber
|
|
2671
|
-
* associated with the subscription.
|
|
2672
|
-
*/
|
|
2673
|
-
subscriber_id?: string;
|
|
2674
|
-
/**
|
|
2675
|
-
* - Unique identifier for the plan associated with
|
|
2676
|
-
* the subscription.
|
|
2677
|
-
*/
|
|
2678
|
-
plan_id?: string;
|
|
2679
|
-
/**
|
|
2680
|
-
* - Unique identifier for the product
|
|
2681
|
-
* suite associated with the subscription.
|
|
2682
|
-
*/
|
|
2683
|
-
product_suite_id?: string;
|
|
2684
|
-
/**
|
|
2685
|
-
* - Indicates whether the
|
|
2686
|
-
* subscriber is eligible to change their subscription plan.
|
|
2687
|
-
*/
|
|
2688
|
-
is_eligible_for_plan_change?: boolean;
|
|
2689
|
-
plan_data?: Plan;
|
|
2690
|
-
/**
|
|
2691
|
-
* - The current status of the subscription
|
|
2692
|
-
* (e.g., active, canceled).
|
|
2693
|
-
*/
|
|
2694
|
-
current_status?: string;
|
|
2695
|
-
/**
|
|
2696
|
-
* - Method used to collect payments for
|
|
2697
|
-
* the subscription (e.g., charge_automatically, invoice).
|
|
2698
|
-
*/
|
|
2699
|
-
collection_method?: string;
|
|
2700
|
-
/**
|
|
2701
|
-
* - The date and time when the subscription was created.
|
|
2702
|
-
*/
|
|
2703
|
-
created_at?: string;
|
|
2704
|
-
/**
|
|
2705
|
-
* - The date and time when the subscription
|
|
2706
|
-
* was last modified.
|
|
2707
|
-
*/
|
|
2708
|
-
modified_at?: string;
|
|
2709
|
-
/**
|
|
2710
|
-
* - Unique identifier for the most recent
|
|
2711
|
-
* invoice related to the subscription.
|
|
2712
|
-
*/
|
|
2713
|
-
latest_invoice?: string;
|
|
2714
|
-
/**
|
|
2715
|
-
* - Ordering channel for which the
|
|
2716
|
-
* subscription was created (e.g., ecomm, fynd).
|
|
2717
|
-
*/
|
|
2718
|
-
channel_type?: string;
|
|
2719
|
-
/**
|
|
2720
|
-
* - Indicates whether the subscription is
|
|
2721
|
-
* currently freezed.
|
|
2722
|
-
*/
|
|
2723
|
-
freezed?: boolean;
|
|
2724
|
-
/**
|
|
2725
|
-
* - The date and time when the subscription is
|
|
2726
|
-
* scheduled to be canceled, if applicable.
|
|
2727
|
-
*/
|
|
2728
|
-
cancel_at?: string;
|
|
2729
|
-
/**
|
|
2730
|
-
* - The date and time when the subscription
|
|
2731
|
-
* was actually canceled.
|
|
2732
|
-
*/
|
|
2733
|
-
canceled_at?: string;
|
|
2734
|
-
};
|
|
2735
|
-
/** @returns {SubscriptionStatus} */
|
|
2736
|
-
declare function SubscriptionStatus(): SubscriptionStatus;
|
|
2737
|
-
type SubscriptionStatus = {
|
|
2738
|
-
/**
|
|
2739
|
-
* - Indicates whether the subscription status
|
|
2740
|
-
* is enabled.
|
|
2741
|
-
*/
|
|
2742
|
-
is_enabled?: boolean;
|
|
2743
|
-
subscription?: Subscription;
|
|
2744
|
-
latest_invoice?: InvoicesData;
|
|
2745
|
-
next_plan?: Plan;
|
|
2746
|
-
/**
|
|
2747
|
-
* - List of current
|
|
2748
|
-
* subscriptions associated with the user.
|
|
2749
|
-
*/
|
|
2750
|
-
current_subscriptions?: Subscription[];
|
|
2751
|
-
/**
|
|
2752
|
-
* - The amount mandated for the
|
|
2753
|
-
* subscription or service.
|
|
2754
|
-
*/
|
|
2755
|
-
mandate_amount?: number;
|
|
2756
|
-
/**
|
|
2757
|
-
* - A message providing additional context or
|
|
2758
|
-
* information about the subscription status.
|
|
2759
|
-
*/
|
|
2760
|
-
message?: string;
|
|
2761
|
-
};
|
|
2762
|
-
/** @returns {SubscriptionLimitApplication} */
|
|
2763
|
-
declare function SubscriptionLimitApplication(): SubscriptionLimitApplication;
|
|
2764
|
-
type SubscriptionLimitApplication = {
|
|
2765
|
-
/**
|
|
2766
|
-
* - Indicates whether the application limit is enabled.
|
|
2767
|
-
*/
|
|
2768
|
-
enabled?: boolean;
|
|
2769
|
-
/**
|
|
2770
|
-
* - The maximum number of applications allowed.
|
|
2771
|
-
*/
|
|
2772
|
-
hard_limit?: number;
|
|
2773
|
-
/**
|
|
2774
|
-
* - The soft limit of applications allowed,
|
|
2775
|
-
* typically a warning threshold before reaching the hard limit.
|
|
2776
|
-
*/
|
|
2777
|
-
soft_limit?: number;
|
|
2778
|
-
};
|
|
2779
|
-
/** @returns {SubscriptionLimitMarketplace} */
|
|
2780
|
-
declare function SubscriptionLimitMarketplace(): SubscriptionLimitMarketplace;
|
|
2781
|
-
type SubscriptionLimitMarketplace = {
|
|
2782
|
-
/**
|
|
2783
|
-
* - Indicates whether the marketplace limit is enabled.
|
|
2784
|
-
*/
|
|
2785
|
-
enabled?: boolean;
|
|
2786
|
-
};
|
|
2787
|
-
/** @returns {SubscriptionLimitOtherPlatform} */
|
|
2788
|
-
declare function SubscriptionLimitOtherPlatform(): SubscriptionLimitOtherPlatform;
|
|
2789
|
-
type SubscriptionLimitOtherPlatform = {
|
|
2790
|
-
/**
|
|
2791
|
-
* - Indicates whether the other platform limit is enabled.
|
|
2792
|
-
*/
|
|
2793
|
-
enabled?: boolean;
|
|
2794
|
-
};
|
|
2795
|
-
/** @returns {SubscriptionLimitTeam} */
|
|
2796
|
-
declare function SubscriptionLimitTeam(): SubscriptionLimitTeam;
|
|
2797
|
-
type SubscriptionLimitTeam = {
|
|
2798
|
-
/**
|
|
2799
|
-
* - The limit for team-related features.
|
|
2800
|
-
*/
|
|
2801
|
-
limit?: number;
|
|
2802
|
-
};
|
|
2803
|
-
/** @returns {SubscriptionLimitProducts} */
|
|
2804
|
-
declare function SubscriptionLimitProducts(): SubscriptionLimitProducts;
|
|
2805
|
-
type SubscriptionLimitProducts = {
|
|
2806
|
-
/**
|
|
2807
|
-
* - Indicates whether bulk product limits are enabled.
|
|
2808
|
-
*/
|
|
2809
|
-
bulk?: boolean;
|
|
2810
|
-
/**
|
|
2811
|
-
* - The limit for products.
|
|
2812
|
-
*/
|
|
2813
|
-
limit?: number;
|
|
2814
|
-
};
|
|
2815
|
-
/** @returns {SubscriptionLimitExtensions} */
|
|
2816
|
-
declare function SubscriptionLimitExtensions(): SubscriptionLimitExtensions;
|
|
2817
|
-
type SubscriptionLimitExtensions = {
|
|
2818
|
-
/**
|
|
2819
|
-
* - Indicates whether the extensions limit is enabled.
|
|
2820
|
-
*/
|
|
2821
|
-
enabled?: boolean;
|
|
2822
|
-
/**
|
|
2823
|
-
* - The limit for extensions.
|
|
2824
|
-
*/
|
|
2825
|
-
limit?: number;
|
|
2826
|
-
};
|
|
2827
|
-
/** @returns {SubscriptionLimitIntegrations} */
|
|
2828
|
-
declare function SubscriptionLimitIntegrations(): SubscriptionLimitIntegrations;
|
|
2829
|
-
type SubscriptionLimitIntegrations = {
|
|
2830
|
-
/**
|
|
2831
|
-
* - Indicates whether the integrations limit is enabled.
|
|
2832
|
-
*/
|
|
2833
|
-
enabled?: boolean;
|
|
2834
|
-
/**
|
|
2835
|
-
* - The limit for integrations. A value of `-1`
|
|
2836
|
-
* usually indicates no limit.
|
|
2837
|
-
*/
|
|
2838
|
-
limit?: number;
|
|
2839
|
-
};
|
|
2840
|
-
/** @returns {SubscriptionLimit} */
|
|
2841
|
-
declare function SubscriptionLimit(): SubscriptionLimit;
|
|
2842
|
-
type SubscriptionLimit = {
|
|
2843
|
-
application?: SubscriptionLimitApplication;
|
|
2844
|
-
marketplace?: SubscriptionLimitMarketplace;
|
|
2845
|
-
other_platform?: SubscriptionLimitOtherPlatform;
|
|
2846
|
-
team?: SubscriptionLimitTeam;
|
|
2847
|
-
products?: SubscriptionLimitProducts;
|
|
2848
|
-
extensions?: SubscriptionLimitExtensions;
|
|
2849
|
-
integrations?: SubscriptionLimitIntegrations;
|
|
2850
|
-
/**
|
|
2851
|
-
* - Indicates whether the subscription is
|
|
2852
|
-
* for a trial plan.
|
|
2853
|
-
*/
|
|
2854
|
-
is_trial_plan?: boolean;
|
|
2855
|
-
};
|
|
2856
|
-
/** @returns {IntentReq} */
|
|
2857
|
-
declare function IntentReq(): IntentReq;
|
|
2858
|
-
type IntentReq = {
|
|
2859
|
-
/**
|
|
2860
|
-
* - A unique identifier for the
|
|
2861
|
-
* external resource, used to track and reference the request like company id.
|
|
2862
|
-
*/
|
|
2863
|
-
unique_external_id?: string;
|
|
2864
|
-
/**
|
|
2865
|
-
* - The identifier for the plan associated with the intent.
|
|
2866
|
-
*/
|
|
2867
|
-
plan_id?: string;
|
|
2868
|
-
};
|
|
2869
|
-
/** @returns {PutIntentReq} */
|
|
2870
|
-
declare function PutIntentReq(): PutIntentReq;
|
|
2871
|
-
type PutIntentReq = {
|
|
2872
|
-
/**
|
|
2873
|
-
* - A unique identifier for the
|
|
2874
|
-
* external resource, used to track and reference the request like company id.
|
|
2875
|
-
*/
|
|
2876
|
-
unique_external_id?: string;
|
|
2877
|
-
/**
|
|
2878
|
-
* - The ID of the setup intent for payment
|
|
2879
|
-
* methods, if applicable.
|
|
2880
|
-
*/
|
|
2881
|
-
setup_intent_id?: string;
|
|
2882
|
-
/**
|
|
2883
|
-
* - The ID of the payment method to use
|
|
2884
|
-
* for the intent.
|
|
2885
|
-
*/
|
|
2886
|
-
payment_method_id?: string;
|
|
2887
|
-
/**
|
|
2888
|
-
* - Indicates whether the payment method
|
|
2889
|
-
* should be set as default.
|
|
2890
|
-
*/
|
|
2891
|
-
set_default?: boolean;
|
|
2892
|
-
};
|
|
2893
|
-
/** @returns {SubscriptionActivateReq} */
|
|
2894
|
-
declare function SubscriptionActivateReq(): SubscriptionActivateReq;
|
|
2895
|
-
type SubscriptionActivateReq = {
|
|
2896
|
-
/**
|
|
2897
|
-
* - A unique identifier for the subscription
|
|
2898
|
-
* activation request.
|
|
2899
|
-
*/
|
|
2900
|
-
unique_id?: string;
|
|
2901
|
-
/**
|
|
2902
|
-
* - The type of subscriber account, e.g., company or developer.
|
|
2903
|
-
*/
|
|
2904
|
-
type?: string;
|
|
2905
|
-
/**
|
|
2906
|
-
* - The product suite associated with the
|
|
2907
|
-
* subscription.
|
|
2908
|
-
*/
|
|
2909
|
-
product_suite?: string;
|
|
2910
|
-
/**
|
|
2911
|
-
* - The ID of the plan to be activated for the subscription.
|
|
2912
|
-
*/
|
|
2913
|
-
plan_id?: string;
|
|
2914
|
-
/**
|
|
2915
|
-
* - The payment method ID to be used for
|
|
2916
|
-
* this subscription.
|
|
2917
|
-
*/
|
|
2918
|
-
payment_method?: string;
|
|
2919
|
-
/**
|
|
2920
|
-
* - The ID of the subscription to be
|
|
2921
|
-
* activated, if applicable.
|
|
2922
|
-
*/
|
|
2923
|
-
subscription_id?: string;
|
|
2924
|
-
/**
|
|
2925
|
-
* - A coupon code for applying discounts, if applicable.
|
|
2926
|
-
*/
|
|
2927
|
-
coupon?: string;
|
|
2928
|
-
/**
|
|
2929
|
-
* - Additional metadata related to the subscription
|
|
2930
|
-
* activation request.
|
|
2931
|
-
*/
|
|
2932
|
-
meta?: any;
|
|
2933
|
-
};
|
|
2934
|
-
/** @returns {SubscriptionActivateRes} */
|
|
2935
|
-
declare function SubscriptionActivateRes(): SubscriptionActivateRes;
|
|
2936
|
-
type SubscriptionActivateRes = {
|
|
2937
|
-
/**
|
|
2938
|
-
* - Indicates whether the subscription activation
|
|
2939
|
-
* was successful.
|
|
2940
|
-
*/
|
|
2941
|
-
success?: boolean;
|
|
2942
|
-
data?: Subscription;
|
|
2943
|
-
};
|
|
2944
|
-
/** @returns {CancelSubscriptionReq} */
|
|
2945
|
-
declare function CancelSubscriptionReq(): CancelSubscriptionReq;
|
|
2946
|
-
type CancelSubscriptionReq = {
|
|
2947
|
-
/**
|
|
2948
|
-
* - A unique identifier for the subscription
|
|
2949
|
-
* cancellation request like company id.
|
|
2950
|
-
*/
|
|
2951
|
-
unique_id?: string;
|
|
2952
|
-
/**
|
|
2953
|
-
* - The type of subscription to be canceled, e.g.,
|
|
2954
|
-
* company or developer.
|
|
2955
|
-
*/
|
|
2956
|
-
type?: string;
|
|
2957
|
-
/**
|
|
2958
|
-
* - The product suite associated with the
|
|
2959
|
-
* subscription to be canceled.
|
|
2960
|
-
*/
|
|
2961
|
-
product_suite?: string;
|
|
2962
|
-
/**
|
|
2963
|
-
* - The ID of the subscription to be canceled.
|
|
2964
|
-
*/
|
|
2965
|
-
subscription_id?: string;
|
|
2966
|
-
};
|
|
2967
|
-
/** @returns {CancelSubscriptionRes} */
|
|
2968
|
-
declare function CancelSubscriptionRes(): CancelSubscriptionRes;
|
|
2969
|
-
type CancelSubscriptionRes = {
|
|
2970
|
-
success?: boolean;
|
|
2971
|
-
data?: Subscription;
|
|
2972
|
-
};
|
|
2973
|
-
/** @returns {PlanStatusUpdateReq} */
|
|
2974
|
-
declare function PlanStatusUpdateReq(): PlanStatusUpdateReq;
|
|
2975
|
-
type PlanStatusUpdateReq = {
|
|
2976
|
-
/**
|
|
2977
|
-
* - The identifier of the plan whose status is
|
|
2978
|
-
* being updated.
|
|
2979
|
-
*/
|
|
2980
|
-
plan_id?: string;
|
|
2981
|
-
/**
|
|
2982
|
-
* - The reason for updating the plan status.
|
|
2983
|
-
*/
|
|
2984
|
-
reason?: string;
|
|
2985
|
-
/**
|
|
2986
|
-
* - The new status of the plan as set by the
|
|
2987
|
-
* seller (e.g., approved, rejected, pending).
|
|
2988
|
-
*/
|
|
2989
|
-
seller_status?: string;
|
|
2990
|
-
};
|
|
2991
|
-
/** @returns {SubscribePlan} */
|
|
2992
|
-
declare function SubscribePlan(): SubscribePlan;
|
|
2993
|
-
type SubscribePlan = {
|
|
2994
|
-
/**
|
|
2995
|
-
* - The type of entity for which the plan is
|
|
2996
|
-
* being subscribed (e.g., subscription, extension).
|
|
2997
|
-
*/
|
|
2998
|
-
entity_type?: string;
|
|
2999
|
-
/**
|
|
3000
|
-
* - The method of collection for the
|
|
3001
|
-
* subscription (e.g., online, offline).
|
|
3002
|
-
*/
|
|
3003
|
-
collection_type?: string;
|
|
3004
|
-
/**
|
|
3005
|
-
* - The identifier of the plan to subscribe to.
|
|
3006
|
-
*/
|
|
3007
|
-
plan_id?: string;
|
|
3008
|
-
/**
|
|
3009
|
-
* - URL to which the payment result will be sent
|
|
3010
|
-
*/
|
|
3011
|
-
callback_url?: string;
|
|
3012
|
-
meta?: Meta;
|
|
3013
|
-
};
|
|
3014
|
-
/** @returns {Meta} */
|
|
3015
|
-
declare function Meta(): Meta;
|
|
3016
|
-
type Meta = {
|
|
3017
|
-
/**
|
|
3018
|
-
* - Indicates whether the subscription is being
|
|
3019
|
-
* initiated.
|
|
3020
|
-
*/
|
|
3021
|
-
subscribe?: boolean;
|
|
3022
|
-
/**
|
|
3023
|
-
* - Indicates if the plan is a custom plan
|
|
3024
|
-
* rather than a standard one.
|
|
3025
|
-
*/
|
|
3026
|
-
is_custom_plan?: boolean;
|
|
3027
|
-
/**
|
|
3028
|
-
* - Indicates whether this subscription
|
|
3029
|
-
* is an upgrade from a previous plan.
|
|
3030
|
-
*/
|
|
3031
|
-
is_plan_upgrade?: boolean;
|
|
3032
|
-
};
|
|
3033
|
-
/** @returns {SubscribePlanRes} */
|
|
3034
|
-
declare function SubscribePlanRes(): SubscribePlanRes;
|
|
3035
|
-
type SubscribePlanRes = {
|
|
3036
|
-
/**
|
|
3037
|
-
* - The URL to which the user should be
|
|
3038
|
-
* redirected after completion of subscription process.
|
|
3039
|
-
*/
|
|
3040
|
-
redirect_url?: string;
|
|
3041
|
-
/**
|
|
3042
|
-
* - The unique identifier for the
|
|
3043
|
-
* subscription transaction.
|
|
3044
|
-
*/
|
|
3045
|
-
transaction_id?: string;
|
|
3046
|
-
/**
|
|
3047
|
-
* - The current status of the subscription
|
|
3048
|
-
* process (e.g., initiated, success, failed).
|
|
3049
|
-
*/
|
|
3050
|
-
current_status?: string;
|
|
3051
|
-
meta?: Meta;
|
|
3052
|
-
};
|
|
3053
|
-
/** @returns {EntityDetail} */
|
|
3054
|
-
declare function EntityDetail(): EntityDetail;
|
|
3055
|
-
type EntityDetail = {
|
|
3056
|
-
/**
|
|
3057
|
-
* - Specifies the type of entity (e.g., subscription, user).
|
|
3058
|
-
*/
|
|
3059
|
-
entity?: string;
|
|
3060
|
-
item?: Subscription;
|
|
3061
|
-
};
|
|
3062
|
-
/** @returns {PaymentOptions} */
|
|
3063
|
-
declare function PaymentOptions(): PaymentOptions;
|
|
3064
|
-
type PaymentOptions = {
|
|
3065
|
-
/**
|
|
3066
|
-
* - Unique identifier for the payment option.
|
|
3067
|
-
*/
|
|
3068
|
-
_id?: string;
|
|
3069
|
-
/**
|
|
3070
|
-
* - Name of the payment option.
|
|
3071
|
-
*/
|
|
3072
|
-
name?: string;
|
|
3073
|
-
/**
|
|
3074
|
-
* - Brief description of the payment option's
|
|
3075
|
-
* functionality.
|
|
3076
|
-
*/
|
|
3077
|
-
description?: string;
|
|
3078
|
-
/**
|
|
3079
|
-
* - URL of the payment option's logo like upi logo.
|
|
3080
|
-
*/
|
|
3081
|
-
logo?: string;
|
|
3082
|
-
/**
|
|
3083
|
-
* - Unique identifier for the payment aggregator.
|
|
3084
|
-
*/
|
|
3085
|
-
aggregator_id?: string;
|
|
3086
|
-
/**
|
|
3087
|
-
* - Identifier for the payment aggregator system.
|
|
3088
|
-
*/
|
|
3089
|
-
aggregator?: string;
|
|
3090
|
-
/**
|
|
3091
|
-
* - Date and time when the payment option was created.
|
|
3092
|
-
*/
|
|
3093
|
-
created_at?: string;
|
|
3094
|
-
/**
|
|
3095
|
-
* - Date and time when the payment option was
|
|
3096
|
-
* last modified.
|
|
3097
|
-
*/
|
|
3098
|
-
modified_at?: string;
|
|
3099
|
-
/**
|
|
3100
|
-
* - Version key for document revision control.
|
|
3101
|
-
*/
|
|
3102
|
-
__v?: number;
|
|
3103
|
-
};
|
|
3104
|
-
/** @returns {VerifyPaymentReq} */
|
|
3105
|
-
declare function VerifyPaymentReq(): VerifyPaymentReq;
|
|
3106
|
-
type VerifyPaymentReq = {
|
|
3107
|
-
/**
|
|
3108
|
-
* - Unique identifier for the Razorpay payment.
|
|
3109
|
-
*/
|
|
3110
|
-
razorpay_payment_id?: string;
|
|
3111
|
-
/**
|
|
3112
|
-
* - Unique identifier for the Razorpay order.
|
|
3113
|
-
*/
|
|
3114
|
-
razorpay_order_id?: string;
|
|
3115
|
-
/**
|
|
3116
|
-
* - Signature generated by Razorpay to
|
|
3117
|
-
* verify the payment.
|
|
3118
|
-
*/
|
|
3119
|
-
razorpay_signature?: string;
|
|
3120
|
-
/**
|
|
3121
|
-
* - HTTP status code of the payment
|
|
3122
|
-
* verification response.
|
|
3123
|
-
*/
|
|
3124
|
-
status_code?: number;
|
|
3125
|
-
/**
|
|
3126
|
-
* - The payment provider used for the transaction.
|
|
3127
|
-
*/
|
|
3128
|
-
provider_type?: string;
|
|
3129
|
-
};
|
|
3130
|
-
/** @returns {Documents} */
|
|
3131
|
-
declare function Documents(): Documents;
|
|
3132
|
-
type Documents = {
|
|
3133
|
-
/**
|
|
3134
|
-
* - Permanent Account Number (PAN) used for tax purposes.
|
|
3135
|
-
*/
|
|
3136
|
-
pan?: string;
|
|
3137
|
-
/**
|
|
3138
|
-
* - Goods and Services Tax (GST) number for business taxation.
|
|
3139
|
-
*/
|
|
3140
|
-
gst?: string;
|
|
3141
|
-
};
|
|
3142
|
-
/** @returns {BillingAddress} */
|
|
3143
|
-
declare function BillingAddress(): BillingAddress;
|
|
3144
|
-
type BillingAddress = {
|
|
3145
|
-
/**
|
|
3146
|
-
* - The country where the billing address is located.
|
|
3147
|
-
*/
|
|
3148
|
-
country?: string;
|
|
3149
|
-
/**
|
|
3150
|
-
* - The state or region within the country.
|
|
3151
|
-
*/
|
|
3152
|
-
state?: string;
|
|
3153
|
-
/**
|
|
3154
|
-
* - The city of the billing address.
|
|
3155
|
-
*/
|
|
3156
|
-
city?: string;
|
|
3157
|
-
/**
|
|
3158
|
-
* - The first line of the billing address.
|
|
3159
|
-
*/
|
|
3160
|
-
line1?: string;
|
|
3161
|
-
/**
|
|
3162
|
-
* - The second line of the billing address (if applicable).
|
|
3163
|
-
*/
|
|
3164
|
-
line2?: string;
|
|
3165
|
-
/**
|
|
3166
|
-
* - The ZIP code of the billing address.
|
|
3167
|
-
*/
|
|
3168
|
-
postal_code?: string;
|
|
3169
|
-
/**
|
|
3170
|
-
* - ISO country code for the country of the
|
|
3171
|
-
* billing address.
|
|
3172
|
-
*/
|
|
3173
|
-
country_code?: string;
|
|
3174
|
-
};
|
|
3175
|
-
/** @returns {Currency} */
|
|
3176
|
-
declare function Currency(): Currency;
|
|
3177
|
-
type Currency = {
|
|
3178
|
-
/**
|
|
3179
|
-
* - Currency code as per ISO 4217.
|
|
3180
|
-
*/
|
|
3181
|
-
code?: string;
|
|
3182
|
-
/**
|
|
3183
|
-
* - Symbol representing the currency.
|
|
3184
|
-
*/
|
|
3185
|
-
symbol?: string;
|
|
3186
|
-
/**
|
|
3187
|
-
* - Full name of the currency.
|
|
3188
|
-
*/
|
|
3189
|
-
name?: string;
|
|
3190
|
-
};
|
|
3191
|
-
/** @returns {BusinessCountryInfo} */
|
|
3192
|
-
declare function BusinessCountryInfo(): BusinessCountryInfo;
|
|
3193
|
-
type BusinessCountryInfo = {
|
|
3194
|
-
/**
|
|
3195
|
-
* - The country where the business is registered.
|
|
3196
|
-
*/
|
|
3197
|
-
country?: string;
|
|
3198
|
-
/**
|
|
3199
|
-
* - ISO country code for the business's country.
|
|
3200
|
-
*/
|
|
3201
|
-
country_code?: string;
|
|
3202
|
-
currency?: Currency;
|
|
3203
|
-
/**
|
|
3204
|
-
* - Timezone in which the business operates.
|
|
3205
|
-
*/
|
|
3206
|
-
timezone?: string;
|
|
3207
|
-
};
|
|
3208
|
-
/** @returns {SubscriberData} */
|
|
3209
|
-
declare function SubscriberData(): SubscriberData;
|
|
3210
|
-
type SubscriberData = {
|
|
3211
|
-
/**
|
|
3212
|
-
* - Indicates if the user exists in the
|
|
3213
|
-
* payment gateway system.
|
|
3214
|
-
*/
|
|
3215
|
-
pg_user_exists?: boolean;
|
|
3216
|
-
/**
|
|
3217
|
-
* - Unique identifier for the subscriber.
|
|
3218
|
-
*/
|
|
3219
|
-
id?: string;
|
|
3220
|
-
/**
|
|
3221
|
-
* - Unique customer ID assigned by the
|
|
3222
|
-
* payment gateway.
|
|
3223
|
-
*/
|
|
3224
|
-
pg_customer_id?: string;
|
|
3225
|
-
/**
|
|
3226
|
-
* - Identifier for the default
|
|
3227
|
-
* payment method used by the subscriber.
|
|
3228
|
-
*/
|
|
3229
|
-
default_payment_method?: string;
|
|
3230
|
-
};
|
|
3231
|
-
/** @returns {Subscriber} */
|
|
3232
|
-
declare function Subscriber(): Subscriber;
|
|
3233
|
-
type Subscriber = {
|
|
3234
|
-
documents?: Documents;
|
|
3235
|
-
/**
|
|
3236
|
-
* - Contact information for the subscriber, such as
|
|
3237
|
-
* phone number.
|
|
3238
|
-
*/
|
|
3239
|
-
phone?: any;
|
|
3240
|
-
billing_address?: BillingAddress;
|
|
3241
|
-
/**
|
|
3242
|
-
* - Indicates whether the subscriber has given
|
|
3243
|
-
* consent for processing.
|
|
3244
|
-
*/
|
|
3245
|
-
consent?: boolean;
|
|
3246
|
-
/**
|
|
3247
|
-
* - Indicates whether the subscriber has opted in
|
|
3248
|
-
* for communications.
|
|
3249
|
-
*/
|
|
3250
|
-
comms?: boolean;
|
|
3251
|
-
/**
|
|
3252
|
-
* - Unique identifier for the subscriber in the system.
|
|
3253
|
-
*/
|
|
3254
|
-
_id?: string;
|
|
3255
|
-
/**
|
|
3256
|
-
* - The type of the subscriber, such as 'individual'
|
|
3257
|
-
* or 'company'.
|
|
3258
|
-
*/
|
|
3259
|
-
type?: string;
|
|
3260
|
-
/**
|
|
3261
|
-
* - A unique identifier assigned to the subscriber.
|
|
3262
|
-
*/
|
|
3263
|
-
unique_id?: string;
|
|
3264
|
-
/**
|
|
3265
|
-
* - The name of the subscriber.
|
|
3266
|
-
*/
|
|
3267
|
-
name?: string;
|
|
3268
|
-
/**
|
|
3269
|
-
* - Email address of the subscriber.
|
|
3270
|
-
*/
|
|
3271
|
-
email?: string;
|
|
3272
|
-
business_country_info?: BusinessCountryInfo;
|
|
3273
|
-
/**
|
|
3274
|
-
* - The date and time when the subscriber was created.
|
|
3275
|
-
*/
|
|
3276
|
-
created_at?: string;
|
|
3277
|
-
/**
|
|
3278
|
-
* - The date and time when the subscriber
|
|
3279
|
-
* details were last modified.
|
|
3280
|
-
*/
|
|
3281
|
-
modified_at?: string;
|
|
3282
|
-
/**
|
|
3283
|
-
* - The current credit balance for the
|
|
3284
|
-
* subscriber, if any.
|
|
3285
|
-
*/
|
|
3286
|
-
credit_balance?: number;
|
|
3287
|
-
data?: SubscriberData;
|
|
3288
|
-
};
|
|
3289
|
-
/** @returns {AuthorModifiedDetails} */
|
|
3290
|
-
declare function AuthorModifiedDetails(): AuthorModifiedDetails;
|
|
3291
|
-
type AuthorModifiedDetails = {
|
|
3292
|
-
/**
|
|
3293
|
-
* - The first name of the author who made modifications.
|
|
3294
|
-
*/
|
|
3295
|
-
first_name?: string;
|
|
3296
|
-
/**
|
|
3297
|
-
* - The last name of the author who made modifications.
|
|
3298
|
-
*/
|
|
3299
|
-
last_name?: string;
|
|
3300
|
-
/**
|
|
3301
|
-
* - Indicates whether the author has
|
|
3302
|
-
* administrative privileges.
|
|
3303
|
-
*/
|
|
3304
|
-
is_admin?: boolean;
|
|
3305
|
-
};
|
|
3306
|
-
/** @returns {Author} */
|
|
3307
|
-
declare function Author(): Author;
|
|
3308
|
-
type Author = {
|
|
3309
|
-
modified_by_details?: AuthorModifiedDetails;
|
|
3310
|
-
/**
|
|
3311
|
-
* - Identifier of the user who created the record.
|
|
3312
|
-
*/
|
|
3313
|
-
created_by?: string;
|
|
3314
|
-
/**
|
|
3315
|
-
* - Identifier of the user who last modified the record.
|
|
3316
|
-
*/
|
|
3317
|
-
modified_by?: string;
|
|
3318
|
-
};
|
|
3319
|
-
/** @returns {EndingBalance} */
|
|
3320
|
-
declare function EndingBalance(): EndingBalance;
|
|
3321
|
-
type EndingBalance = {
|
|
3322
|
-
/**
|
|
3323
|
-
* - The ending balance amount.
|
|
3324
|
-
*/
|
|
3325
|
-
amount?: number;
|
|
3326
|
-
/**
|
|
3327
|
-
* - Reference to the previous entry if applicable.
|
|
3328
|
-
*/
|
|
3329
|
-
old_entry_ref?: string;
|
|
3330
|
-
};
|
|
3331
|
-
/** @returns {PaymentData} */
|
|
3332
|
-
declare function PaymentData(): PaymentData;
|
|
3333
|
-
type PaymentData = {
|
|
3334
|
-
/**
|
|
3335
|
-
* - The unique identifier for the transaction.
|
|
3336
|
-
*/
|
|
3337
|
-
transaction_id?: string;
|
|
3338
|
-
/**
|
|
3339
|
-
* - The payment aggregator used for the transaction.
|
|
3340
|
-
*/
|
|
3341
|
-
aggregator?: string;
|
|
3342
|
-
/**
|
|
3343
|
-
* - The order ID generated by the
|
|
3344
|
-
* payment aggregator.
|
|
3345
|
-
*/
|
|
3346
|
-
aggregator_order_id?: string;
|
|
3347
|
-
/**
|
|
3348
|
-
* - The date and time when the receipt was generated.
|
|
3349
|
-
*/
|
|
3350
|
-
receipt_date?: string;
|
|
3351
|
-
/**
|
|
3352
|
-
* - A unique reference for
|
|
3353
|
-
* the transaction.
|
|
3354
|
-
*/
|
|
3355
|
-
unique_transaction_reference?: string;
|
|
3356
|
-
};
|
|
3357
|
-
/** @returns {CreditTransaction} */
|
|
3358
|
-
declare function CreditTransaction(): CreditTransaction;
|
|
3359
|
-
type CreditTransaction = {
|
|
3360
|
-
/**
|
|
3361
|
-
* - The entity associated with the transaction.
|
|
3362
|
-
*/
|
|
3363
|
-
entity?: any;
|
|
3364
|
-
author?: Author;
|
|
3365
|
-
/**
|
|
3366
|
-
* - The unique identifier for the credit transaction.
|
|
3367
|
-
*/
|
|
3368
|
-
_id?: string;
|
|
3369
|
-
/**
|
|
3370
|
-
* - The amount credited in the transaction.
|
|
3371
|
-
*/
|
|
3372
|
-
amount?: number;
|
|
3373
|
-
/**
|
|
3374
|
-
* - The currency of the transaction amount.
|
|
3375
|
-
*/
|
|
3376
|
-
currency?: string;
|
|
3377
|
-
/**
|
|
3378
|
-
* - The unique identifier of the subscriber
|
|
3379
|
-
* involved in the transaction.
|
|
3380
|
-
*/
|
|
3381
|
-
subscriber_id?: string;
|
|
3382
|
-
/**
|
|
3383
|
-
* - A brief description of the transaction.
|
|
3384
|
-
*/
|
|
3385
|
-
description?: string;
|
|
3386
|
-
/**
|
|
3387
|
-
* - Indicates if the transaction is a test transaction.
|
|
3388
|
-
*/
|
|
3389
|
-
is_test?: string;
|
|
3390
|
-
ending_balance?: EndingBalance;
|
|
3391
|
-
payment?: PaymentData;
|
|
3392
|
-
/**
|
|
3393
|
-
* - The type of credit transaction.
|
|
3394
|
-
*/
|
|
3395
|
-
type?: string;
|
|
3396
|
-
/**
|
|
3397
|
-
* - The date and time when the transaction was created.
|
|
3398
|
-
*/
|
|
3399
|
-
created_at?: string;
|
|
3400
|
-
/**
|
|
3401
|
-
* - The date and time when the transaction was
|
|
3402
|
-
* last modified.
|
|
3403
|
-
*/
|
|
3404
|
-
modified_at?: string;
|
|
3405
|
-
};
|
|
3406
|
-
/** @returns {VerifyPaymentData} */
|
|
3407
|
-
declare function VerifyPaymentData(): VerifyPaymentData;
|
|
3408
|
-
type VerifyPaymentData = {
|
|
3409
|
-
/**
|
|
3410
|
-
* - Indicates if the payment verification was successful.
|
|
3411
|
-
*/
|
|
3412
|
-
success?: boolean;
|
|
3413
|
-
subscriber?: Subscriber;
|
|
3414
|
-
credit_transaction?: CreditTransaction;
|
|
3415
|
-
};
|
|
3416
|
-
/** @returns {VerifyPaymentRes} */
|
|
3417
|
-
declare function VerifyPaymentRes(): VerifyPaymentRes;
|
|
3418
|
-
type VerifyPaymentRes = {
|
|
3419
|
-
/**
|
|
3420
|
-
* - The status of the payment verification.
|
|
325
|
+
* - Current status of the charge.
|
|
3421
326
|
*/
|
|
3422
327
|
status?: string;
|
|
3423
|
-
data?: VerifyPaymentData;
|
|
3424
|
-
};
|
|
3425
|
-
/** @returns {DefaultMerchants} */
|
|
3426
|
-
declare function DefaultMerchants(): DefaultMerchants;
|
|
3427
|
-
type DefaultMerchants = {
|
|
3428
328
|
/**
|
|
3429
|
-
* -
|
|
329
|
+
* - Maximum amount that can be charged, if applicable.
|
|
3430
330
|
*/
|
|
3431
|
-
|
|
3432
|
-
};
|
|
3433
|
-
/** @returns {GlobalSettingsPayment} */
|
|
3434
|
-
declare function GlobalSettingsPayment(): GlobalSettingsPayment;
|
|
3435
|
-
type GlobalSettingsPayment = {
|
|
3436
|
-
default_merchants?: DefaultMerchants;
|
|
3437
|
-
};
|
|
3438
|
-
/** @returns {GlobalSettingsData} */
|
|
3439
|
-
declare function GlobalSettingsData(): GlobalSettingsData;
|
|
3440
|
-
type GlobalSettingsData = {
|
|
3441
|
-
payment?: GlobalSettingsPayment;
|
|
331
|
+
capped_amount?: number;
|
|
3442
332
|
/**
|
|
3443
|
-
* -
|
|
333
|
+
* - Date and time when the charge was activated.
|
|
3444
334
|
*/
|
|
3445
|
-
|
|
335
|
+
activated_on?: string;
|
|
3446
336
|
/**
|
|
3447
|
-
* -
|
|
337
|
+
* - Date and time when the charge was cancelled.
|
|
3448
338
|
*/
|
|
3449
|
-
|
|
339
|
+
cancelled_on?: string;
|
|
3450
340
|
/**
|
|
3451
|
-
* -
|
|
3452
|
-
* were created.
|
|
341
|
+
* - Date and time when the charge was billed.
|
|
3453
342
|
*/
|
|
3454
|
-
|
|
343
|
+
billing_date?: string;
|
|
344
|
+
current_period?: SubscriptionTrialPeriod;
|
|
3455
345
|
/**
|
|
3456
|
-
* -
|
|
3457
|
-
*
|
|
346
|
+
* - Date and time when the charge details were
|
|
347
|
+
* last modified.
|
|
3458
348
|
*/
|
|
3459
349
|
modified_at?: string;
|
|
3460
|
-
};
|
|
3461
|
-
/** @returns {GlobalSettings} */
|
|
3462
|
-
declare function GlobalSettings(): GlobalSettings;
|
|
3463
|
-
type GlobalSettings = {
|
|
3464
|
-
/**
|
|
3465
|
-
* - The status of the global settings retrieval.
|
|
3466
|
-
*/
|
|
3467
|
-
status?: string;
|
|
3468
|
-
data?: GlobalSettingsData;
|
|
3469
|
-
};
|
|
3470
|
-
/** @returns {MethodChecks} */
|
|
3471
|
-
declare function MethodChecks(): MethodChecks;
|
|
3472
|
-
type MethodChecks = {
|
|
3473
|
-
/**
|
|
3474
|
-
* - Result of the address line 1 check.
|
|
3475
|
-
*/
|
|
3476
|
-
address_line1_check?: string;
|
|
3477
|
-
/**
|
|
3478
|
-
* - Result of the address postal
|
|
3479
|
-
* code check.
|
|
3480
|
-
*/
|
|
3481
|
-
address_postal_code_check?: string;
|
|
3482
|
-
/**
|
|
3483
|
-
* - Result of the CVC check.
|
|
3484
|
-
*/
|
|
3485
|
-
cvc_check?: string;
|
|
3486
|
-
};
|
|
3487
|
-
/** @returns {MethodNetworks} */
|
|
3488
|
-
declare function MethodNetworks(): MethodNetworks;
|
|
3489
|
-
type MethodNetworks = {
|
|
3490
|
-
/**
|
|
3491
|
-
* - List of available networks for the payment method.
|
|
3492
|
-
*/
|
|
3493
|
-
available?: string[];
|
|
3494
|
-
/**
|
|
3495
|
-
* - Preferred network for the payment method.
|
|
3496
|
-
*/
|
|
3497
|
-
preferred?: string;
|
|
3498
|
-
};
|
|
3499
|
-
/** @returns {MethodSecureUsage} */
|
|
3500
|
-
declare function MethodSecureUsage(): MethodSecureUsage;
|
|
3501
|
-
type MethodSecureUsage = {
|
|
3502
|
-
/**
|
|
3503
|
-
* - Indicates if 3D Secure is supported for the
|
|
3504
|
-
* payment method.
|
|
3505
|
-
*/
|
|
3506
|
-
supported?: boolean;
|
|
3507
|
-
};
|
|
3508
|
-
/** @returns {MethodDetails} */
|
|
3509
|
-
declare function MethodDetails(): MethodDetails;
|
|
3510
|
-
type MethodDetails = {
|
|
3511
|
-
/**
|
|
3512
|
-
* - Unique identifier for the payment method.
|
|
3513
|
-
*/
|
|
3514
|
-
id?: string;
|
|
3515
|
-
/**
|
|
3516
|
-
* - Type of payment method.
|
|
3517
|
-
*/
|
|
3518
|
-
type?: string;
|
|
3519
|
-
/**
|
|
3520
|
-
* - Indicates if a mandate is available
|
|
3521
|
-
* for the payment method.
|
|
3522
|
-
*/
|
|
3523
|
-
mandate_available?: boolean;
|
|
3524
|
-
/**
|
|
3525
|
-
* - Mandate amount for the payment method.
|
|
3526
|
-
*/
|
|
3527
|
-
mandate_amount?: number;
|
|
3528
|
-
/**
|
|
3529
|
-
* - Payment gateway's payment method
|
|
3530
|
-
* identifier.
|
|
3531
|
-
*/
|
|
3532
|
-
pg_payment_method_id?: string;
|
|
3533
|
-
/**
|
|
3534
|
-
* - Indicates if the payment method is the default.
|
|
3535
|
-
*/
|
|
3536
|
-
is_default?: boolean;
|
|
3537
|
-
data?: SubscriptionMethodData;
|
|
3538
|
-
};
|
|
3539
|
-
/** @returns {SubscriptionMethodData} */
|
|
3540
|
-
declare function SubscriptionMethodData(): SubscriptionMethodData;
|
|
3541
|
-
type SubscriptionMethodData = {
|
|
3542
|
-
/**
|
|
3543
|
-
* - Brand of the payment method.
|
|
3544
|
-
*/
|
|
3545
|
-
brand?: string;
|
|
3546
|
-
checks?: MethodChecks;
|
|
3547
|
-
/**
|
|
3548
|
-
* - Country of the payment method.
|
|
3549
|
-
*/
|
|
3550
|
-
country?: string;
|
|
3551
|
-
/**
|
|
3552
|
-
* - Expiration month of the payment method.
|
|
3553
|
-
*/
|
|
3554
|
-
exp_month?: number;
|
|
3555
|
-
/**
|
|
3556
|
-
* - Expiration year of the payment method.
|
|
3557
|
-
*/
|
|
3558
|
-
exp_year?: number;
|
|
3559
|
-
/**
|
|
3560
|
-
* - Fingerprint of the payment method.
|
|
3561
|
-
*/
|
|
3562
|
-
fingerprint?: string;
|
|
3563
|
-
/**
|
|
3564
|
-
* - Funding type of the payment method.
|
|
3565
|
-
*/
|
|
3566
|
-
funding?: string;
|
|
3567
|
-
/**
|
|
3568
|
-
* - Source from which the payment method
|
|
3569
|
-
* was generated.
|
|
3570
|
-
*/
|
|
3571
|
-
generated_from?: string;
|
|
3572
|
-
/**
|
|
3573
|
-
* - Last 4 digits of the payment method.
|
|
3574
|
-
*/
|
|
3575
|
-
last4?: string;
|
|
3576
|
-
networks?: MethodNetworks;
|
|
3577
|
-
three_d_secure_usage?: MethodSecureUsage;
|
|
3578
|
-
/**
|
|
3579
|
-
* - Wallet associated with the payment method.
|
|
3580
|
-
*/
|
|
3581
|
-
wallet?: string;
|
|
3582
|
-
/**
|
|
3583
|
-
* - Name associated with the payment method.
|
|
3584
|
-
*/
|
|
3585
|
-
name?: string;
|
|
3586
|
-
/**
|
|
3587
|
-
* - Indicates if the payment method is the default.
|
|
3588
|
-
*/
|
|
3589
|
-
is_default?: boolean;
|
|
3590
|
-
};
|
|
3591
|
-
/** @returns {SubscriptionMethods} */
|
|
3592
|
-
declare function SubscriptionMethods(): SubscriptionMethods;
|
|
3593
|
-
type SubscriptionMethods = {
|
|
3594
|
-
/**
|
|
3595
|
-
* - Indicates if the retrieval of subscription
|
|
3596
|
-
* methods was successful.
|
|
3597
|
-
*/
|
|
3598
|
-
success?: boolean;
|
|
3599
350
|
/**
|
|
3600
|
-
* -
|
|
3601
|
-
*/
|
|
3602
|
-
data?: MethodDetails[];
|
|
3603
|
-
};
|
|
3604
|
-
/** @returns {ConfigPublicKey} */
|
|
3605
|
-
declare function ConfigPublicKey(): ConfigPublicKey;
|
|
3606
|
-
type ConfigPublicKey = {
|
|
3607
|
-
/**
|
|
3608
|
-
* - Public key for the payment aggregator.
|
|
3609
|
-
*/
|
|
3610
|
-
public_key?: string;
|
|
3611
|
-
};
|
|
3612
|
-
/** @returns {ConfigRes} */
|
|
3613
|
-
declare function ConfigRes(): ConfigRes;
|
|
3614
|
-
type ConfigRes = {
|
|
3615
|
-
/**
|
|
3616
|
-
* - Indicates if the retrieval of configuration
|
|
3617
|
-
* was successful.
|
|
3618
|
-
*/
|
|
3619
|
-
success?: boolean;
|
|
3620
|
-
/**
|
|
3621
|
-
* - The payment aggregator.
|
|
3622
|
-
*/
|
|
3623
|
-
aggregator?: string;
|
|
3624
|
-
config?: ConfigPublicKey;
|
|
3625
|
-
};
|
|
3626
|
-
/** @returns {PlanChangeData} */
|
|
3627
|
-
declare function PlanChangeData(): PlanChangeData;
|
|
3628
|
-
type PlanChangeData = {
|
|
3629
|
-
/**
|
|
3630
|
-
* - The total amount after the plan change.
|
|
3631
|
-
*/
|
|
3632
|
-
total?: number;
|
|
3633
|
-
/**
|
|
3634
|
-
* - The amount credited due to the plan change.
|
|
3635
|
-
*/
|
|
3636
|
-
credit_note_amount?: number;
|
|
3637
|
-
/**
|
|
3638
|
-
* - The settlement amount for the plan change.
|
|
3639
|
-
*/
|
|
3640
|
-
settlement?: number;
|
|
3641
|
-
/**
|
|
3642
|
-
* - The taxable amount for the plan change.
|
|
3643
|
-
*/
|
|
3644
|
-
taxable_amount?: number;
|
|
3645
|
-
/**
|
|
3646
|
-
* - The GST amount for the plan change.
|
|
3647
|
-
*/
|
|
3648
|
-
gst_amount?: number;
|
|
3649
|
-
/**
|
|
3650
|
-
* - The gross total amount for the plan change.
|
|
3651
|
-
*/
|
|
3652
|
-
gross_total?: number;
|
|
3653
|
-
/**
|
|
3654
|
-
* - The GST for the plan change.
|
|
3655
|
-
*/
|
|
3656
|
-
gst?: number;
|
|
3657
|
-
/**
|
|
3658
|
-
* - The discount amount applied to the plan change.
|
|
3659
|
-
*/
|
|
3660
|
-
discount?: number;
|
|
3661
|
-
};
|
|
3662
|
-
/** @returns {PlanChangeDetails} */
|
|
3663
|
-
declare function PlanChangeDetails(): PlanChangeDetails;
|
|
3664
|
-
type PlanChangeDetails = {
|
|
3665
|
-
/**
|
|
3666
|
-
* - Status of the plan change.
|
|
3667
|
-
*/
|
|
3668
|
-
status?: string;
|
|
3669
|
-
data?: PlanChangeData;
|
|
3670
|
-
};
|
|
3671
|
-
/** @returns {TransactionMeta} */
|
|
3672
|
-
declare function TransactionMeta(): TransactionMeta;
|
|
3673
|
-
type TransactionMeta = {
|
|
3674
|
-
/**
|
|
3675
|
-
* - Invoice ID associated with the transaction.
|
|
3676
|
-
*/
|
|
3677
|
-
invoice_id?: string;
|
|
3678
|
-
};
|
|
3679
|
-
/** @returns {PaymentTransactionDetails} */
|
|
3680
|
-
declare function PaymentTransactionDetails(): PaymentTransactionDetails;
|
|
3681
|
-
type PaymentTransactionDetails = {
|
|
3682
|
-
/**
|
|
3683
|
-
* - Payment aggregator details.
|
|
3684
|
-
*/
|
|
3685
|
-
aggregator?: any;
|
|
3686
|
-
/**
|
|
3687
|
-
* - Currency used in the transaction.
|
|
3688
|
-
*/
|
|
3689
|
-
currency?: string;
|
|
3690
|
-
/**
|
|
3691
|
-
* - Current status of the transaction.
|
|
3692
|
-
*/
|
|
3693
|
-
current_status?: string;
|
|
3694
|
-
/**
|
|
3695
|
-
* - Unique identifier for the payment transaction.
|
|
3696
|
-
*/
|
|
3697
|
-
_id?: string;
|
|
3698
|
-
/**
|
|
3699
|
-
* - Unique identifier for the subscriber.
|
|
3700
|
-
*/
|
|
3701
|
-
subscriber_id?: string;
|
|
3702
|
-
/**
|
|
3703
|
-
* - Amount involved in the transaction.
|
|
3704
|
-
*/
|
|
3705
|
-
amount?: number;
|
|
3706
|
-
/**
|
|
3707
|
-
* - Type of entity involved in the transaction.
|
|
3708
|
-
*/
|
|
3709
|
-
entity_type?: string;
|
|
3710
|
-
/**
|
|
3711
|
-
* - Type of collection for the transaction.
|
|
3712
|
-
*/
|
|
3713
|
-
collection_type?: string;
|
|
3714
|
-
meta?: TransactionMeta;
|
|
3715
|
-
/**
|
|
3716
|
-
* - Timestamp when the transaction was created.
|
|
351
|
+
* - Date and time when the charge was created.
|
|
3717
352
|
*/
|
|
3718
353
|
created_at?: string;
|
|
3719
354
|
/**
|
|
3720
|
-
* -
|
|
355
|
+
* - Indicates whether the charge is for testing purposes.
|
|
3721
356
|
*/
|
|
3722
|
-
|
|
3723
|
-
};
|
|
3724
|
-
/** @returns {PaymentItems} */
|
|
3725
|
-
declare function PaymentItems(): PaymentItems;
|
|
3726
|
-
type PaymentItems = {
|
|
357
|
+
is_test?: boolean;
|
|
3727
358
|
/**
|
|
3728
|
-
* -
|
|
359
|
+
* - Company id.
|
|
3729
360
|
*/
|
|
3730
|
-
|
|
361
|
+
company_id?: string;
|
|
3731
362
|
/**
|
|
3732
|
-
* -
|
|
363
|
+
* - Additional metadata associated with the charge.
|
|
3733
364
|
*/
|
|
3734
|
-
|
|
365
|
+
meta?: any;
|
|
3735
366
|
/**
|
|
3736
|
-
* -
|
|
367
|
+
* - Internal version key for the charge record.
|
|
3737
368
|
*/
|
|
3738
|
-
|
|
369
|
+
__v?: number;
|
|
3739
370
|
};
|
|
3740
|
-
/** @returns {
|
|
3741
|
-
declare function
|
|
3742
|
-
type
|
|
371
|
+
/** @returns {ResourceNotFound} */
|
|
372
|
+
declare function ResourceNotFound(): ResourceNotFound;
|
|
373
|
+
type ResourceNotFound = {
|
|
3743
374
|
/**
|
|
3744
|
-
* -
|
|
375
|
+
* - Resource not found with {id}
|
|
3745
376
|
*/
|
|
3746
|
-
|
|
377
|
+
message?: string;
|
|
378
|
+
code?: any;
|
|
379
|
+
success?: any;
|
|
3747
380
|
};
|
|
3748
|
-
/** @returns {
|
|
3749
|
-
declare function
|
|
3750
|
-
type
|
|
381
|
+
/** @returns {CreateOneTimeCharge} */
|
|
382
|
+
declare function CreateOneTimeCharge(): CreateOneTimeCharge;
|
|
383
|
+
type CreateOneTimeCharge = {
|
|
3751
384
|
/**
|
|
3752
|
-
* -
|
|
385
|
+
* - The name of the one-time charge to be created.
|
|
3753
386
|
*/
|
|
3754
|
-
|
|
387
|
+
name?: string;
|
|
388
|
+
charge?: OneTimeChargeItem;
|
|
3755
389
|
/**
|
|
3756
|
-
* -
|
|
390
|
+
* - Indicates whether the charge creation is for
|
|
391
|
+
* testing purposes.
|
|
3757
392
|
*/
|
|
3758
|
-
|
|
393
|
+
is_test?: boolean;
|
|
3759
394
|
/**
|
|
3760
|
-
* -
|
|
395
|
+
* - URL to which the user will be redirected
|
|
396
|
+
* after creating the charge.
|
|
3761
397
|
*/
|
|
3762
|
-
|
|
398
|
+
return_url?: string;
|
|
3763
399
|
};
|
|
3764
|
-
/** @returns {
|
|
3765
|
-
declare function
|
|
3766
|
-
type
|
|
3767
|
-
|
|
3768
|
-
* - ID of the setup intent.
|
|
3769
|
-
*/
|
|
3770
|
-
intent_id?: string;
|
|
400
|
+
/** @returns {CreateOneTimeChargeResponse} */
|
|
401
|
+
declare function CreateOneTimeChargeResponse(): CreateOneTimeChargeResponse;
|
|
402
|
+
type CreateOneTimeChargeResponse = {
|
|
403
|
+
charge?: Charge;
|
|
3771
404
|
/**
|
|
3772
|
-
* -
|
|
405
|
+
* - URL to which users are redirected to
|
|
406
|
+
* confirm or complete the payment or subscription process.
|
|
3773
407
|
*/
|
|
3774
|
-
|
|
408
|
+
confirm_url?: string;
|
|
3775
409
|
};
|
|
3776
|
-
/** @returns {
|
|
3777
|
-
declare function
|
|
3778
|
-
type
|
|
410
|
+
/** @returns {BadRequest} */
|
|
411
|
+
declare function BadRequest(): BadRequest;
|
|
412
|
+
type BadRequest = {
|
|
3779
413
|
/**
|
|
3780
|
-
* -
|
|
414
|
+
* - Failure message.
|
|
3781
415
|
*/
|
|
3782
|
-
|
|
416
|
+
message?: string;
|
|
417
|
+
};
|
|
418
|
+
/** @returns {CreateSubscriptionCharge} */
|
|
419
|
+
declare function CreateSubscriptionCharge(): CreateSubscriptionCharge;
|
|
420
|
+
type CreateSubscriptionCharge = {
|
|
3783
421
|
/**
|
|
3784
|
-
* -
|
|
422
|
+
* - The name of the charge.
|
|
3785
423
|
*/
|
|
3786
|
-
|
|
424
|
+
name: string;
|
|
425
|
+
trial_days?: number;
|
|
426
|
+
line_items: ChargeLineItem[];
|
|
3787
427
|
/**
|
|
3788
|
-
* -
|
|
428
|
+
* - Indicates whether the charge is for testing purposes.
|
|
3789
429
|
*/
|
|
3790
|
-
|
|
430
|
+
is_test?: boolean;
|
|
3791
431
|
/**
|
|
3792
|
-
* -
|
|
432
|
+
* - The URL passed in request which extension
|
|
433
|
+
* expects in return.
|
|
3793
434
|
*/
|
|
3794
|
-
|
|
435
|
+
return_url: string;
|
|
3795
436
|
};
|
|
3796
|
-
/** @returns {
|
|
3797
|
-
declare function
|
|
3798
|
-
type
|
|
3799
|
-
|
|
3800
|
-
* - ID of the invoice for renewal.
|
|
3801
|
-
*/
|
|
3802
|
-
invoice_id?: string;
|
|
437
|
+
/** @returns {CreateSubscriptionResponse} */
|
|
438
|
+
declare function CreateSubscriptionResponse(): CreateSubscriptionResponse;
|
|
439
|
+
type CreateSubscriptionResponse = {
|
|
440
|
+
subscription?: EntitySubscription;
|
|
3803
441
|
/**
|
|
3804
|
-
* -
|
|
442
|
+
* - URL to which users are redirected to
|
|
443
|
+
* confirm or complete the payment or subscription process.
|
|
3805
444
|
*/
|
|
3806
|
-
|
|
445
|
+
confirm_url?: string;
|
|
446
|
+
};
|
|
447
|
+
/** @returns {EntityChargePrice} */
|
|
448
|
+
declare function EntityChargePrice(): EntityChargePrice;
|
|
449
|
+
type EntityChargePrice = {
|
|
3807
450
|
/**
|
|
3808
|
-
* -
|
|
451
|
+
* - The amount for the price. The minimum value is 1.
|
|
3809
452
|
*/
|
|
3810
|
-
|
|
453
|
+
amount?: number;
|
|
3811
454
|
/**
|
|
3812
|
-
* -
|
|
455
|
+
* - The currency code for the price
|
|
3813
456
|
*/
|
|
3814
|
-
|
|
3815
|
-
meta?: RenewMeta;
|
|
457
|
+
currency_code?: string;
|
|
3816
458
|
};
|
|
3817
|
-
/** @returns {
|
|
3818
|
-
declare function
|
|
3819
|
-
type
|
|
459
|
+
/** @returns {ChargeRecurring} */
|
|
460
|
+
declare function ChargeRecurring(): ChargeRecurring;
|
|
461
|
+
type ChargeRecurring = {
|
|
462
|
+
interval?: string;
|
|
463
|
+
interval_time?: number;
|
|
464
|
+
};
|
|
465
|
+
/** @returns {SubscriptionTrialPeriod} */
|
|
466
|
+
declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod;
|
|
467
|
+
type SubscriptionTrialPeriod = {
|
|
3820
468
|
/**
|
|
3821
|
-
* -
|
|
3822
|
-
* is involved in the renewal.
|
|
469
|
+
* - The start date and time of the trial period.
|
|
3823
470
|
*/
|
|
3824
|
-
|
|
471
|
+
start_date?: string;
|
|
3825
472
|
/**
|
|
3826
|
-
* -
|
|
473
|
+
* - The end date and time of the trial period.
|
|
3827
474
|
*/
|
|
3828
|
-
|
|
475
|
+
end_date?: string;
|
|
476
|
+
};
|
|
477
|
+
/** @returns {Charge} */
|
|
478
|
+
declare function Charge(): Charge;
|
|
479
|
+
type Charge = {
|
|
480
|
+
final_charge?: OneTimeChargeEntity;
|
|
3829
481
|
};
|
|
3830
|
-
/** @returns {
|
|
3831
|
-
declare function
|
|
3832
|
-
type
|
|
482
|
+
/** @returns {OneTimeChargeItem} */
|
|
483
|
+
declare function OneTimeChargeItem(): OneTimeChargeItem;
|
|
484
|
+
type OneTimeChargeItem = {
|
|
3833
485
|
/**
|
|
3834
|
-
* - The
|
|
3835
|
-
* the subscription method.
|
|
486
|
+
* - The name of the one-time charge item.
|
|
3836
487
|
*/
|
|
3837
|
-
|
|
488
|
+
name?: string;
|
|
3838
489
|
/**
|
|
3839
|
-
* - The
|
|
490
|
+
* - The term or description of the charge.
|
|
3840
491
|
*/
|
|
3841
|
-
|
|
492
|
+
term?: string;
|
|
3842
493
|
/**
|
|
3843
|
-
* - The
|
|
494
|
+
* - The type of pricing for the charge item.
|
|
3844
495
|
*/
|
|
3845
|
-
|
|
496
|
+
pricing_type?: string;
|
|
497
|
+
price?: EntityChargePrice;
|
|
3846
498
|
/**
|
|
3847
|
-
* -
|
|
3848
|
-
*
|
|
499
|
+
* - The maximum amount that can be charged
|
|
500
|
+
* for this item, if applicable.
|
|
3849
501
|
*/
|
|
3850
|
-
|
|
3851
|
-
};
|
|
3852
|
-
/** @returns {CreditTransactionResponse} */
|
|
3853
|
-
declare function CreditTransactionResponse(): CreditTransactionResponse;
|
|
3854
|
-
type CreditTransactionResponse = {
|
|
502
|
+
capped_amount?: number;
|
|
3855
503
|
/**
|
|
3856
|
-
* -
|
|
504
|
+
* - Indicates whether the charge item is for
|
|
505
|
+
* testing purposes.
|
|
3857
506
|
*/
|
|
3858
|
-
|
|
507
|
+
is_test?: boolean;
|
|
3859
508
|
/**
|
|
3860
|
-
* -
|
|
509
|
+
* - Additional metadata associated with the charge item.
|
|
3861
510
|
*/
|
|
3862
|
-
|
|
511
|
+
metadata?: any;
|
|
512
|
+
};
|
|
513
|
+
/** @returns {ChargeLineItem} */
|
|
514
|
+
declare function ChargeLineItem(): ChargeLineItem;
|
|
515
|
+
type ChargeLineItem = {
|
|
3863
516
|
/**
|
|
3864
|
-
* -
|
|
517
|
+
* - Its name of the extension plan.
|
|
3865
518
|
*/
|
|
3866
|
-
|
|
519
|
+
name: string;
|
|
3867
520
|
/**
|
|
3868
|
-
* -
|
|
521
|
+
* - It indicates how it will be charged.
|
|
3869
522
|
*/
|
|
3870
|
-
|
|
523
|
+
term: string;
|
|
3871
524
|
/**
|
|
3872
|
-
* -
|
|
525
|
+
* - It indicates the extension subscription
|
|
526
|
+
* will be auto renewed timely.
|
|
3873
527
|
*/
|
|
3874
|
-
|
|
528
|
+
pricing_type: string;
|
|
529
|
+
price: EntityChargePrice;
|
|
530
|
+
recurring?: EntityChargeRecurring;
|
|
531
|
+
capped_amount?: number;
|
|
532
|
+
trial_days?: number;
|
|
533
|
+
is_test?: boolean;
|
|
534
|
+
metadata?: any;
|
|
3875
535
|
};
|
|
3876
|
-
/** @returns {
|
|
3877
|
-
declare function
|
|
3878
|
-
type
|
|
3879
|
-
/**
|
|
3880
|
-
* - Unique identifier for the request.
|
|
3881
|
-
*/
|
|
3882
|
-
unique_id?: string;
|
|
536
|
+
/** @returns {EntitySubscription} */
|
|
537
|
+
declare function EntitySubscription(): EntitySubscription;
|
|
538
|
+
type EntitySubscription = {
|
|
3883
539
|
/**
|
|
3884
|
-
* -
|
|
3885
|
-
*/
|
|
3886
|
-
type?: string;
|
|
3887
|
-
/**
|
|
3888
|
-
* - Product suite for the plan.
|
|
540
|
+
* - Unique identifier for the subscription charge
|
|
3889
541
|
*/
|
|
3890
|
-
|
|
542
|
+
_id?: string;
|
|
3891
543
|
/**
|
|
3892
|
-
* -
|
|
544
|
+
* - ID of the product suit associated with
|
|
545
|
+
* the charge
|
|
3893
546
|
*/
|
|
3894
|
-
|
|
547
|
+
product_suit_id?: string;
|
|
3895
548
|
/**
|
|
3896
|
-
* -
|
|
549
|
+
* - Unique identifier for the entity
|
|
3897
550
|
*/
|
|
3898
|
-
|
|
551
|
+
entity_id?: string;
|
|
3899
552
|
/**
|
|
3900
|
-
* -
|
|
553
|
+
* - Type of entity (e.g., subscription, extension)
|
|
3901
554
|
*/
|
|
3902
|
-
|
|
3903
|
-
};
|
|
3904
|
-
/** @returns {Taxation} */
|
|
3905
|
-
declare function Taxation(): Taxation;
|
|
3906
|
-
type Taxation = {
|
|
555
|
+
entity_type?: string;
|
|
3907
556
|
/**
|
|
3908
|
-
* -
|
|
557
|
+
* - Name of the subscription charge
|
|
3909
558
|
*/
|
|
3910
|
-
|
|
3911
|
-
};
|
|
3912
|
-
/** @returns {OneTimeFees} */
|
|
3913
|
-
declare function OneTimeFees(): OneTimeFees;
|
|
3914
|
-
type OneTimeFees = {
|
|
559
|
+
name?: string;
|
|
3915
560
|
/**
|
|
3916
|
-
* -
|
|
561
|
+
* - Current status of the subscription charge
|
|
3917
562
|
*/
|
|
3918
|
-
|
|
563
|
+
status?: string;
|
|
3919
564
|
/**
|
|
3920
|
-
* -
|
|
565
|
+
* - Number of trial days provided
|
|
3921
566
|
*/
|
|
3922
|
-
|
|
3923
|
-
};
|
|
3924
|
-
/** @returns {CreditLine} */
|
|
3925
|
-
declare function CreditLine(): CreditLine;
|
|
3926
|
-
type CreditLine = {
|
|
567
|
+
trial_days?: number;
|
|
3927
568
|
/**
|
|
3928
|
-
* - Indicates
|
|
569
|
+
* - Indicates if the charge is for testing purposes
|
|
3929
570
|
*/
|
|
3930
|
-
|
|
3931
|
-
};
|
|
3932
|
-
/** @returns {StatusMessage} */
|
|
3933
|
-
declare function StatusMessage(): StatusMessage;
|
|
3934
|
-
type StatusMessage = {
|
|
571
|
+
is_test?: boolean;
|
|
3935
572
|
/**
|
|
3936
|
-
* -
|
|
573
|
+
* - Timestamp when the charge was created
|
|
3937
574
|
*/
|
|
3938
|
-
|
|
575
|
+
created_at?: string;
|
|
3939
576
|
/**
|
|
3940
|
-
* -
|
|
577
|
+
* - Timestamp when the charge was last modified
|
|
3941
578
|
*/
|
|
3942
|
-
|
|
579
|
+
modified_at?: string;
|
|
3943
580
|
/**
|
|
3944
|
-
* -
|
|
581
|
+
* - Unique Identifier of the company
|
|
3945
582
|
*/
|
|
3946
|
-
|
|
583
|
+
subscriber_id?: string;
|
|
584
|
+
line_items?: EntityChargeDetails[];
|
|
3947
585
|
/**
|
|
3948
|
-
* -
|
|
586
|
+
* - The URL passed in request which extension
|
|
587
|
+
* expects in return.
|
|
3949
588
|
*/
|
|
3950
|
-
|
|
589
|
+
return_url?: string;
|
|
3951
590
|
};
|
|
3952
|
-
/** @returns {
|
|
3953
|
-
declare function
|
|
3954
|
-
type
|
|
3955
|
-
/**
|
|
3956
|
-
* - ID of the transaction to collect payment for.
|
|
3957
|
-
*/
|
|
3958
|
-
transaction_id?: string;
|
|
591
|
+
/** @returns {OneTimeChargeEntity} */
|
|
592
|
+
declare function OneTimeChargeEntity(): OneTimeChargeEntity;
|
|
593
|
+
type OneTimeChargeEntity = {
|
|
3959
594
|
/**
|
|
3960
|
-
* -
|
|
3961
|
-
* balance for the payment.
|
|
595
|
+
* - Description of the charge term or usage.
|
|
3962
596
|
*/
|
|
3963
|
-
|
|
597
|
+
term?: string;
|
|
3964
598
|
/**
|
|
3965
|
-
* -
|
|
599
|
+
* - Type of the charge (e.g., 'subscription',
|
|
600
|
+
* 'extension').
|
|
3966
601
|
*/
|
|
3967
|
-
|
|
602
|
+
charge_type?: string;
|
|
3968
603
|
/**
|
|
3969
|
-
* -
|
|
604
|
+
* - Maximum amount that can be charged. If
|
|
605
|
+
* no cap, the value should be 0.
|
|
3970
606
|
*/
|
|
3971
|
-
|
|
607
|
+
capped_amount?: number;
|
|
3972
608
|
/**
|
|
3973
|
-
* -
|
|
609
|
+
* - Date when the charge was billed. Null if
|
|
610
|
+
* not yet billed.
|
|
3974
611
|
*/
|
|
3975
|
-
|
|
3976
|
-
};
|
|
3977
|
-
/** @returns {SubscriptionRenewResMeta} */
|
|
3978
|
-
declare function SubscriptionRenewResMeta(): SubscriptionRenewResMeta;
|
|
3979
|
-
type SubscriptionRenewResMeta = {
|
|
612
|
+
billing_date?: string;
|
|
3980
613
|
/**
|
|
3981
|
-
* -
|
|
3982
|
-
* is involved in the renewal.
|
|
614
|
+
* - Date and time when the charge entity was created.
|
|
3983
615
|
*/
|
|
3984
|
-
|
|
616
|
+
created_at?: string;
|
|
3985
617
|
/**
|
|
3986
|
-
* -
|
|
618
|
+
* - Date and time when the charge entity was
|
|
619
|
+
* last modified.
|
|
3987
620
|
*/
|
|
3988
|
-
|
|
3989
|
-
};
|
|
3990
|
-
/** @returns {SubscriptionRenewRes} */
|
|
3991
|
-
declare function SubscriptionRenewRes(): SubscriptionRenewRes;
|
|
3992
|
-
type SubscriptionRenewRes = {
|
|
621
|
+
modified_at?: string;
|
|
3993
622
|
/**
|
|
3994
|
-
* -
|
|
3995
|
-
* the renewal.
|
|
623
|
+
* - Internal version key for the charge record.
|
|
3996
624
|
*/
|
|
3997
|
-
|
|
625
|
+
__v?: number;
|
|
3998
626
|
/**
|
|
3999
|
-
* -
|
|
627
|
+
* - Unique identifier for the charge entity.
|
|
4000
628
|
*/
|
|
4001
|
-
|
|
629
|
+
_id?: string;
|
|
4002
630
|
/**
|
|
4003
|
-
* -
|
|
631
|
+
* - The name of the one-time charge.
|
|
4004
632
|
*/
|
|
4005
|
-
|
|
4006
|
-
meta?: SubscriptionRenewResMeta;
|
|
4007
|
-
};
|
|
4008
|
-
/** @returns {SetupIntentRes} */
|
|
4009
|
-
declare function SetupIntentRes(): SetupIntentRes;
|
|
4010
|
-
type SetupIntentRes = {
|
|
633
|
+
name?: string;
|
|
4011
634
|
/**
|
|
4012
|
-
* -
|
|
635
|
+
* - Current status of the charge (e.g., 'pending',
|
|
636
|
+
* 'completed').
|
|
4013
637
|
*/
|
|
4014
|
-
|
|
4015
|
-
data?: SetupIntentData;
|
|
4016
|
-
};
|
|
4017
|
-
/** @returns {SetupIntentData} */
|
|
4018
|
-
declare function SetupIntentData(): SetupIntentData;
|
|
4019
|
-
type SetupIntentData = {
|
|
638
|
+
status?: string;
|
|
4020
639
|
/**
|
|
4021
|
-
* -
|
|
640
|
+
* - Date and time when the charge was
|
|
641
|
+
* activated. Null if not yet activated.
|
|
4022
642
|
*/
|
|
4023
|
-
|
|
643
|
+
activated_on?: string;
|
|
4024
644
|
/**
|
|
4025
|
-
* -
|
|
645
|
+
* - Date and time when the charge was
|
|
646
|
+
* cancelled. Null if not cancelled.
|
|
4026
647
|
*/
|
|
4027
|
-
|
|
648
|
+
cancelled_on?: string;
|
|
4028
649
|
/**
|
|
4029
|
-
* -
|
|
650
|
+
* - Additional metadata associated with the charge.
|
|
4030
651
|
*/
|
|
4031
|
-
|
|
652
|
+
metadata?: any;
|
|
4032
653
|
/**
|
|
4033
|
-
* -
|
|
654
|
+
* - URL to redirect to after processing the charge.
|
|
4034
655
|
*/
|
|
4035
|
-
|
|
4036
|
-
};
|
|
4037
|
-
/** @returns {SetupPayment} */
|
|
4038
|
-
declare function SetupPayment(): SetupPayment;
|
|
4039
|
-
type SetupPayment = {
|
|
656
|
+
return_url?: string;
|
|
4040
657
|
/**
|
|
4041
|
-
* -
|
|
658
|
+
* - Indicates whether the charge is for testing purposes.
|
|
4042
659
|
*/
|
|
4043
|
-
|
|
660
|
+
is_test?: boolean;
|
|
4044
661
|
/**
|
|
4045
|
-
* -
|
|
662
|
+
* - Pricing model for the charge (e.g., 'one_time').
|
|
4046
663
|
*/
|
|
4047
|
-
|
|
664
|
+
pricing_type?: string;
|
|
4048
665
|
/**
|
|
4049
|
-
* -
|
|
666
|
+
* - Unique identifier for the subscriber
|
|
667
|
+
* associated with the charge.
|
|
4050
668
|
*/
|
|
4051
|
-
|
|
669
|
+
subscriber_id?: string;
|
|
4052
670
|
/**
|
|
4053
|
-
* -
|
|
671
|
+
* - Type of the entity related to the charge
|
|
672
|
+
* (e.g., 'subscription', 'user').
|
|
4054
673
|
*/
|
|
4055
|
-
|
|
674
|
+
entity_type?: string;
|
|
4056
675
|
/**
|
|
4057
|
-
* -
|
|
676
|
+
* - Unique identifier for the entity associated
|
|
677
|
+
* with the charge.
|
|
4058
678
|
*/
|
|
4059
|
-
|
|
679
|
+
entity_id?: string;
|
|
4060
680
|
/**
|
|
4061
|
-
* -
|
|
681
|
+
* - Additional metadata associated with the charge.
|
|
4062
682
|
*/
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
};
|
|
4066
|
-
/** @returns {PaymentMethodOptions} */
|
|
4067
|
-
declare function PaymentMethodOptions(): PaymentMethodOptions;
|
|
4068
|
-
type PaymentMethodOptions = {
|
|
4069
|
-
card?: Card;
|
|
4070
|
-
};
|
|
4071
|
-
/** @returns {Card} */
|
|
4072
|
-
declare function Card(): Card;
|
|
4073
|
-
type Card = {
|
|
4074
|
-
mandate_options?: MandateOptions;
|
|
683
|
+
meta?: any;
|
|
684
|
+
price?: EntityChargePrice;
|
|
4075
685
|
};
|
|
4076
|
-
/** @returns {
|
|
4077
|
-
declare function
|
|
4078
|
-
type
|
|
686
|
+
/** @returns {EntityChargeRecurring} */
|
|
687
|
+
declare function EntityChargeRecurring(): EntityChargeRecurring;
|
|
688
|
+
type EntityChargeRecurring = {
|
|
4079
689
|
/**
|
|
4080
|
-
* - The
|
|
690
|
+
* - The interval of the subscription.
|
|
4081
691
|
*/
|
|
4082
|
-
|
|
692
|
+
interval: string;
|
|
4083
693
|
};
|
|
4084
|
-
/** @returns {
|
|
4085
|
-
declare function
|
|
4086
|
-
type
|
|
694
|
+
/** @returns {EntityChargeDetails} */
|
|
695
|
+
declare function EntityChargeDetails(): EntityChargeDetails;
|
|
696
|
+
type EntityChargeDetails = {
|
|
4087
697
|
/**
|
|
4088
|
-
* -
|
|
698
|
+
* - Unique identifier for the charge.
|
|
4089
699
|
*/
|
|
4090
|
-
|
|
4091
|
-
};
|
|
4092
|
-
/** @returns {TopupRes} */
|
|
4093
|
-
declare function TopupRes(): TopupRes;
|
|
4094
|
-
type TopupRes = {
|
|
700
|
+
_id?: string;
|
|
4095
701
|
/**
|
|
4096
|
-
* -
|
|
702
|
+
* - Unique identifier of the extension subscription.
|
|
4097
703
|
*/
|
|
4098
|
-
|
|
704
|
+
subscription_id?: string;
|
|
4099
705
|
/**
|
|
4100
|
-
* -
|
|
706
|
+
* - Unique identifier of the
|
|
707
|
+
* subscriber/company who installed extension subscription.
|
|
4101
708
|
*/
|
|
4102
|
-
|
|
709
|
+
subscriber_id?: string;
|
|
4103
710
|
/**
|
|
4104
|
-
* - The
|
|
711
|
+
* - The type of entity associated with the
|
|
712
|
+
* charge (e.g., 'extension', 'subscription').
|
|
4105
713
|
*/
|
|
4106
|
-
|
|
714
|
+
entity_type?: string;
|
|
4107
715
|
/**
|
|
4108
|
-
* -
|
|
716
|
+
* - Unique identifier for the entity associated
|
|
717
|
+
* with the charge.
|
|
4109
718
|
*/
|
|
4110
|
-
|
|
719
|
+
entity_id?: string;
|
|
4111
720
|
/**
|
|
4112
|
-
* - The
|
|
721
|
+
* - The name of the charge.
|
|
4113
722
|
*/
|
|
4114
|
-
|
|
4115
|
-
};
|
|
4116
|
-
/** @returns {CancelTopupReq} */
|
|
4117
|
-
declare function CancelTopupReq(): CancelTopupReq;
|
|
4118
|
-
type CancelTopupReq = {
|
|
723
|
+
name?: string;
|
|
4119
724
|
/**
|
|
4120
|
-
* -
|
|
725
|
+
* - Description of the charge term.
|
|
4121
726
|
*/
|
|
4122
|
-
|
|
4123
|
-
};
|
|
4124
|
-
/** @returns {CancelTopupRes} */
|
|
4125
|
-
declare function CancelTopupRes(): CancelTopupRes;
|
|
4126
|
-
type CancelTopupRes = {
|
|
727
|
+
term?: string;
|
|
4127
728
|
/**
|
|
4128
|
-
* - The
|
|
729
|
+
* - The type of charge (e.g., 'standalone',
|
|
730
|
+
* 'recurring').
|
|
4129
731
|
*/
|
|
4130
|
-
|
|
732
|
+
charge_type?: string;
|
|
4131
733
|
/**
|
|
4132
|
-
* - The
|
|
734
|
+
* - The pricing model for the charge (e.g.,
|
|
735
|
+
* 'one_time', 'recurring').
|
|
4133
736
|
*/
|
|
4134
|
-
|
|
737
|
+
pricing_type?: string;
|
|
738
|
+
price?: EntityChargePrice;
|
|
739
|
+
recurring?: ChargeRecurring;
|
|
4135
740
|
/**
|
|
4136
|
-
* -
|
|
741
|
+
* - Current status of the charge.
|
|
4137
742
|
*/
|
|
4138
|
-
|
|
743
|
+
status?: string;
|
|
4139
744
|
/**
|
|
4140
|
-
* -
|
|
745
|
+
* - Maximum amount that can be charged, if applicable.
|
|
4141
746
|
*/
|
|
4142
|
-
|
|
747
|
+
capped_amount?: number;
|
|
4143
748
|
/**
|
|
4144
|
-
* -
|
|
749
|
+
* - Date and time when the charge was activated.
|
|
4145
750
|
*/
|
|
4146
|
-
|
|
751
|
+
activated_on?: string;
|
|
4147
752
|
/**
|
|
4148
|
-
* -
|
|
753
|
+
* - Date and time when the charge was cancelled.
|
|
4149
754
|
*/
|
|
4150
|
-
|
|
755
|
+
cancelled_on?: string;
|
|
4151
756
|
/**
|
|
4152
|
-
* -
|
|
757
|
+
* - Date and time when the charge was billed.
|
|
4153
758
|
*/
|
|
4154
|
-
|
|
759
|
+
billing_date?: string;
|
|
760
|
+
current_period?: SubscriptionTrialPeriod;
|
|
4155
761
|
/**
|
|
4156
|
-
* -
|
|
762
|
+
* - Date and time when the charge details were
|
|
763
|
+
* last modified.
|
|
4157
764
|
*/
|
|
4158
765
|
modified_at?: string;
|
|
4159
766
|
/**
|
|
4160
|
-
* -
|
|
767
|
+
* - Date and time when the charge was created.
|
|
4161
768
|
*/
|
|
4162
|
-
|
|
769
|
+
created_at?: string;
|
|
770
|
+
/**
|
|
771
|
+
* - Indicates whether the charge is for testing purposes.
|
|
772
|
+
*/
|
|
773
|
+
is_test?: boolean;
|
|
4163
774
|
/**
|
|
4164
|
-
* -
|
|
775
|
+
* - Company id.
|
|
4165
776
|
*/
|
|
4166
|
-
|
|
777
|
+
company_id?: string;
|
|
4167
778
|
/**
|
|
4168
|
-
* -
|
|
779
|
+
* - Additional metadata associated with the charge.
|
|
4169
780
|
*/
|
|
4170
|
-
|
|
4171
|
-
};
|
|
4172
|
-
/** @returns {DefaultReq} */
|
|
4173
|
-
declare function DefaultReq(): DefaultReq;
|
|
4174
|
-
type DefaultReq = {
|
|
781
|
+
meta?: any;
|
|
4175
782
|
/**
|
|
4176
|
-
* -
|
|
4177
|
-
* as default.
|
|
783
|
+
* - Internal version key for the charge record.
|
|
4178
784
|
*/
|
|
4179
|
-
|
|
785
|
+
__v?: number;
|
|
4180
786
|
};
|