orb-billing 2.3.0 → 2.4.0
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 +42 -0
- package/client.d.ts +222 -0
- package/client.d.ts.map +1 -0
- package/client.js +156 -0
- package/client.js.map +1 -0
- package/client.mjs +129 -0
- package/client.mjs.map +1 -0
- package/index.d.mts +5 -221
- package/index.d.ts +5 -221
- package/index.d.ts.map +1 -1
- package/index.js +10 -130
- package/index.js.map +1 -1
- package/index.mjs +5 -127
- package/index.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/customers/credits/credits.d.ts +6 -0
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/events/backfills.d.ts +20 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/invoices.d.ts +1 -1
- package/resources/invoices.js +1 -1
- package/resources/invoices.mjs +1 -1
- package/resources/plans/plans.d.ts +53 -1
- 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/prices.d.ts +82 -2
- 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/subscriptions.d.ts +306 -3
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +5 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +5 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/client.ts +301 -0
- package/src/index.ts +6 -299
- package/src/resources/customers/credits/credits.ts +6 -0
- package/src/resources/events/backfills.ts +25 -0
- package/src/resources/invoices.ts +1 -1
- package/src/resources/plans/plans.ts +66 -1
- package/src/resources/prices/prices.ts +114 -2
- package/src/resources/subscriptions.ts +374 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/beta/beta.d.ts +0 -12
- package/resources/beta/beta.d.ts.map +0 -1
- package/resources/beta/beta.js +0 -40
- package/resources/beta/beta.js.map +0 -1
- package/resources/beta/beta.mjs +0 -13
- package/resources/beta/beta.mjs.map +0 -1
- package/resources/beta/index.d.ts +0 -3
- package/resources/beta/index.d.ts.map +0 -1
- package/resources/beta/index.js +0 -9
- package/resources/beta/index.js.map +0 -1
- package/resources/beta/index.mjs +0 -4
- package/resources/beta/index.mjs.map +0 -1
- package/resources/beta/price.d.ts +0 -82
- package/resources/beta/price.d.ts.map +0 -1
- package/resources/beta/price.js +0 -37
- package/resources/beta/price.js.map +0 -1
- package/resources/beta/price.mjs +0 -33
- package/resources/beta/price.mjs.map +0 -1
- package/src/resources/beta/beta.ts +0 -15
- package/src/resources/beta/index.ts +0 -4
- package/src/resources/beta/price.ts +0 -101
package/src/index.ts
CHANGED
|
@@ -1,198 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from './core';
|
|
4
3
|
import * as Errors from './error';
|
|
5
|
-
import { type Agent } from './_shims/index';
|
|
6
4
|
import * as Uploads from './uploads';
|
|
7
|
-
import
|
|
8
|
-
import * as Pagination from "./pagination";
|
|
9
|
-
import * as API from "./resources/index";
|
|
5
|
+
import { Orb } from './client';
|
|
10
6
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
* Defaults to process.env['ORB_API_KEY'].
|
|
14
|
-
*/
|
|
15
|
-
apiKey?: string | undefined;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Defaults to process.env['ORB_WEBHOOK_SECRET'].
|
|
19
|
-
*/
|
|
20
|
-
webhookSecret?: string | null | undefined;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
24
|
-
*
|
|
25
|
-
* Defaults to process.env['ORB_BASE_URL'].
|
|
26
|
-
*/
|
|
27
|
-
baseURL?: string | null | undefined;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
31
|
-
* from the server before timing out a single request.
|
|
32
|
-
*
|
|
33
|
-
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
34
|
-
* much longer than this timeout before the promise succeeds or fails.
|
|
35
|
-
*/
|
|
36
|
-
timeout?: number;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* An HTTP agent used to manage HTTP(S) connections.
|
|
40
|
-
*
|
|
41
|
-
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
42
|
-
* otherwise no agent is used.
|
|
43
|
-
*/
|
|
44
|
-
httpAgent?: Agent;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Specify a custom `fetch` function implementation.
|
|
48
|
-
*
|
|
49
|
-
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
50
|
-
* defined globally.
|
|
51
|
-
*/
|
|
52
|
-
fetch?: Core.Fetch | undefined;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* The maximum number of times that the client will retry a request in case of a
|
|
56
|
-
* temporary failure, like a network error or a 5XX error from the server.
|
|
57
|
-
*
|
|
58
|
-
* @default 2
|
|
59
|
-
*/
|
|
60
|
-
maxRetries?: number;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Default headers to include with every request to the API.
|
|
64
|
-
*
|
|
65
|
-
* These can be removed in individual requests by explicitly setting the
|
|
66
|
-
* header to `undefined` or `null` in request options.
|
|
67
|
-
*/
|
|
68
|
-
defaultHeaders?: Core.Headers;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Default query parameters to include with every request to the API.
|
|
72
|
-
*
|
|
73
|
-
* These can be removed in individual requests by explicitly setting the
|
|
74
|
-
* param to `undefined` in request options.
|
|
75
|
-
*/
|
|
76
|
-
defaultQuery?: Core.DefaultQuery;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** API Client for interfacing with the Orb API. */
|
|
80
|
-
export class Orb extends Core.APIClient {
|
|
81
|
-
apiKey: string;
|
|
82
|
-
webhookSecret: string | null;
|
|
83
|
-
|
|
84
|
-
private _options: ClientOptions;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* API Client for interfacing with the Orb API.
|
|
88
|
-
*
|
|
89
|
-
* @param {string | undefined} [opts.apiKey=process.env['ORB_API_KEY'] ?? undefined]
|
|
90
|
-
* @param {string | null | undefined} [opts.webhookSecret=process.env['ORB_WEBHOOK_SECRET'] ?? null]
|
|
91
|
-
* @param {string} [opts.baseURL=process.env['ORB_BASE_URL'] ?? https://api.withorb.com/v1] - Override the default base URL for the API.
|
|
92
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
93
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
94
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
95
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
96
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
97
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
98
|
-
*/
|
|
99
|
-
constructor({
|
|
100
|
-
baseURL = Core.readEnv('ORB_BASE_URL'),
|
|
101
|
-
apiKey = Core.readEnv('ORB_API_KEY'),
|
|
102
|
-
webhookSecret = Core.readEnv('ORB_WEBHOOK_SECRET') ?? null,
|
|
103
|
-
...opts
|
|
104
|
-
}: ClientOptions = {}) {
|
|
105
|
-
if (apiKey === undefined) {
|
|
106
|
-
throw new Errors.OrbError(
|
|
107
|
-
"The ORB_API_KEY environment variable is missing or empty; either provide it, or instantiate the Orb client with an apiKey option, like new Orb({ apiKey: 'My API Key' }).",
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const options: ClientOptions = {
|
|
112
|
-
apiKey,
|
|
113
|
-
webhookSecret,
|
|
114
|
-
...opts,
|
|
115
|
-
baseURL: baseURL || `https://api.withorb.com/v1`,
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
super({
|
|
119
|
-
baseURL: options.baseURL!,
|
|
120
|
-
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
121
|
-
httpAgent: options.httpAgent,
|
|
122
|
-
maxRetries: options.maxRetries,
|
|
123
|
-
fetch: options.fetch,
|
|
124
|
-
});
|
|
125
|
-
this._options = options;
|
|
126
|
-
this.idempotencyHeader = 'Idempotency-Key';
|
|
127
|
-
|
|
128
|
-
this.apiKey = apiKey;
|
|
129
|
-
this.webhookSecret = webhookSecret;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
topLevel: API.TopLevel = new API.TopLevel(this);
|
|
133
|
-
coupons: API.Coupons = new API.Coupons(this);
|
|
134
|
-
creditNotes: API.CreditNotes = new API.CreditNotes(this);
|
|
135
|
-
customers: API.Customers = new API.Customers(this);
|
|
136
|
-
events: API.Events = new API.Events(this);
|
|
137
|
-
invoiceLineItems: API.InvoiceLineItems = new API.InvoiceLineItems(this);
|
|
138
|
-
invoices: API.Invoices = new API.Invoices(this);
|
|
139
|
-
items: API.Items = new API.Items(this);
|
|
140
|
-
metrics: API.Metrics = new API.Metrics(this);
|
|
141
|
-
plans: API.Plans = new API.Plans(this);
|
|
142
|
-
prices: API.Prices = new API.Prices(this);
|
|
143
|
-
subscriptions: API.Subscriptions = new API.Subscriptions(this);
|
|
144
|
-
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
145
|
-
|
|
146
|
-
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
147
|
-
return this._options.defaultQuery;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
protected override defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers {
|
|
151
|
-
return {
|
|
152
|
-
...super.defaultHeaders(opts),
|
|
153
|
-
...this._options.defaultHeaders,
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
protected override authHeaders(opts: Core.FinalRequestOptions): Core.Headers {
|
|
158
|
-
return { Authorization: `Bearer ${this.apiKey}` };
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
protected override stringifyQuery(query: Record<string, unknown>): string {
|
|
162
|
-
return qs.stringify(query, { arrayFormat: 'brackets' });
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
static Orb = this;
|
|
166
|
-
|
|
167
|
-
static OrbError = Errors.OrbError;
|
|
168
|
-
static APIError = Errors.APIError;
|
|
169
|
-
static APIConnectionError = Errors.APIConnectionError;
|
|
170
|
-
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
171
|
-
static APIUserAbortError = Errors.APIUserAbortError;
|
|
172
|
-
static URLNotFound = Errors.URLNotFound;
|
|
173
|
-
static NotFoundError = Errors.NotFoundError;
|
|
174
|
-
static ConflictError = Errors.ConflictError;
|
|
175
|
-
static RateLimitError = Errors.RateLimitError;
|
|
176
|
-
static BadRequestError = Errors.BadRequestError;
|
|
177
|
-
static RequestTooLarge = Errors.RequestTooLarge;
|
|
178
|
-
static TooManyRequests = Errors.TooManyRequests;
|
|
179
|
-
static ResourceNotFound = Errors.ResourceNotFound;
|
|
180
|
-
static ResourceConflict = Errors.ResourceConflict;
|
|
181
|
-
static ResourceTooLarge = Errors.ResourceTooLarge;
|
|
182
|
-
static AuthenticationError = Errors.AuthenticationError;
|
|
183
|
-
static InternalServerError = Errors.InternalServerError;
|
|
184
|
-
static ConstraintViolation = Errors.ConstraintViolation;
|
|
185
|
-
static FeatureNotAvailable = Errors.FeatureNotAvailable;
|
|
186
|
-
static PermissionDeniedError = Errors.PermissionDeniedError;
|
|
187
|
-
static RequestValidationError = Errors.RequestValidationError;
|
|
188
|
-
static OrbAuthenticationError = Errors.OrbAuthenticationError;
|
|
189
|
-
static OrbInternalServerError = Errors.OrbInternalServerError;
|
|
190
|
-
static UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
191
|
-
static DuplicateResourceCreation = Errors.DuplicateResourceCreation;
|
|
7
|
+
export { Orb };
|
|
8
|
+
export default Orb;
|
|
192
9
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
10
|
+
export import toFile = Uploads.toFile;
|
|
11
|
+
export import fileFromPath = Uploads.fileFromPath;
|
|
196
12
|
|
|
197
13
|
export const {
|
|
198
14
|
OrbError,
|
|
@@ -222,113 +38,4 @@ export const {
|
|
|
222
38
|
DuplicateResourceCreation,
|
|
223
39
|
} = Errors;
|
|
224
40
|
|
|
225
|
-
export
|
|
226
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
227
|
-
|
|
228
|
-
export namespace Orb {
|
|
229
|
-
export import RequestOptions = Core.RequestOptions;
|
|
230
|
-
|
|
231
|
-
export import Page = Pagination.Page;
|
|
232
|
-
export import PageParams = Pagination.PageParams;
|
|
233
|
-
export import PageResponse = Pagination.PageResponse;
|
|
234
|
-
|
|
235
|
-
export import TopLevel = API.TopLevel;
|
|
236
|
-
export import TopLevelPingResponse = API.TopLevelPingResponse;
|
|
237
|
-
|
|
238
|
-
export import Coupons = API.Coupons;
|
|
239
|
-
export import Coupon = API.Coupon;
|
|
240
|
-
export import CouponsPage = API.CouponsPage;
|
|
241
|
-
export import CouponCreateParams = API.CouponCreateParams;
|
|
242
|
-
export import CouponListParams = API.CouponListParams;
|
|
243
|
-
|
|
244
|
-
export import CreditNotes = API.CreditNotes;
|
|
245
|
-
export import CreditNote = API.CreditNote;
|
|
246
|
-
export import CreditNotesPage = API.CreditNotesPage;
|
|
247
|
-
export import CreditNoteListParams = API.CreditNoteListParams;
|
|
248
|
-
|
|
249
|
-
export import Customers = API.Customers;
|
|
250
|
-
export import Customer = API.Customer;
|
|
251
|
-
export import CustomersPage = API.CustomersPage;
|
|
252
|
-
export import CustomerCreateParams = API.CustomerCreateParams;
|
|
253
|
-
export import CustomerUpdateParams = API.CustomerUpdateParams;
|
|
254
|
-
export import CustomerListParams = API.CustomerListParams;
|
|
255
|
-
export import CustomerUpdateByExternalIDParams = API.CustomerUpdateByExternalIDParams;
|
|
256
|
-
|
|
257
|
-
export import Events = API.Events;
|
|
258
|
-
export import EventUpdateResponse = API.EventUpdateResponse;
|
|
259
|
-
export import EventDeprecateResponse = API.EventDeprecateResponse;
|
|
260
|
-
export import EventIngestResponse = API.EventIngestResponse;
|
|
261
|
-
export import EventSearchResponse = API.EventSearchResponse;
|
|
262
|
-
export import EventUpdateParams = API.EventUpdateParams;
|
|
263
|
-
export import EventIngestParams = API.EventIngestParams;
|
|
264
|
-
export import EventSearchParams = API.EventSearchParams;
|
|
265
|
-
|
|
266
|
-
export import InvoiceLineItems = API.InvoiceLineItems;
|
|
267
|
-
export import InvoiceLineItemCreateResponse = API.InvoiceLineItemCreateResponse;
|
|
268
|
-
export import InvoiceLineItemCreateParams = API.InvoiceLineItemCreateParams;
|
|
269
|
-
|
|
270
|
-
export import Invoices = API.Invoices;
|
|
271
|
-
export import Invoice = API.Invoice;
|
|
272
|
-
export import InvoiceFetchUpcomingResponse = API.InvoiceFetchUpcomingResponse;
|
|
273
|
-
export import InvoicesPage = API.InvoicesPage;
|
|
274
|
-
export import InvoiceCreateParams = API.InvoiceCreateParams;
|
|
275
|
-
export import InvoiceListParams = API.InvoiceListParams;
|
|
276
|
-
export import InvoiceFetchUpcomingParams = API.InvoiceFetchUpcomingParams;
|
|
277
|
-
export import InvoiceMarkPaidParams = API.InvoiceMarkPaidParams;
|
|
278
|
-
|
|
279
|
-
export import Items = API.Items;
|
|
280
|
-
export import Item = API.Item;
|
|
281
|
-
export import ItemsPage = API.ItemsPage;
|
|
282
|
-
export import ItemCreateParams = API.ItemCreateParams;
|
|
283
|
-
export import ItemListParams = API.ItemListParams;
|
|
284
|
-
|
|
285
|
-
export import Metrics = API.Metrics;
|
|
286
|
-
export import MetricCreateResponse = API.MetricCreateResponse;
|
|
287
|
-
export import MetricListResponse = API.MetricListResponse;
|
|
288
|
-
export import MetricFetchResponse = API.MetricFetchResponse;
|
|
289
|
-
export import MetricListResponsesPage = API.MetricListResponsesPage;
|
|
290
|
-
export import MetricCreateParams = API.MetricCreateParams;
|
|
291
|
-
export import MetricListParams = API.MetricListParams;
|
|
292
|
-
|
|
293
|
-
export import Plans = API.Plans;
|
|
294
|
-
export import Plan = API.Plan;
|
|
295
|
-
export import PlansPage = API.PlansPage;
|
|
296
|
-
export import PlanCreateParams = API.PlanCreateParams;
|
|
297
|
-
export import PlanUpdateParams = API.PlanUpdateParams;
|
|
298
|
-
export import PlanListParams = API.PlanListParams;
|
|
299
|
-
|
|
300
|
-
export import Prices = API.Prices;
|
|
301
|
-
export import EvaluatePriceGroup = API.EvaluatePriceGroup;
|
|
302
|
-
export import Price = API.Price;
|
|
303
|
-
export import PriceEvaluateResponse = API.PriceEvaluateResponse;
|
|
304
|
-
export import PricesPage = API.PricesPage;
|
|
305
|
-
export import PriceCreateParams = API.PriceCreateParams;
|
|
306
|
-
export import PriceListParams = API.PriceListParams;
|
|
307
|
-
export import PriceEvaluateParams = API.PriceEvaluateParams;
|
|
308
|
-
|
|
309
|
-
export import Subscriptions = API.Subscriptions;
|
|
310
|
-
export import Subscription = API.Subscription;
|
|
311
|
-
export import SubscriptionUsage = API.SubscriptionUsage;
|
|
312
|
-
export import SubscriptionFetchCostsResponse = API.SubscriptionFetchCostsResponse;
|
|
313
|
-
export import SubscriptionFetchScheduleResponse = API.SubscriptionFetchScheduleResponse;
|
|
314
|
-
export import SubscriptionsPage = API.SubscriptionsPage;
|
|
315
|
-
export import SubscriptionFetchScheduleResponsesPage = API.SubscriptionFetchScheduleResponsesPage;
|
|
316
|
-
export import SubscriptionCreateParams = API.SubscriptionCreateParams;
|
|
317
|
-
export import SubscriptionUpdateParams = API.SubscriptionUpdateParams;
|
|
318
|
-
export import SubscriptionListParams = API.SubscriptionListParams;
|
|
319
|
-
export import SubscriptionCancelParams = API.SubscriptionCancelParams;
|
|
320
|
-
export import SubscriptionFetchCostsParams = API.SubscriptionFetchCostsParams;
|
|
321
|
-
export import SubscriptionFetchScheduleParams = API.SubscriptionFetchScheduleParams;
|
|
322
|
-
export import SubscriptionFetchUsageParams = API.SubscriptionFetchUsageParams;
|
|
323
|
-
export import SubscriptionPriceIntervalsParams = API.SubscriptionPriceIntervalsParams;
|
|
324
|
-
export import SubscriptionSchedulePlanChangeParams = API.SubscriptionSchedulePlanChangeParams;
|
|
325
|
-
export import SubscriptionTriggerPhaseParams = API.SubscriptionTriggerPhaseParams;
|
|
326
|
-
export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = API.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
|
|
327
|
-
export import SubscriptionUpdateFixedFeeQuantityParams = API.SubscriptionUpdateFixedFeeQuantityParams;
|
|
328
|
-
|
|
329
|
-
export import BillingCycleRelativeDate = API.BillingCycleRelativeDate;
|
|
330
|
-
export import Discount = API.Discount;
|
|
331
|
-
export import PaginationMetadata = API.PaginationMetadata;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export default Orb;
|
|
41
|
+
export * from './client';
|
|
@@ -14,6 +14,9 @@ export class Credits extends APIResource {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
17
|
+
*
|
|
18
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
19
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
17
20
|
*/
|
|
18
21
|
list(
|
|
19
22
|
customerId: string,
|
|
@@ -40,6 +43,9 @@ export class Credits extends APIResource {
|
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
45
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
46
|
+
*
|
|
47
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
48
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
43
49
|
*/
|
|
44
50
|
listByExternalId(
|
|
45
51
|
externalCustomerId: string,
|
|
@@ -116,6 +116,11 @@ export interface BackfillCreateResponse {
|
|
|
116
116
|
*/
|
|
117
117
|
customer_id: string | null;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The number of events ingested in this backfill.
|
|
121
|
+
*/
|
|
122
|
+
events_ingested: number;
|
|
123
|
+
|
|
119
124
|
/**
|
|
120
125
|
* The time at which this backfill was reverted.
|
|
121
126
|
*/
|
|
@@ -152,6 +157,11 @@ export interface BackfillListResponse {
|
|
|
152
157
|
*/
|
|
153
158
|
customer_id: string | null;
|
|
154
159
|
|
|
160
|
+
/**
|
|
161
|
+
* The number of events ingested in this backfill.
|
|
162
|
+
*/
|
|
163
|
+
events_ingested: number;
|
|
164
|
+
|
|
155
165
|
/**
|
|
156
166
|
* The time at which this backfill was reverted.
|
|
157
167
|
*/
|
|
@@ -188,6 +198,11 @@ export interface BackfillCloseResponse {
|
|
|
188
198
|
*/
|
|
189
199
|
customer_id: string | null;
|
|
190
200
|
|
|
201
|
+
/**
|
|
202
|
+
* The number of events ingested in this backfill.
|
|
203
|
+
*/
|
|
204
|
+
events_ingested: number;
|
|
205
|
+
|
|
191
206
|
/**
|
|
192
207
|
* The time at which this backfill was reverted.
|
|
193
208
|
*/
|
|
@@ -224,6 +239,11 @@ export interface BackfillFetchResponse {
|
|
|
224
239
|
*/
|
|
225
240
|
customer_id: string | null;
|
|
226
241
|
|
|
242
|
+
/**
|
|
243
|
+
* The number of events ingested in this backfill.
|
|
244
|
+
*/
|
|
245
|
+
events_ingested: number;
|
|
246
|
+
|
|
227
247
|
/**
|
|
228
248
|
* The time at which this backfill was reverted.
|
|
229
249
|
*/
|
|
@@ -260,6 +280,11 @@ export interface BackfillRevertResponse {
|
|
|
260
280
|
*/
|
|
261
281
|
customer_id: string | null;
|
|
262
282
|
|
|
283
|
+
/**
|
|
284
|
+
* The number of events ingested in this backfill.
|
|
285
|
+
*/
|
|
286
|
+
events_ingested: number;
|
|
287
|
+
|
|
263
288
|
/**
|
|
264
289
|
* The time at which this backfill was reverted.
|
|
265
290
|
*/
|
|
@@ -69,7 +69,7 @@ export class Invoices extends APIResource {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* This endpoint allows an eligible invoice to be issued manually. This is only
|
|
72
|
-
* possible with invoices where status is `draft`, `will_auto_issue` is
|
|
72
|
+
* possible with invoices where status is `draft`, `will_auto_issue` is false, and
|
|
73
73
|
* an `eligible_to_issue_at` is a time in the past. Issuing an invoice could
|
|
74
74
|
* possibly trigger side effects, some of which could be customer-visible (e.g.
|
|
75
75
|
* sending emails, auto-collecting payment, syncing the invoice to external
|
|
@@ -373,6 +373,11 @@ export namespace PlanCreateParams {
|
|
|
373
373
|
*/
|
|
374
374
|
billed_in_advance?: boolean | null;
|
|
375
375
|
|
|
376
|
+
/**
|
|
377
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
378
|
+
*/
|
|
379
|
+
conversion_rate?: number | null;
|
|
380
|
+
|
|
376
381
|
/**
|
|
377
382
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
378
383
|
* price is billed.
|
|
@@ -437,6 +442,11 @@ export namespace PlanCreateParams {
|
|
|
437
442
|
*/
|
|
438
443
|
billed_in_advance?: boolean | null;
|
|
439
444
|
|
|
445
|
+
/**
|
|
446
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
447
|
+
*/
|
|
448
|
+
conversion_rate?: number | null;
|
|
449
|
+
|
|
440
450
|
/**
|
|
441
451
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
442
452
|
* price is billed.
|
|
@@ -471,7 +481,7 @@ export namespace PlanCreateParams {
|
|
|
471
481
|
* An integer amount to represent package size. For example, 1000 here would divide
|
|
472
482
|
* usage by 1000 before multiplying by package_amount in rating
|
|
473
483
|
*/
|
|
474
|
-
package_size
|
|
484
|
+
package_size: number;
|
|
475
485
|
}
|
|
476
486
|
}
|
|
477
487
|
|
|
@@ -507,6 +517,11 @@ export namespace PlanCreateParams {
|
|
|
507
517
|
*/
|
|
508
518
|
billed_in_advance?: boolean | null;
|
|
509
519
|
|
|
520
|
+
/**
|
|
521
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
522
|
+
*/
|
|
523
|
+
conversion_rate?: number | null;
|
|
524
|
+
|
|
510
525
|
/**
|
|
511
526
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
512
527
|
* price is billed.
|
|
@@ -597,6 +612,11 @@ export namespace PlanCreateParams {
|
|
|
597
612
|
*/
|
|
598
613
|
billed_in_advance?: boolean | null;
|
|
599
614
|
|
|
615
|
+
/**
|
|
616
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
617
|
+
*/
|
|
618
|
+
conversion_rate?: number | null;
|
|
619
|
+
|
|
600
620
|
/**
|
|
601
621
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
602
622
|
* price is billed.
|
|
@@ -680,6 +700,11 @@ export namespace PlanCreateParams {
|
|
|
680
700
|
*/
|
|
681
701
|
billed_in_advance?: boolean | null;
|
|
682
702
|
|
|
703
|
+
/**
|
|
704
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
705
|
+
*/
|
|
706
|
+
conversion_rate?: number | null;
|
|
707
|
+
|
|
683
708
|
/**
|
|
684
709
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
685
710
|
* price is billed.
|
|
@@ -769,6 +794,11 @@ export namespace PlanCreateParams {
|
|
|
769
794
|
*/
|
|
770
795
|
billed_in_advance?: boolean | null;
|
|
771
796
|
|
|
797
|
+
/**
|
|
798
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
799
|
+
*/
|
|
800
|
+
conversion_rate?: number | null;
|
|
801
|
+
|
|
772
802
|
/**
|
|
773
803
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
774
804
|
* price is billed.
|
|
@@ -838,6 +868,11 @@ export namespace PlanCreateParams {
|
|
|
838
868
|
*/
|
|
839
869
|
billed_in_advance?: boolean | null;
|
|
840
870
|
|
|
871
|
+
/**
|
|
872
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
873
|
+
*/
|
|
874
|
+
conversion_rate?: number | null;
|
|
875
|
+
|
|
841
876
|
/**
|
|
842
877
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
843
878
|
* price is billed.
|
|
@@ -922,6 +957,11 @@ export namespace PlanCreateParams {
|
|
|
922
957
|
*/
|
|
923
958
|
billed_in_advance?: boolean | null;
|
|
924
959
|
|
|
960
|
+
/**
|
|
961
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
962
|
+
*/
|
|
963
|
+
conversion_rate?: number | null;
|
|
964
|
+
|
|
925
965
|
/**
|
|
926
966
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
927
967
|
* price is billed.
|
|
@@ -1000,6 +1040,11 @@ export namespace PlanCreateParams {
|
|
|
1000
1040
|
*/
|
|
1001
1041
|
billed_in_advance?: boolean | null;
|
|
1002
1042
|
|
|
1043
|
+
/**
|
|
1044
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1045
|
+
*/
|
|
1046
|
+
conversion_rate?: number | null;
|
|
1047
|
+
|
|
1003
1048
|
/**
|
|
1004
1049
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1005
1050
|
* price is billed.
|
|
@@ -1055,6 +1100,11 @@ export namespace PlanCreateParams {
|
|
|
1055
1100
|
*/
|
|
1056
1101
|
billed_in_advance?: boolean | null;
|
|
1057
1102
|
|
|
1103
|
+
/**
|
|
1104
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1105
|
+
*/
|
|
1106
|
+
conversion_rate?: number | null;
|
|
1107
|
+
|
|
1058
1108
|
/**
|
|
1059
1109
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1060
1110
|
* price is billed.
|
|
@@ -1110,6 +1160,11 @@ export namespace PlanCreateParams {
|
|
|
1110
1160
|
*/
|
|
1111
1161
|
billed_in_advance?: boolean | null;
|
|
1112
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1165
|
+
*/
|
|
1166
|
+
conversion_rate?: number | null;
|
|
1167
|
+
|
|
1113
1168
|
/**
|
|
1114
1169
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1115
1170
|
* price is billed.
|
|
@@ -1165,6 +1220,11 @@ export namespace PlanCreateParams {
|
|
|
1165
1220
|
*/
|
|
1166
1221
|
billed_in_advance?: boolean | null;
|
|
1167
1222
|
|
|
1223
|
+
/**
|
|
1224
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1225
|
+
*/
|
|
1226
|
+
conversion_rate?: number | null;
|
|
1227
|
+
|
|
1168
1228
|
/**
|
|
1169
1229
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1170
1230
|
* price is billed.
|
|
@@ -1220,6 +1280,11 @@ export namespace PlanCreateParams {
|
|
|
1220
1280
|
*/
|
|
1221
1281
|
billed_in_advance?: boolean | null;
|
|
1222
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1285
|
+
*/
|
|
1286
|
+
conversion_rate?: number | null;
|
|
1287
|
+
|
|
1223
1288
|
/**
|
|
1224
1289
|
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1225
1290
|
* price is billed.
|