orb-billing 1.23.0 → 1.24.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/CHANGELOG.md +16 -0
- package/error.d.ts +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +4 -4
- package/error.js.map +1 -1
- package/error.mjs +2 -2
- package/error.mjs.map +1 -1
- package/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +7 -3
- package/index.js.map +1 -1
- package/index.mjs +6 -2
- package/index.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/coupons/coupons.d.ts +60 -2
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/credit-notes.d.ts +57 -5
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +2 -2
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/index.d.ts +1 -1
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/ledger.d.ts +8 -8
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/customers.d.ts +696 -8
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/usage.d.ts +74 -58
- package/resources/customers/usage.d.ts.map +1 -1
- package/resources/customers/usage.js +14 -14
- package/resources/customers/usage.js.map +1 -1
- package/resources/customers/usage.mjs +14 -14
- package/resources/customers/usage.mjs.map +1 -1
- package/resources/events/events.d.ts +40 -40
- package/resources/events/events.js +40 -40
- package/resources/events/events.mjs +40 -40
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +2 -2
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +358 -71
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +648 -4
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +56 -83
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +62 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/subscriptions.d.ts +1084 -241
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/error.ts +2 -2
- package/src/index.ts +9 -4
- package/src/resources/coupons/coupons.ts +76 -2
- package/src/resources/credit-notes.ts +81 -5
- package/src/resources/customers/balance-transactions.ts +18 -2
- package/src/resources/customers/credits/credits.ts +2 -2
- package/src/resources/customers/credits/index.ts +2 -2
- package/src/resources/customers/credits/ledger.ts +23 -23
- package/src/resources/customers/customers.ts +1144 -12
- package/src/resources/customers/usage.ts +80 -62
- package/src/resources/events/events.ts +40 -40
- package/src/resources/index.ts +3 -3
- package/src/resources/invoice-line-items.ts +2 -2
- package/src/resources/invoices.ts +598 -91
- package/src/resources/plans/plans.ts +810 -4
- package/src/resources/prices/index.ts +1 -1
- package/src/resources/prices/prices.ts +67 -100
- package/src/resources/shared.ts +84 -0
- package/src/resources/subscriptions.ts +1291 -279
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/invoices.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Core from 'orb-billing/core';
|
|
2
2
|
import { APIResource } from 'orb-billing/resource';
|
|
3
3
|
import * as InvoicesAPI from 'orb-billing/resources/invoices';
|
|
4
|
+
import * as Shared from 'orb-billing/resources/shared';
|
|
4
5
|
import * as PricesAPI from 'orb-billing/resources/prices/prices';
|
|
5
6
|
import { Page, type PageParams } from 'orb-billing/pagination';
|
|
6
7
|
export declare class Invoices extends APIResource {
|
|
@@ -90,9 +91,95 @@ export interface Invoice {
|
|
|
90
91
|
currency: string;
|
|
91
92
|
customer: Invoice.Customer;
|
|
92
93
|
customer_balance_transactions: Array<Invoice.CustomerBalanceTransaction>;
|
|
94
|
+
/**
|
|
95
|
+
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
96
|
+
* added to the headers of invoices.
|
|
97
|
+
*
|
|
98
|
+
* ### Supported Tax ID Countries and Types
|
|
99
|
+
*
|
|
100
|
+
* | Country | Type | Description |
|
|
101
|
+
* | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
102
|
+
* | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
|
103
|
+
* | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
|
104
|
+
* | Austria | `eu_vat` | European VAT number |
|
|
105
|
+
* | Belgium | `eu_vat` | European VAT number |
|
|
106
|
+
* | Brazil | `br_cnpj` | Brazilian CNPJ number |
|
|
107
|
+
* | Brazil | `br_cpf` | Brazilian CPF number |
|
|
108
|
+
* | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
|
109
|
+
* | Bulgaria | `eu_vat` | European VAT number |
|
|
110
|
+
* | Canada | `ca_bn` | Canadian BN |
|
|
111
|
+
* | Canada | `ca_gst_hst` | Canadian GST/HST number |
|
|
112
|
+
* | Canada | `ca_pst_bc` | Canadian PST number (British Columbia) |
|
|
113
|
+
* | Canada | `ca_pst_mb` | Canadian PST number (Manitoba) |
|
|
114
|
+
* | Canada | `ca_pst_sk` | Canadian PST number (Saskatchewan) |
|
|
115
|
+
* | Canada | `ca_qst` | Canadian QST number (Québec) |
|
|
116
|
+
* | Chile | `cl_tin` | Chilean TIN |
|
|
117
|
+
* | Croatia | `eu_vat` | European VAT number |
|
|
118
|
+
* | Cyprus | `eu_vat` | European VAT number |
|
|
119
|
+
* | Czech Republic | `eu_vat` | European VAT number |
|
|
120
|
+
* | Denmark | `eu_vat` | European VAT number |
|
|
121
|
+
* | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
|
122
|
+
* | Estonia | `eu_vat` | European VAT number |
|
|
123
|
+
* | EU | `eu_oss_vat` | European One Stop Shop VAT number for non-Union scheme |
|
|
124
|
+
* | Finland | `eu_vat` | European VAT number |
|
|
125
|
+
* | France | `eu_vat` | European VAT number |
|
|
126
|
+
* | Georgia | `ge_vat` | Georgian VAT |
|
|
127
|
+
* | Germany | `eu_vat` | European VAT number |
|
|
128
|
+
* | Greece | `eu_vat` | European VAT number |
|
|
129
|
+
* | Hong Kong | `hk_br` | Hong Kong BR number |
|
|
130
|
+
* | Hungary | `eu_vat` | European VAT number |
|
|
131
|
+
* | Hungary | `hu_tin` | Hungary tax number (adószám) |
|
|
132
|
+
* | Iceland | `is_vat` | Icelandic VAT |
|
|
133
|
+
* | India | `in_gst` | Indian GST number |
|
|
134
|
+
* | Indonesia | `id_npwp` | Indonesian NPWP number |
|
|
135
|
+
* | Ireland | `eu_vat` | European VAT number |
|
|
136
|
+
* | Israel | `il_vat` | Israel VAT |
|
|
137
|
+
* | Italy | `eu_vat` | European VAT number |
|
|
138
|
+
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
139
|
+
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
140
|
+
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
141
|
+
* | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
|
142
|
+
* | Latvia | `eu_vat` | European VAT number |
|
|
143
|
+
* | Liechtenstein | `li_uid` | Liechtensteinian UID number |
|
|
144
|
+
* | Lithuania | `eu_vat` | European VAT number |
|
|
145
|
+
* | Luxembourg | `eu_vat` | European VAT number |
|
|
146
|
+
* | Malaysia | `my_frp` | Malaysian FRP number |
|
|
147
|
+
* | Malaysia | `my_itn` | Malaysian ITN |
|
|
148
|
+
* | Malaysia | `my_sst` | Malaysian SST number |
|
|
149
|
+
* | Malta | `eu_vat ` | European VAT number |
|
|
150
|
+
* | Mexico | `mx_rfc` | Mexican RFC number |
|
|
151
|
+
* | Netherlands | `eu_vat` | European VAT number |
|
|
152
|
+
* | New Zealand | `nz_gst` | New Zealand GST number |
|
|
153
|
+
* | Norway | `no_vat` | Norwegian VAT number |
|
|
154
|
+
* | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
|
155
|
+
* | Poland | `eu_vat` | European VAT number |
|
|
156
|
+
* | Portugal | `eu_vat` | European VAT number |
|
|
157
|
+
* | Romania | `eu_vat` | European VAT number |
|
|
158
|
+
* | Russia | `ru_inn` | Russian INN |
|
|
159
|
+
* | Russia | `ru_kpp` | Russian KPP |
|
|
160
|
+
* | Saudi Arabia | `sg_gst` | Singaporean GST |
|
|
161
|
+
* | Singapore | `sg_uen` | Singaporean UEN |
|
|
162
|
+
* | Slovakia | `eu_vat` | European VAT number |
|
|
163
|
+
* | Slovenia | `eu_vat` | European VAT number |
|
|
164
|
+
* | Slovenia | `si_tin` | Slovenia tax number (davčna številka) |
|
|
165
|
+
* | South Africa | `za_vat` | South African VAT number |
|
|
166
|
+
* | South Korea | `kr_brn` | Korean BRN |
|
|
167
|
+
* | Spain | `es_cif` | Spanish NIF number (previously Spanish CIF number) |
|
|
168
|
+
* | Spain | `eu_vat` | European VAT number |
|
|
169
|
+
* | Sweden | `eu_vat` | European VAT number |
|
|
170
|
+
* | Switzerland | `ch_vat` | Switzerland VAT number |
|
|
171
|
+
* | Taiwan | `tw_vat` | Taiwanese VAT |
|
|
172
|
+
* | Thailand | `th_vat` | Thai VAT |
|
|
173
|
+
* | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
|
174
|
+
* | Ukraine | `ua_vat` | Ukrainian VAT |
|
|
175
|
+
* | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
|
176
|
+
* | United Kingdom | `eu_vat` | Northern Ireland VAT number |
|
|
177
|
+
* | United Kingdom | `gb_vat` | United Kingdom VAT number |
|
|
178
|
+
* | United States | `us_ein` | United States EIN |
|
|
179
|
+
*/
|
|
93
180
|
customer_tax_id: Invoice.CustomerTaxID | null;
|
|
94
|
-
discount:
|
|
95
|
-
discounts: Array<
|
|
181
|
+
discount: Shared.Discount | null;
|
|
182
|
+
discounts: Array<Shared.Discount>;
|
|
96
183
|
/**
|
|
97
184
|
* When the invoice payment is due.
|
|
98
185
|
*/
|
|
@@ -244,7 +331,7 @@ export declare namespace Invoice {
|
|
|
244
331
|
* A unique id for this transaction.
|
|
245
332
|
*/
|
|
246
333
|
id: string;
|
|
247
|
-
action: 'applied_to_invoice' | 'prorated_refund' | '
|
|
334
|
+
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund';
|
|
248
335
|
/**
|
|
249
336
|
* The value of the amount changed in the transaction.
|
|
250
337
|
*/
|
|
@@ -285,9 +372,95 @@ export declare namespace Invoice {
|
|
|
285
372
|
id: string;
|
|
286
373
|
}
|
|
287
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
377
|
+
* added to the headers of invoices.
|
|
378
|
+
*
|
|
379
|
+
* ### Supported Tax ID Countries and Types
|
|
380
|
+
*
|
|
381
|
+
* | Country | Type | Description |
|
|
382
|
+
* | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
383
|
+
* | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
|
384
|
+
* | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
|
385
|
+
* | Austria | `eu_vat` | European VAT number |
|
|
386
|
+
* | Belgium | `eu_vat` | European VAT number |
|
|
387
|
+
* | Brazil | `br_cnpj` | Brazilian CNPJ number |
|
|
388
|
+
* | Brazil | `br_cpf` | Brazilian CPF number |
|
|
389
|
+
* | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
|
390
|
+
* | Bulgaria | `eu_vat` | European VAT number |
|
|
391
|
+
* | Canada | `ca_bn` | Canadian BN |
|
|
392
|
+
* | Canada | `ca_gst_hst` | Canadian GST/HST number |
|
|
393
|
+
* | Canada | `ca_pst_bc` | Canadian PST number (British Columbia) |
|
|
394
|
+
* | Canada | `ca_pst_mb` | Canadian PST number (Manitoba) |
|
|
395
|
+
* | Canada | `ca_pst_sk` | Canadian PST number (Saskatchewan) |
|
|
396
|
+
* | Canada | `ca_qst` | Canadian QST number (Québec) |
|
|
397
|
+
* | Chile | `cl_tin` | Chilean TIN |
|
|
398
|
+
* | Croatia | `eu_vat` | European VAT number |
|
|
399
|
+
* | Cyprus | `eu_vat` | European VAT number |
|
|
400
|
+
* | Czech Republic | `eu_vat` | European VAT number |
|
|
401
|
+
* | Denmark | `eu_vat` | European VAT number |
|
|
402
|
+
* | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
|
403
|
+
* | Estonia | `eu_vat` | European VAT number |
|
|
404
|
+
* | EU | `eu_oss_vat` | European One Stop Shop VAT number for non-Union scheme |
|
|
405
|
+
* | Finland | `eu_vat` | European VAT number |
|
|
406
|
+
* | France | `eu_vat` | European VAT number |
|
|
407
|
+
* | Georgia | `ge_vat` | Georgian VAT |
|
|
408
|
+
* | Germany | `eu_vat` | European VAT number |
|
|
409
|
+
* | Greece | `eu_vat` | European VAT number |
|
|
410
|
+
* | Hong Kong | `hk_br` | Hong Kong BR number |
|
|
411
|
+
* | Hungary | `eu_vat` | European VAT number |
|
|
412
|
+
* | Hungary | `hu_tin` | Hungary tax number (adószám) |
|
|
413
|
+
* | Iceland | `is_vat` | Icelandic VAT |
|
|
414
|
+
* | India | `in_gst` | Indian GST number |
|
|
415
|
+
* | Indonesia | `id_npwp` | Indonesian NPWP number |
|
|
416
|
+
* | Ireland | `eu_vat` | European VAT number |
|
|
417
|
+
* | Israel | `il_vat` | Israel VAT |
|
|
418
|
+
* | Italy | `eu_vat` | European VAT number |
|
|
419
|
+
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
420
|
+
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
421
|
+
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
422
|
+
* | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
|
423
|
+
* | Latvia | `eu_vat` | European VAT number |
|
|
424
|
+
* | Liechtenstein | `li_uid` | Liechtensteinian UID number |
|
|
425
|
+
* | Lithuania | `eu_vat` | European VAT number |
|
|
426
|
+
* | Luxembourg | `eu_vat` | European VAT number |
|
|
427
|
+
* | Malaysia | `my_frp` | Malaysian FRP number |
|
|
428
|
+
* | Malaysia | `my_itn` | Malaysian ITN |
|
|
429
|
+
* | Malaysia | `my_sst` | Malaysian SST number |
|
|
430
|
+
* | Malta | `eu_vat ` | European VAT number |
|
|
431
|
+
* | Mexico | `mx_rfc` | Mexican RFC number |
|
|
432
|
+
* | Netherlands | `eu_vat` | European VAT number |
|
|
433
|
+
* | New Zealand | `nz_gst` | New Zealand GST number |
|
|
434
|
+
* | Norway | `no_vat` | Norwegian VAT number |
|
|
435
|
+
* | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
|
436
|
+
* | Poland | `eu_vat` | European VAT number |
|
|
437
|
+
* | Portugal | `eu_vat` | European VAT number |
|
|
438
|
+
* | Romania | `eu_vat` | European VAT number |
|
|
439
|
+
* | Russia | `ru_inn` | Russian INN |
|
|
440
|
+
* | Russia | `ru_kpp` | Russian KPP |
|
|
441
|
+
* | Saudi Arabia | `sg_gst` | Singaporean GST |
|
|
442
|
+
* | Singapore | `sg_uen` | Singaporean UEN |
|
|
443
|
+
* | Slovakia | `eu_vat` | European VAT number |
|
|
444
|
+
* | Slovenia | `eu_vat` | European VAT number |
|
|
445
|
+
* | Slovenia | `si_tin` | Slovenia tax number (davčna številka) |
|
|
446
|
+
* | South Africa | `za_vat` | South African VAT number |
|
|
447
|
+
* | South Korea | `kr_brn` | Korean BRN |
|
|
448
|
+
* | Spain | `es_cif` | Spanish NIF number (previously Spanish CIF number) |
|
|
449
|
+
* | Spain | `eu_vat` | European VAT number |
|
|
450
|
+
* | Sweden | `eu_vat` | European VAT number |
|
|
451
|
+
* | Switzerland | `ch_vat` | Switzerland VAT number |
|
|
452
|
+
* | Taiwan | `tw_vat` | Taiwanese VAT |
|
|
453
|
+
* | Thailand | `th_vat` | Thai VAT |
|
|
454
|
+
* | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
|
455
|
+
* | Ukraine | `ua_vat` | Ukrainian VAT |
|
|
456
|
+
* | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
|
457
|
+
* | United Kingdom | `eu_vat` | Northern Ireland VAT number |
|
|
458
|
+
* | United Kingdom | `gb_vat` | United Kingdom VAT number |
|
|
459
|
+
* | United States | `us_ein` | United States EIN |
|
|
460
|
+
*/
|
|
288
461
|
interface CustomerTaxID {
|
|
289
|
-
country:
|
|
290
|
-
type:
|
|
462
|
+
country: 'AE' | 'AT' | 'AU' | 'BE' | 'BG' | 'BR' | 'CA' | 'CH' | 'CL' | 'CY' | 'CZ' | 'DE' | 'DK' | 'EE' | 'EG' | 'ES' | 'EU' | 'FI' | 'FR' | 'GB' | 'GE' | 'GR' | 'HK' | 'HR' | 'HU' | 'ID' | 'IE' | 'IL' | 'IN' | 'IS' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NZ' | 'PH' | 'PL' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'TH' | 'TR' | 'TW' | 'UA' | 'US' | 'ZA';
|
|
463
|
+
type: 'ae_trn' | 'eu_vat' | 'au_abn' | 'au_arn' | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'ch_vat' | 'cl_tin' | 'eg_tin' | 'es_cif' | 'eu_oss_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kr_brn' | 'li_uid' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'no_vat' | 'nz_gst' | 'ph_tin' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'th_vat' | 'tr_tin' | 'tw_vat' | 'ua_vat' | 'us_ein' | 'za_vat';
|
|
291
464
|
value: string;
|
|
292
465
|
}
|
|
293
466
|
interface LineItem {
|
|
@@ -299,7 +472,7 @@ export declare namespace Invoice {
|
|
|
299
472
|
* The final amount after any discounts or minimums.
|
|
300
473
|
*/
|
|
301
474
|
amount: string;
|
|
302
|
-
discount:
|
|
475
|
+
discount: Shared.Discount | null;
|
|
303
476
|
/**
|
|
304
477
|
* The end date of the range of time applied for this line item's price.
|
|
305
478
|
*/
|
|
@@ -714,63 +887,6 @@ export declare namespace Invoice {
|
|
|
714
887
|
id: string;
|
|
715
888
|
}
|
|
716
889
|
}
|
|
717
|
-
export type InvoiceDiscount = InvoiceDiscount.PercentageDiscount | InvoiceDiscount.TrialDiscount | InvoiceDiscount.UsageDiscount | InvoiceDiscount.AmountDiscount;
|
|
718
|
-
export declare namespace InvoiceDiscount {
|
|
719
|
-
interface PercentageDiscount {
|
|
720
|
-
/**
|
|
721
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
722
|
-
* this can be a subset of prices.
|
|
723
|
-
*/
|
|
724
|
-
applies_to_price_ids: Array<string>;
|
|
725
|
-
discount_type: 'percentage';
|
|
726
|
-
/**
|
|
727
|
-
* Only available if discount_type is `percentage`.This is a number between 0
|
|
728
|
-
* and 1.
|
|
729
|
-
*/
|
|
730
|
-
percentage_discount: number;
|
|
731
|
-
}
|
|
732
|
-
interface TrialDiscount {
|
|
733
|
-
/**
|
|
734
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
735
|
-
* this can be a subset of prices.
|
|
736
|
-
*/
|
|
737
|
-
applies_to_price_ids: Array<string>;
|
|
738
|
-
discount_type: 'trial';
|
|
739
|
-
/**
|
|
740
|
-
* Only available if discount_type is `trial`
|
|
741
|
-
*/
|
|
742
|
-
trial_amount_discount?: string | null;
|
|
743
|
-
/**
|
|
744
|
-
* Only available if discount_type is `trial`
|
|
745
|
-
*/
|
|
746
|
-
trial_percentage_discount?: number | null;
|
|
747
|
-
}
|
|
748
|
-
interface UsageDiscount {
|
|
749
|
-
/**
|
|
750
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
751
|
-
* this can be a subset of prices.
|
|
752
|
-
*/
|
|
753
|
-
applies_to_price_ids: Array<string>;
|
|
754
|
-
discount_type: 'usage';
|
|
755
|
-
/**
|
|
756
|
-
* Only available if discount_type is `usage`. Number of usage units that this
|
|
757
|
-
* discount is for
|
|
758
|
-
*/
|
|
759
|
-
usage_discount: number;
|
|
760
|
-
}
|
|
761
|
-
interface AmountDiscount {
|
|
762
|
-
/**
|
|
763
|
-
* Only available if discount_type is `amount`.
|
|
764
|
-
*/
|
|
765
|
-
amount_discount: string;
|
|
766
|
-
/**
|
|
767
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
768
|
-
* this can be a subset of prices.
|
|
769
|
-
*/
|
|
770
|
-
applies_to_price_ids: Array<string>;
|
|
771
|
-
discount_type: 'amount';
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
890
|
export interface InvoiceFetchUpcomingResponse {
|
|
775
891
|
id: string;
|
|
776
892
|
/**
|
|
@@ -794,9 +910,95 @@ export interface InvoiceFetchUpcomingResponse {
|
|
|
794
910
|
currency: string;
|
|
795
911
|
customer: InvoiceFetchUpcomingResponse.Customer;
|
|
796
912
|
customer_balance_transactions: Array<InvoiceFetchUpcomingResponse.CustomerBalanceTransaction>;
|
|
913
|
+
/**
|
|
914
|
+
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
915
|
+
* added to the headers of invoices.
|
|
916
|
+
*
|
|
917
|
+
* ### Supported Tax ID Countries and Types
|
|
918
|
+
*
|
|
919
|
+
* | Country | Type | Description |
|
|
920
|
+
* | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
921
|
+
* | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
|
922
|
+
* | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
|
923
|
+
* | Austria | `eu_vat` | European VAT number |
|
|
924
|
+
* | Belgium | `eu_vat` | European VAT number |
|
|
925
|
+
* | Brazil | `br_cnpj` | Brazilian CNPJ number |
|
|
926
|
+
* | Brazil | `br_cpf` | Brazilian CPF number |
|
|
927
|
+
* | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
|
928
|
+
* | Bulgaria | `eu_vat` | European VAT number |
|
|
929
|
+
* | Canada | `ca_bn` | Canadian BN |
|
|
930
|
+
* | Canada | `ca_gst_hst` | Canadian GST/HST number |
|
|
931
|
+
* | Canada | `ca_pst_bc` | Canadian PST number (British Columbia) |
|
|
932
|
+
* | Canada | `ca_pst_mb` | Canadian PST number (Manitoba) |
|
|
933
|
+
* | Canada | `ca_pst_sk` | Canadian PST number (Saskatchewan) |
|
|
934
|
+
* | Canada | `ca_qst` | Canadian QST number (Québec) |
|
|
935
|
+
* | Chile | `cl_tin` | Chilean TIN |
|
|
936
|
+
* | Croatia | `eu_vat` | European VAT number |
|
|
937
|
+
* | Cyprus | `eu_vat` | European VAT number |
|
|
938
|
+
* | Czech Republic | `eu_vat` | European VAT number |
|
|
939
|
+
* | Denmark | `eu_vat` | European VAT number |
|
|
940
|
+
* | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
|
941
|
+
* | Estonia | `eu_vat` | European VAT number |
|
|
942
|
+
* | EU | `eu_oss_vat` | European One Stop Shop VAT number for non-Union scheme |
|
|
943
|
+
* | Finland | `eu_vat` | European VAT number |
|
|
944
|
+
* | France | `eu_vat` | European VAT number |
|
|
945
|
+
* | Georgia | `ge_vat` | Georgian VAT |
|
|
946
|
+
* | Germany | `eu_vat` | European VAT number |
|
|
947
|
+
* | Greece | `eu_vat` | European VAT number |
|
|
948
|
+
* | Hong Kong | `hk_br` | Hong Kong BR number |
|
|
949
|
+
* | Hungary | `eu_vat` | European VAT number |
|
|
950
|
+
* | Hungary | `hu_tin` | Hungary tax number (adószám) |
|
|
951
|
+
* | Iceland | `is_vat` | Icelandic VAT |
|
|
952
|
+
* | India | `in_gst` | Indian GST number |
|
|
953
|
+
* | Indonesia | `id_npwp` | Indonesian NPWP number |
|
|
954
|
+
* | Ireland | `eu_vat` | European VAT number |
|
|
955
|
+
* | Israel | `il_vat` | Israel VAT |
|
|
956
|
+
* | Italy | `eu_vat` | European VAT number |
|
|
957
|
+
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
958
|
+
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
959
|
+
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
960
|
+
* | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
|
961
|
+
* | Latvia | `eu_vat` | European VAT number |
|
|
962
|
+
* | Liechtenstein | `li_uid` | Liechtensteinian UID number |
|
|
963
|
+
* | Lithuania | `eu_vat` | European VAT number |
|
|
964
|
+
* | Luxembourg | `eu_vat` | European VAT number |
|
|
965
|
+
* | Malaysia | `my_frp` | Malaysian FRP number |
|
|
966
|
+
* | Malaysia | `my_itn` | Malaysian ITN |
|
|
967
|
+
* | Malaysia | `my_sst` | Malaysian SST number |
|
|
968
|
+
* | Malta | `eu_vat ` | European VAT number |
|
|
969
|
+
* | Mexico | `mx_rfc` | Mexican RFC number |
|
|
970
|
+
* | Netherlands | `eu_vat` | European VAT number |
|
|
971
|
+
* | New Zealand | `nz_gst` | New Zealand GST number |
|
|
972
|
+
* | Norway | `no_vat` | Norwegian VAT number |
|
|
973
|
+
* | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
|
974
|
+
* | Poland | `eu_vat` | European VAT number |
|
|
975
|
+
* | Portugal | `eu_vat` | European VAT number |
|
|
976
|
+
* | Romania | `eu_vat` | European VAT number |
|
|
977
|
+
* | Russia | `ru_inn` | Russian INN |
|
|
978
|
+
* | Russia | `ru_kpp` | Russian KPP |
|
|
979
|
+
* | Saudi Arabia | `sg_gst` | Singaporean GST |
|
|
980
|
+
* | Singapore | `sg_uen` | Singaporean UEN |
|
|
981
|
+
* | Slovakia | `eu_vat` | European VAT number |
|
|
982
|
+
* | Slovenia | `eu_vat` | European VAT number |
|
|
983
|
+
* | Slovenia | `si_tin` | Slovenia tax number (davčna številka) |
|
|
984
|
+
* | South Africa | `za_vat` | South African VAT number |
|
|
985
|
+
* | South Korea | `kr_brn` | Korean BRN |
|
|
986
|
+
* | Spain | `es_cif` | Spanish NIF number (previously Spanish CIF number) |
|
|
987
|
+
* | Spain | `eu_vat` | European VAT number |
|
|
988
|
+
* | Sweden | `eu_vat` | European VAT number |
|
|
989
|
+
* | Switzerland | `ch_vat` | Switzerland VAT number |
|
|
990
|
+
* | Taiwan | `tw_vat` | Taiwanese VAT |
|
|
991
|
+
* | Thailand | `th_vat` | Thai VAT |
|
|
992
|
+
* | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
|
993
|
+
* | Ukraine | `ua_vat` | Ukrainian VAT |
|
|
994
|
+
* | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
|
995
|
+
* | United Kingdom | `eu_vat` | Northern Ireland VAT number |
|
|
996
|
+
* | United Kingdom | `gb_vat` | United Kingdom VAT number |
|
|
997
|
+
* | United States | `us_ein` | United States EIN |
|
|
998
|
+
*/
|
|
797
999
|
customer_tax_id: InvoiceFetchUpcomingResponse.CustomerTaxID | null;
|
|
798
|
-
discount:
|
|
799
|
-
discounts: Array<
|
|
1000
|
+
discount: Shared.Discount | null;
|
|
1001
|
+
discounts: Array<Shared.Discount>;
|
|
800
1002
|
/**
|
|
801
1003
|
* When the invoice payment is due.
|
|
802
1004
|
*/
|
|
@@ -948,7 +1150,7 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
948
1150
|
* A unique id for this transaction.
|
|
949
1151
|
*/
|
|
950
1152
|
id: string;
|
|
951
|
-
action: 'applied_to_invoice' | 'prorated_refund' | '
|
|
1153
|
+
action: 'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund';
|
|
952
1154
|
/**
|
|
953
1155
|
* The value of the amount changed in the transaction.
|
|
954
1156
|
*/
|
|
@@ -989,9 +1191,95 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
989
1191
|
id: string;
|
|
990
1192
|
}
|
|
991
1193
|
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Tax IDs are commonly required to be displayed on customer invoices, which are
|
|
1196
|
+
* added to the headers of invoices.
|
|
1197
|
+
*
|
|
1198
|
+
* ### Supported Tax ID Countries and Types
|
|
1199
|
+
*
|
|
1200
|
+
* | Country | Type | Description |
|
|
1201
|
+
* | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
1202
|
+
* | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
|
1203
|
+
* | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
|
1204
|
+
* | Austria | `eu_vat` | European VAT number |
|
|
1205
|
+
* | Belgium | `eu_vat` | European VAT number |
|
|
1206
|
+
* | Brazil | `br_cnpj` | Brazilian CNPJ number |
|
|
1207
|
+
* | Brazil | `br_cpf` | Brazilian CPF number |
|
|
1208
|
+
* | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
|
1209
|
+
* | Bulgaria | `eu_vat` | European VAT number |
|
|
1210
|
+
* | Canada | `ca_bn` | Canadian BN |
|
|
1211
|
+
* | Canada | `ca_gst_hst` | Canadian GST/HST number |
|
|
1212
|
+
* | Canada | `ca_pst_bc` | Canadian PST number (British Columbia) |
|
|
1213
|
+
* | Canada | `ca_pst_mb` | Canadian PST number (Manitoba) |
|
|
1214
|
+
* | Canada | `ca_pst_sk` | Canadian PST number (Saskatchewan) |
|
|
1215
|
+
* | Canada | `ca_qst` | Canadian QST number (Québec) |
|
|
1216
|
+
* | Chile | `cl_tin` | Chilean TIN |
|
|
1217
|
+
* | Croatia | `eu_vat` | European VAT number |
|
|
1218
|
+
* | Cyprus | `eu_vat` | European VAT number |
|
|
1219
|
+
* | Czech Republic | `eu_vat` | European VAT number |
|
|
1220
|
+
* | Denmark | `eu_vat` | European VAT number |
|
|
1221
|
+
* | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
|
1222
|
+
* | Estonia | `eu_vat` | European VAT number |
|
|
1223
|
+
* | EU | `eu_oss_vat` | European One Stop Shop VAT number for non-Union scheme |
|
|
1224
|
+
* | Finland | `eu_vat` | European VAT number |
|
|
1225
|
+
* | France | `eu_vat` | European VAT number |
|
|
1226
|
+
* | Georgia | `ge_vat` | Georgian VAT |
|
|
1227
|
+
* | Germany | `eu_vat` | European VAT number |
|
|
1228
|
+
* | Greece | `eu_vat` | European VAT number |
|
|
1229
|
+
* | Hong Kong | `hk_br` | Hong Kong BR number |
|
|
1230
|
+
* | Hungary | `eu_vat` | European VAT number |
|
|
1231
|
+
* | Hungary | `hu_tin` | Hungary tax number (adószám) |
|
|
1232
|
+
* | Iceland | `is_vat` | Icelandic VAT |
|
|
1233
|
+
* | India | `in_gst` | Indian GST number |
|
|
1234
|
+
* | Indonesia | `id_npwp` | Indonesian NPWP number |
|
|
1235
|
+
* | Ireland | `eu_vat` | European VAT number |
|
|
1236
|
+
* | Israel | `il_vat` | Israel VAT |
|
|
1237
|
+
* | Italy | `eu_vat` | European VAT number |
|
|
1238
|
+
* | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
1239
|
+
* | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
1240
|
+
* | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
1241
|
+
* | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
|
1242
|
+
* | Latvia | `eu_vat` | European VAT number |
|
|
1243
|
+
* | Liechtenstein | `li_uid` | Liechtensteinian UID number |
|
|
1244
|
+
* | Lithuania | `eu_vat` | European VAT number |
|
|
1245
|
+
* | Luxembourg | `eu_vat` | European VAT number |
|
|
1246
|
+
* | Malaysia | `my_frp` | Malaysian FRP number |
|
|
1247
|
+
* | Malaysia | `my_itn` | Malaysian ITN |
|
|
1248
|
+
* | Malaysia | `my_sst` | Malaysian SST number |
|
|
1249
|
+
* | Malta | `eu_vat ` | European VAT number |
|
|
1250
|
+
* | Mexico | `mx_rfc` | Mexican RFC number |
|
|
1251
|
+
* | Netherlands | `eu_vat` | European VAT number |
|
|
1252
|
+
* | New Zealand | `nz_gst` | New Zealand GST number |
|
|
1253
|
+
* | Norway | `no_vat` | Norwegian VAT number |
|
|
1254
|
+
* | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
|
1255
|
+
* | Poland | `eu_vat` | European VAT number |
|
|
1256
|
+
* | Portugal | `eu_vat` | European VAT number |
|
|
1257
|
+
* | Romania | `eu_vat` | European VAT number |
|
|
1258
|
+
* | Russia | `ru_inn` | Russian INN |
|
|
1259
|
+
* | Russia | `ru_kpp` | Russian KPP |
|
|
1260
|
+
* | Saudi Arabia | `sg_gst` | Singaporean GST |
|
|
1261
|
+
* | Singapore | `sg_uen` | Singaporean UEN |
|
|
1262
|
+
* | Slovakia | `eu_vat` | European VAT number |
|
|
1263
|
+
* | Slovenia | `eu_vat` | European VAT number |
|
|
1264
|
+
* | Slovenia | `si_tin` | Slovenia tax number (davčna številka) |
|
|
1265
|
+
* | South Africa | `za_vat` | South African VAT number |
|
|
1266
|
+
* | South Korea | `kr_brn` | Korean BRN |
|
|
1267
|
+
* | Spain | `es_cif` | Spanish NIF number (previously Spanish CIF number) |
|
|
1268
|
+
* | Spain | `eu_vat` | European VAT number |
|
|
1269
|
+
* | Sweden | `eu_vat` | European VAT number |
|
|
1270
|
+
* | Switzerland | `ch_vat` | Switzerland VAT number |
|
|
1271
|
+
* | Taiwan | `tw_vat` | Taiwanese VAT |
|
|
1272
|
+
* | Thailand | `th_vat` | Thai VAT |
|
|
1273
|
+
* | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
|
1274
|
+
* | Ukraine | `ua_vat` | Ukrainian VAT |
|
|
1275
|
+
* | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
|
1276
|
+
* | United Kingdom | `eu_vat` | Northern Ireland VAT number |
|
|
1277
|
+
* | United Kingdom | `gb_vat` | United Kingdom VAT number |
|
|
1278
|
+
* | United States | `us_ein` | United States EIN |
|
|
1279
|
+
*/
|
|
992
1280
|
interface CustomerTaxID {
|
|
993
|
-
country:
|
|
994
|
-
type:
|
|
1281
|
+
country: 'AE' | 'AT' | 'AU' | 'BE' | 'BG' | 'BR' | 'CA' | 'CH' | 'CL' | 'CY' | 'CZ' | 'DE' | 'DK' | 'EE' | 'EG' | 'ES' | 'EU' | 'FI' | 'FR' | 'GB' | 'GE' | 'GR' | 'HK' | 'HR' | 'HU' | 'ID' | 'IE' | 'IL' | 'IN' | 'IS' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NZ' | 'PH' | 'PL' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'TH' | 'TR' | 'TW' | 'UA' | 'US' | 'ZA';
|
|
1282
|
+
type: 'ae_trn' | 'eu_vat' | 'au_abn' | 'au_arn' | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'ch_vat' | 'cl_tin' | 'eg_tin' | 'es_cif' | 'eu_oss_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kr_brn' | 'li_uid' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'no_vat' | 'nz_gst' | 'ph_tin' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'th_vat' | 'tr_tin' | 'tw_vat' | 'ua_vat' | 'us_ein' | 'za_vat';
|
|
995
1283
|
value: string;
|
|
996
1284
|
}
|
|
997
1285
|
interface LineItem {
|
|
@@ -1003,7 +1291,7 @@ export declare namespace InvoiceFetchUpcomingResponse {
|
|
|
1003
1291
|
* The final amount after any discounts or minimums.
|
|
1004
1292
|
*/
|
|
1005
1293
|
amount: string;
|
|
1006
|
-
discount:
|
|
1294
|
+
discount: Shared.Discount | null;
|
|
1007
1295
|
/**
|
|
1008
1296
|
* The end date of the range of time applied for this line item's price.
|
|
1009
1297
|
*/
|
|
@@ -1508,7 +1796,7 @@ export interface InvoiceListParams extends PageParams {
|
|
|
1508
1796
|
'invoice_date[lt]'?: string | null;
|
|
1509
1797
|
'invoice_date[lte]'?: string | null;
|
|
1510
1798
|
is_recurring?: boolean | null;
|
|
1511
|
-
status?: 'draft' | 'issued' | 'paid' | 'synced' | 'void' | null;
|
|
1799
|
+
'status[]'?: Array<'draft' | 'issued' | 'paid' | 'synced' | 'void'> | null;
|
|
1512
1800
|
subscription_id?: string | null;
|
|
1513
1801
|
}
|
|
1514
1802
|
export interface InvoiceFetchUpcomingParams {
|
|
@@ -1530,7 +1818,6 @@ export interface InvoiceMarkPaidParams {
|
|
|
1530
1818
|
}
|
|
1531
1819
|
export declare namespace Invoices {
|
|
1532
1820
|
export import Invoice = InvoicesAPI.Invoice;
|
|
1533
|
-
export import InvoiceDiscount = InvoicesAPI.InvoiceDiscount;
|
|
1534
1821
|
export import InvoiceFetchUpcomingResponse = InvoicesAPI.InvoiceFetchUpcomingResponse;
|
|
1535
1822
|
export import InvoicesPage = InvoicesAPI.InvoicesPage;
|
|
1536
1823
|
export import InvoiceCreateParams = InvoicesAPI.InvoiceCreateParams;
|