airbyte-agent-orb 0.1.0__py3-none-any.whl

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.
Files changed (57) hide show
  1. airbyte_agent_orb/__init__.py +137 -0
  2. airbyte_agent_orb/_vendored/__init__.py +1 -0
  3. airbyte_agent_orb/_vendored/connector_sdk/__init__.py +82 -0
  4. airbyte_agent_orb/_vendored/connector_sdk/auth_strategies.py +1171 -0
  5. airbyte_agent_orb/_vendored/connector_sdk/auth_template.py +135 -0
  6. airbyte_agent_orb/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
  7. airbyte_agent_orb/_vendored/connector_sdk/cloud_utils/client.py +213 -0
  8. airbyte_agent_orb/_vendored/connector_sdk/connector_model_loader.py +1116 -0
  9. airbyte_agent_orb/_vendored/connector_sdk/constants.py +78 -0
  10. airbyte_agent_orb/_vendored/connector_sdk/exceptions.py +23 -0
  11. airbyte_agent_orb/_vendored/connector_sdk/executor/__init__.py +31 -0
  12. airbyte_agent_orb/_vendored/connector_sdk/executor/hosted_executor.py +196 -0
  13. airbyte_agent_orb/_vendored/connector_sdk/executor/local_executor.py +1773 -0
  14. airbyte_agent_orb/_vendored/connector_sdk/executor/models.py +190 -0
  15. airbyte_agent_orb/_vendored/connector_sdk/extensions.py +693 -0
  16. airbyte_agent_orb/_vendored/connector_sdk/http/__init__.py +37 -0
  17. airbyte_agent_orb/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
  18. airbyte_agent_orb/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
  19. airbyte_agent_orb/_vendored/connector_sdk/http/config.py +98 -0
  20. airbyte_agent_orb/_vendored/connector_sdk/http/exceptions.py +119 -0
  21. airbyte_agent_orb/_vendored/connector_sdk/http/protocols.py +114 -0
  22. airbyte_agent_orb/_vendored/connector_sdk/http/response.py +104 -0
  23. airbyte_agent_orb/_vendored/connector_sdk/http_client.py +693 -0
  24. airbyte_agent_orb/_vendored/connector_sdk/introspection.py +481 -0
  25. airbyte_agent_orb/_vendored/connector_sdk/logging/__init__.py +11 -0
  26. airbyte_agent_orb/_vendored/connector_sdk/logging/logger.py +273 -0
  27. airbyte_agent_orb/_vendored/connector_sdk/logging/types.py +93 -0
  28. airbyte_agent_orb/_vendored/connector_sdk/observability/__init__.py +11 -0
  29. airbyte_agent_orb/_vendored/connector_sdk/observability/config.py +179 -0
  30. airbyte_agent_orb/_vendored/connector_sdk/observability/models.py +19 -0
  31. airbyte_agent_orb/_vendored/connector_sdk/observability/redactor.py +81 -0
  32. airbyte_agent_orb/_vendored/connector_sdk/observability/session.py +103 -0
  33. airbyte_agent_orb/_vendored/connector_sdk/performance/__init__.py +6 -0
  34. airbyte_agent_orb/_vendored/connector_sdk/performance/instrumentation.py +57 -0
  35. airbyte_agent_orb/_vendored/connector_sdk/performance/metrics.py +93 -0
  36. airbyte_agent_orb/_vendored/connector_sdk/schema/__init__.py +75 -0
  37. airbyte_agent_orb/_vendored/connector_sdk/schema/base.py +201 -0
  38. airbyte_agent_orb/_vendored/connector_sdk/schema/components.py +244 -0
  39. airbyte_agent_orb/_vendored/connector_sdk/schema/connector.py +120 -0
  40. airbyte_agent_orb/_vendored/connector_sdk/schema/extensions.py +301 -0
  41. airbyte_agent_orb/_vendored/connector_sdk/schema/operations.py +146 -0
  42. airbyte_agent_orb/_vendored/connector_sdk/schema/security.py +236 -0
  43. airbyte_agent_orb/_vendored/connector_sdk/secrets.py +182 -0
  44. airbyte_agent_orb/_vendored/connector_sdk/telemetry/__init__.py +10 -0
  45. airbyte_agent_orb/_vendored/connector_sdk/telemetry/config.py +32 -0
  46. airbyte_agent_orb/_vendored/connector_sdk/telemetry/events.py +59 -0
  47. airbyte_agent_orb/_vendored/connector_sdk/telemetry/tracker.py +155 -0
  48. airbyte_agent_orb/_vendored/connector_sdk/types.py +255 -0
  49. airbyte_agent_orb/_vendored/connector_sdk/utils.py +60 -0
  50. airbyte_agent_orb/_vendored/connector_sdk/validation.py +828 -0
  51. airbyte_agent_orb/connector.py +1035 -0
  52. airbyte_agent_orb/connector_model.py +2163 -0
  53. airbyte_agent_orb/models.py +513 -0
  54. airbyte_agent_orb/types.py +1090 -0
  55. airbyte_agent_orb-0.1.0.dist-info/METADATA +152 -0
  56. airbyte_agent_orb-0.1.0.dist-info/RECORD +57 -0
  57. airbyte_agent_orb-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,2163 @@
1
+ """
2
+ Connector model for orb.
3
+
4
+ This file is auto-generated from the connector definition at build time.
5
+ DO NOT EDIT MANUALLY - changes will be overwritten on next generation.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from ._vendored.connector_sdk.types import (
11
+ Action,
12
+ AuthConfig,
13
+ AuthType,
14
+ ConnectorModel,
15
+ EndpointDefinition,
16
+ EntityDefinition,
17
+ )
18
+ from ._vendored.connector_sdk.schema.security import (
19
+ AirbyteAuthConfig,
20
+ AuthConfigFieldSpec,
21
+ )
22
+ from uuid import (
23
+ UUID,
24
+ )
25
+
26
+ OrbConnectorModel: ConnectorModel = ConnectorModel(
27
+ id=UUID('7f0455fb-4518-4ec0-b7a3-d808bf8081cc'),
28
+ name='orb',
29
+ version='0.1.1',
30
+ base_url='https://api.billwithorb.com/v1',
31
+ auth=AuthConfig(
32
+ type=AuthType.BEARER,
33
+ config={'header': 'Authorization', 'prefix': 'Bearer'},
34
+ user_config_spec=AirbyteAuthConfig(
35
+ title='API Key Authentication',
36
+ type='object',
37
+ required=['api_key'],
38
+ properties={
39
+ 'api_key': AuthConfigFieldSpec(
40
+ title='API Key',
41
+ description='Your Orb API key',
42
+ ),
43
+ },
44
+ auth_mapping={'token': '${api_key}'},
45
+ ),
46
+ ),
47
+ entities=[
48
+ EntityDefinition(
49
+ name='customers',
50
+ stream_name='customers',
51
+ actions=[Action.LIST, Action.GET],
52
+ endpoints={
53
+ Action.LIST: EndpointDefinition(
54
+ method='GET',
55
+ path='/customers',
56
+ action=Action.LIST,
57
+ description='Returns a paginated list of customers',
58
+ query_params=['limit', 'cursor'],
59
+ query_params_schema={
60
+ 'limit': {
61
+ 'type': 'integer',
62
+ 'required': False,
63
+ 'default': 50,
64
+ },
65
+ 'cursor': {'type': 'string', 'required': False},
66
+ },
67
+ response_schema={
68
+ 'type': 'object',
69
+ 'description': 'Paginated list of customers',
70
+ 'properties': {
71
+ 'data': {
72
+ 'type': 'array',
73
+ 'items': {
74
+ 'type': 'object',
75
+ 'description': 'Customer object',
76
+ 'properties': {
77
+ 'id': {'type': 'string', 'description': 'The unique identifier of the customer'},
78
+ 'external_customer_id': {
79
+ 'type': ['string', 'null'],
80
+ 'description': 'The ID of the customer in an external system',
81
+ },
82
+ 'name': {
83
+ 'type': ['string', 'null'],
84
+ 'description': 'The name of the customer',
85
+ },
86
+ 'email': {
87
+ 'type': ['string', 'null'],
88
+ 'description': 'The email address of the customer',
89
+ },
90
+ 'created_at': {
91
+ 'type': ['string', 'null'],
92
+ 'format': 'date-time',
93
+ 'description': 'The date and time when the customer was created',
94
+ },
95
+ 'payment_provider': {
96
+ 'type': ['string', 'null'],
97
+ 'description': 'The payment provider used by the customer',
98
+ },
99
+ 'payment_provider_id': {
100
+ 'type': ['string', 'null'],
101
+ 'description': "The ID of the customer in the payment provider's system",
102
+ },
103
+ 'timezone': {
104
+ 'type': ['string', 'null'],
105
+ 'description': 'The timezone setting of the customer',
106
+ },
107
+ 'shipping_address': {
108
+ 'oneOf': [
109
+ {
110
+ 'type': 'object',
111
+ 'description': 'Address object',
112
+ 'properties': {
113
+ 'city': {
114
+ 'type': ['string', 'null'],
115
+ 'description': 'The city of the address',
116
+ },
117
+ 'country': {
118
+ 'type': ['string', 'null'],
119
+ 'description': 'The country of the address',
120
+ },
121
+ 'line1': {
122
+ 'type': ['string', 'null'],
123
+ 'description': 'The first line of the address',
124
+ },
125
+ 'line2': {
126
+ 'type': ['string', 'null'],
127
+ 'description': 'The second line of the address',
128
+ },
129
+ 'postal_code': {
130
+ 'type': ['string', 'null'],
131
+ 'description': 'The postal code of the address',
132
+ },
133
+ 'state': {
134
+ 'type': ['string', 'null'],
135
+ 'description': 'The state or region of the address',
136
+ },
137
+ },
138
+ },
139
+ {'type': 'null'},
140
+ ],
141
+ 'description': 'The shipping address of the customer',
142
+ },
143
+ 'billing_address': {
144
+ 'oneOf': [
145
+ {
146
+ 'type': 'object',
147
+ 'description': 'Address object',
148
+ 'properties': {
149
+ 'city': {
150
+ 'type': ['string', 'null'],
151
+ 'description': 'The city of the address',
152
+ },
153
+ 'country': {
154
+ 'type': ['string', 'null'],
155
+ 'description': 'The country of the address',
156
+ },
157
+ 'line1': {
158
+ 'type': ['string', 'null'],
159
+ 'description': 'The first line of the address',
160
+ },
161
+ 'line2': {
162
+ 'type': ['string', 'null'],
163
+ 'description': 'The second line of the address',
164
+ },
165
+ 'postal_code': {
166
+ 'type': ['string', 'null'],
167
+ 'description': 'The postal code of the address',
168
+ },
169
+ 'state': {
170
+ 'type': ['string', 'null'],
171
+ 'description': 'The state or region of the address',
172
+ },
173
+ },
174
+ },
175
+ {'type': 'null'},
176
+ ],
177
+ 'description': 'The billing address of the customer',
178
+ },
179
+ 'balance': {
180
+ 'type': ['string', 'null'],
181
+ 'description': 'The current balance of the customer',
182
+ },
183
+ 'currency': {
184
+ 'type': ['string', 'null'],
185
+ 'description': 'The currency of the customer',
186
+ },
187
+ 'tax_id': {
188
+ 'type': ['object', 'null'],
189
+ 'description': 'Tax identification information',
190
+ 'properties': {
191
+ 'type': {
192
+ 'type': ['string', 'null'],
193
+ 'description': 'The type of tax ID',
194
+ },
195
+ 'value': {
196
+ 'type': ['string', 'null'],
197
+ 'description': 'The value of the tax ID',
198
+ },
199
+ 'country': {
200
+ 'type': ['string', 'null'],
201
+ 'description': 'The country of the tax ID',
202
+ },
203
+ },
204
+ },
205
+ 'auto_collection': {
206
+ 'type': ['boolean', 'null'],
207
+ 'description': 'Whether auto collection is enabled',
208
+ },
209
+ 'metadata': {
210
+ 'type': ['object', 'null'],
211
+ 'description': 'Additional metadata for the customer',
212
+ 'additionalProperties': True,
213
+ },
214
+ },
215
+ 'required': ['id'],
216
+ 'x-airbyte-entity-name': 'customers',
217
+ 'x-airbyte-stream-name': 'customers',
218
+ },
219
+ },
220
+ 'pagination_metadata': {
221
+ 'type': 'object',
222
+ 'description': 'Pagination metadata',
223
+ 'properties': {
224
+ 'has_more': {
225
+ 'type': ['boolean', 'null'],
226
+ 'description': 'Whether there are more results',
227
+ },
228
+ 'next_cursor': {
229
+ 'type': ['string', 'null'],
230
+ 'description': 'Cursor for the next page',
231
+ },
232
+ },
233
+ },
234
+ },
235
+ },
236
+ record_extractor='$.data',
237
+ meta_extractor={'next_cursor': '$.pagination_metadata.next_cursor'},
238
+ ),
239
+ Action.GET: EndpointDefinition(
240
+ method='GET',
241
+ path='/customers/{customer_id}',
242
+ action=Action.GET,
243
+ description='Get a single customer by ID',
244
+ path_params=['customer_id'],
245
+ path_params_schema={
246
+ 'customer_id': {'type': 'string', 'required': True},
247
+ },
248
+ response_schema={
249
+ 'type': 'object',
250
+ 'description': 'Customer object',
251
+ 'properties': {
252
+ 'id': {'type': 'string', 'description': 'The unique identifier of the customer'},
253
+ 'external_customer_id': {
254
+ 'type': ['string', 'null'],
255
+ 'description': 'The ID of the customer in an external system',
256
+ },
257
+ 'name': {
258
+ 'type': ['string', 'null'],
259
+ 'description': 'The name of the customer',
260
+ },
261
+ 'email': {
262
+ 'type': ['string', 'null'],
263
+ 'description': 'The email address of the customer',
264
+ },
265
+ 'created_at': {
266
+ 'type': ['string', 'null'],
267
+ 'format': 'date-time',
268
+ 'description': 'The date and time when the customer was created',
269
+ },
270
+ 'payment_provider': {
271
+ 'type': ['string', 'null'],
272
+ 'description': 'The payment provider used by the customer',
273
+ },
274
+ 'payment_provider_id': {
275
+ 'type': ['string', 'null'],
276
+ 'description': "The ID of the customer in the payment provider's system",
277
+ },
278
+ 'timezone': {
279
+ 'type': ['string', 'null'],
280
+ 'description': 'The timezone setting of the customer',
281
+ },
282
+ 'shipping_address': {
283
+ 'oneOf': [
284
+ {
285
+ 'type': 'object',
286
+ 'description': 'Address object',
287
+ 'properties': {
288
+ 'city': {
289
+ 'type': ['string', 'null'],
290
+ 'description': 'The city of the address',
291
+ },
292
+ 'country': {
293
+ 'type': ['string', 'null'],
294
+ 'description': 'The country of the address',
295
+ },
296
+ 'line1': {
297
+ 'type': ['string', 'null'],
298
+ 'description': 'The first line of the address',
299
+ },
300
+ 'line2': {
301
+ 'type': ['string', 'null'],
302
+ 'description': 'The second line of the address',
303
+ },
304
+ 'postal_code': {
305
+ 'type': ['string', 'null'],
306
+ 'description': 'The postal code of the address',
307
+ },
308
+ 'state': {
309
+ 'type': ['string', 'null'],
310
+ 'description': 'The state or region of the address',
311
+ },
312
+ },
313
+ },
314
+ {'type': 'null'},
315
+ ],
316
+ 'description': 'The shipping address of the customer',
317
+ },
318
+ 'billing_address': {
319
+ 'oneOf': [
320
+ {
321
+ 'type': 'object',
322
+ 'description': 'Address object',
323
+ 'properties': {
324
+ 'city': {
325
+ 'type': ['string', 'null'],
326
+ 'description': 'The city of the address',
327
+ },
328
+ 'country': {
329
+ 'type': ['string', 'null'],
330
+ 'description': 'The country of the address',
331
+ },
332
+ 'line1': {
333
+ 'type': ['string', 'null'],
334
+ 'description': 'The first line of the address',
335
+ },
336
+ 'line2': {
337
+ 'type': ['string', 'null'],
338
+ 'description': 'The second line of the address',
339
+ },
340
+ 'postal_code': {
341
+ 'type': ['string', 'null'],
342
+ 'description': 'The postal code of the address',
343
+ },
344
+ 'state': {
345
+ 'type': ['string', 'null'],
346
+ 'description': 'The state or region of the address',
347
+ },
348
+ },
349
+ },
350
+ {'type': 'null'},
351
+ ],
352
+ 'description': 'The billing address of the customer',
353
+ },
354
+ 'balance': {
355
+ 'type': ['string', 'null'],
356
+ 'description': 'The current balance of the customer',
357
+ },
358
+ 'currency': {
359
+ 'type': ['string', 'null'],
360
+ 'description': 'The currency of the customer',
361
+ },
362
+ 'tax_id': {
363
+ 'type': ['object', 'null'],
364
+ 'description': 'Tax identification information',
365
+ 'properties': {
366
+ 'type': {
367
+ 'type': ['string', 'null'],
368
+ 'description': 'The type of tax ID',
369
+ },
370
+ 'value': {
371
+ 'type': ['string', 'null'],
372
+ 'description': 'The value of the tax ID',
373
+ },
374
+ 'country': {
375
+ 'type': ['string', 'null'],
376
+ 'description': 'The country of the tax ID',
377
+ },
378
+ },
379
+ },
380
+ 'auto_collection': {
381
+ 'type': ['boolean', 'null'],
382
+ 'description': 'Whether auto collection is enabled',
383
+ },
384
+ 'metadata': {
385
+ 'type': ['object', 'null'],
386
+ 'description': 'Additional metadata for the customer',
387
+ 'additionalProperties': True,
388
+ },
389
+ },
390
+ 'required': ['id'],
391
+ 'x-airbyte-entity-name': 'customers',
392
+ 'x-airbyte-stream-name': 'customers',
393
+ },
394
+ ),
395
+ },
396
+ entity_schema={
397
+ 'type': 'object',
398
+ 'description': 'Customer object',
399
+ 'properties': {
400
+ 'id': {'type': 'string', 'description': 'The unique identifier of the customer'},
401
+ 'external_customer_id': {
402
+ 'type': ['string', 'null'],
403
+ 'description': 'The ID of the customer in an external system',
404
+ },
405
+ 'name': {
406
+ 'type': ['string', 'null'],
407
+ 'description': 'The name of the customer',
408
+ },
409
+ 'email': {
410
+ 'type': ['string', 'null'],
411
+ 'description': 'The email address of the customer',
412
+ },
413
+ 'created_at': {
414
+ 'type': ['string', 'null'],
415
+ 'format': 'date-time',
416
+ 'description': 'The date and time when the customer was created',
417
+ },
418
+ 'payment_provider': {
419
+ 'type': ['string', 'null'],
420
+ 'description': 'The payment provider used by the customer',
421
+ },
422
+ 'payment_provider_id': {
423
+ 'type': ['string', 'null'],
424
+ 'description': "The ID of the customer in the payment provider's system",
425
+ },
426
+ 'timezone': {
427
+ 'type': ['string', 'null'],
428
+ 'description': 'The timezone setting of the customer',
429
+ },
430
+ 'shipping_address': {
431
+ 'oneOf': [
432
+ {'$ref': '#/components/schemas/Address'},
433
+ {'type': 'null'},
434
+ ],
435
+ 'description': 'The shipping address of the customer',
436
+ },
437
+ 'billing_address': {
438
+ 'oneOf': [
439
+ {'$ref': '#/components/schemas/Address'},
440
+ {'type': 'null'},
441
+ ],
442
+ 'description': 'The billing address of the customer',
443
+ },
444
+ 'balance': {
445
+ 'type': ['string', 'null'],
446
+ 'description': 'The current balance of the customer',
447
+ },
448
+ 'currency': {
449
+ 'type': ['string', 'null'],
450
+ 'description': 'The currency of the customer',
451
+ },
452
+ 'tax_id': {
453
+ 'type': ['object', 'null'],
454
+ 'description': 'Tax identification information',
455
+ 'properties': {
456
+ 'type': {
457
+ 'type': ['string', 'null'],
458
+ 'description': 'The type of tax ID',
459
+ },
460
+ 'value': {
461
+ 'type': ['string', 'null'],
462
+ 'description': 'The value of the tax ID',
463
+ },
464
+ 'country': {
465
+ 'type': ['string', 'null'],
466
+ 'description': 'The country of the tax ID',
467
+ },
468
+ },
469
+ },
470
+ 'auto_collection': {
471
+ 'type': ['boolean', 'null'],
472
+ 'description': 'Whether auto collection is enabled',
473
+ },
474
+ 'metadata': {
475
+ 'type': ['object', 'null'],
476
+ 'description': 'Additional metadata for the customer',
477
+ 'additionalProperties': True,
478
+ },
479
+ },
480
+ 'required': ['id'],
481
+ 'x-airbyte-entity-name': 'customers',
482
+ 'x-airbyte-stream-name': 'customers',
483
+ },
484
+ ),
485
+ EntityDefinition(
486
+ name='subscriptions',
487
+ stream_name='subscriptions',
488
+ actions=[Action.LIST, Action.GET],
489
+ endpoints={
490
+ Action.LIST: EndpointDefinition(
491
+ method='GET',
492
+ path='/subscriptions',
493
+ action=Action.LIST,
494
+ description='Returns a paginated list of subscriptions',
495
+ query_params=[
496
+ 'limit',
497
+ 'cursor',
498
+ 'customer_id',
499
+ 'external_customer_id',
500
+ 'status',
501
+ ],
502
+ query_params_schema={
503
+ 'limit': {
504
+ 'type': 'integer',
505
+ 'required': False,
506
+ 'default': 50,
507
+ },
508
+ 'cursor': {'type': 'string', 'required': False},
509
+ 'customer_id': {'type': 'string', 'required': False},
510
+ 'external_customer_id': {'type': 'string', 'required': False},
511
+ 'status': {'type': 'string', 'required': False},
512
+ },
513
+ response_schema={
514
+ 'type': 'object',
515
+ 'description': 'Paginated list of subscriptions',
516
+ 'properties': {
517
+ 'data': {
518
+ 'type': 'array',
519
+ 'items': {
520
+ 'type': 'object',
521
+ 'description': 'Subscription object',
522
+ 'properties': {
523
+ 'id': {'type': 'string', 'description': 'The unique identifier of the subscription'},
524
+ 'created_at': {
525
+ 'type': ['string', 'null'],
526
+ 'format': 'date-time',
527
+ 'description': 'The date and time when the subscription was created',
528
+ },
529
+ 'start_date': {
530
+ 'type': ['string', 'null'],
531
+ 'format': 'date-time',
532
+ 'description': 'The date and time when the subscription starts',
533
+ },
534
+ 'end_date': {
535
+ 'type': ['string', 'null'],
536
+ 'format': 'date-time',
537
+ 'description': 'The date and time when the subscription ends',
538
+ },
539
+ 'status': {
540
+ 'type': ['string', 'null'],
541
+ 'description': 'The current status of the subscription',
542
+ },
543
+ 'customer': {
544
+ 'type': ['object', 'null'],
545
+ 'description': 'The customer associated with the subscription',
546
+ 'properties': {
547
+ 'id': {
548
+ 'type': ['string', 'null'],
549
+ 'description': 'The customer ID',
550
+ },
551
+ 'external_customer_id': {
552
+ 'type': ['string', 'null'],
553
+ 'description': 'The external customer ID',
554
+ },
555
+ },
556
+ },
557
+ 'plan': {
558
+ 'type': ['object', 'null'],
559
+ 'description': 'The plan associated with the subscription',
560
+ 'properties': {
561
+ 'id': {
562
+ 'type': ['string', 'null'],
563
+ 'description': 'The plan ID',
564
+ },
565
+ 'name': {
566
+ 'type': ['string', 'null'],
567
+ 'description': 'The plan name',
568
+ },
569
+ },
570
+ },
571
+ 'current_billing_period_start_date': {
572
+ 'type': ['string', 'null'],
573
+ 'format': 'date-time',
574
+ 'description': 'The start date of the current billing period',
575
+ },
576
+ 'current_billing_period_end_date': {
577
+ 'type': ['string', 'null'],
578
+ 'format': 'date-time',
579
+ 'description': 'The end date of the current billing period',
580
+ },
581
+ 'active_plan_phase_order': {
582
+ 'type': ['integer', 'null'],
583
+ 'description': 'The order of the active plan phase',
584
+ },
585
+ 'fixed_fee_quantity_schedule': {
586
+ 'type': ['array', 'null'],
587
+ 'description': 'The fixed fee quantity schedule',
588
+ 'items': {'type': 'object'},
589
+ },
590
+ 'price_intervals': {
591
+ 'type': ['array', 'null'],
592
+ 'description': 'The price intervals for the subscription',
593
+ 'items': {'type': 'object'},
594
+ },
595
+ 'redeemed_coupon': {
596
+ 'type': ['object', 'null'],
597
+ 'description': 'The redeemed coupon for the subscription',
598
+ },
599
+ 'default_invoice_memo': {
600
+ 'type': ['string', 'null'],
601
+ 'description': 'The default invoice memo',
602
+ },
603
+ 'auto_collection': {
604
+ 'type': ['boolean', 'null'],
605
+ 'description': 'Whether auto collection is enabled',
606
+ },
607
+ 'net_terms': {
608
+ 'type': ['integer', 'null'],
609
+ 'description': 'The net terms for the subscription',
610
+ },
611
+ 'invoicing_threshold': {
612
+ 'type': ['string', 'null'],
613
+ 'description': 'The invoicing threshold',
614
+ },
615
+ 'metadata': {
616
+ 'type': ['object', 'null'],
617
+ 'description': 'Additional metadata for the subscription',
618
+ 'additionalProperties': True,
619
+ },
620
+ },
621
+ 'required': ['id'],
622
+ 'x-airbyte-entity-name': 'subscriptions',
623
+ 'x-airbyte-stream-name': 'subscriptions',
624
+ },
625
+ },
626
+ 'pagination_metadata': {
627
+ 'type': 'object',
628
+ 'description': 'Pagination metadata',
629
+ 'properties': {
630
+ 'has_more': {
631
+ 'type': ['boolean', 'null'],
632
+ 'description': 'Whether there are more results',
633
+ },
634
+ 'next_cursor': {
635
+ 'type': ['string', 'null'],
636
+ 'description': 'Cursor for the next page',
637
+ },
638
+ },
639
+ },
640
+ },
641
+ },
642
+ record_extractor='$.data',
643
+ meta_extractor={'next_cursor': '$.pagination_metadata.next_cursor'},
644
+ ),
645
+ Action.GET: EndpointDefinition(
646
+ method='GET',
647
+ path='/subscriptions/{subscription_id}',
648
+ action=Action.GET,
649
+ description='Get a single subscription by ID',
650
+ path_params=['subscription_id'],
651
+ path_params_schema={
652
+ 'subscription_id': {'type': 'string', 'required': True},
653
+ },
654
+ response_schema={
655
+ 'type': 'object',
656
+ 'description': 'Subscription object',
657
+ 'properties': {
658
+ 'id': {'type': 'string', 'description': 'The unique identifier of the subscription'},
659
+ 'created_at': {
660
+ 'type': ['string', 'null'],
661
+ 'format': 'date-time',
662
+ 'description': 'The date and time when the subscription was created',
663
+ },
664
+ 'start_date': {
665
+ 'type': ['string', 'null'],
666
+ 'format': 'date-time',
667
+ 'description': 'The date and time when the subscription starts',
668
+ },
669
+ 'end_date': {
670
+ 'type': ['string', 'null'],
671
+ 'format': 'date-time',
672
+ 'description': 'The date and time when the subscription ends',
673
+ },
674
+ 'status': {
675
+ 'type': ['string', 'null'],
676
+ 'description': 'The current status of the subscription',
677
+ },
678
+ 'customer': {
679
+ 'type': ['object', 'null'],
680
+ 'description': 'The customer associated with the subscription',
681
+ 'properties': {
682
+ 'id': {
683
+ 'type': ['string', 'null'],
684
+ 'description': 'The customer ID',
685
+ },
686
+ 'external_customer_id': {
687
+ 'type': ['string', 'null'],
688
+ 'description': 'The external customer ID',
689
+ },
690
+ },
691
+ },
692
+ 'plan': {
693
+ 'type': ['object', 'null'],
694
+ 'description': 'The plan associated with the subscription',
695
+ 'properties': {
696
+ 'id': {
697
+ 'type': ['string', 'null'],
698
+ 'description': 'The plan ID',
699
+ },
700
+ 'name': {
701
+ 'type': ['string', 'null'],
702
+ 'description': 'The plan name',
703
+ },
704
+ },
705
+ },
706
+ 'current_billing_period_start_date': {
707
+ 'type': ['string', 'null'],
708
+ 'format': 'date-time',
709
+ 'description': 'The start date of the current billing period',
710
+ },
711
+ 'current_billing_period_end_date': {
712
+ 'type': ['string', 'null'],
713
+ 'format': 'date-time',
714
+ 'description': 'The end date of the current billing period',
715
+ },
716
+ 'active_plan_phase_order': {
717
+ 'type': ['integer', 'null'],
718
+ 'description': 'The order of the active plan phase',
719
+ },
720
+ 'fixed_fee_quantity_schedule': {
721
+ 'type': ['array', 'null'],
722
+ 'description': 'The fixed fee quantity schedule',
723
+ 'items': {'type': 'object'},
724
+ },
725
+ 'price_intervals': {
726
+ 'type': ['array', 'null'],
727
+ 'description': 'The price intervals for the subscription',
728
+ 'items': {'type': 'object'},
729
+ },
730
+ 'redeemed_coupon': {
731
+ 'type': ['object', 'null'],
732
+ 'description': 'The redeemed coupon for the subscription',
733
+ },
734
+ 'default_invoice_memo': {
735
+ 'type': ['string', 'null'],
736
+ 'description': 'The default invoice memo',
737
+ },
738
+ 'auto_collection': {
739
+ 'type': ['boolean', 'null'],
740
+ 'description': 'Whether auto collection is enabled',
741
+ },
742
+ 'net_terms': {
743
+ 'type': ['integer', 'null'],
744
+ 'description': 'The net terms for the subscription',
745
+ },
746
+ 'invoicing_threshold': {
747
+ 'type': ['string', 'null'],
748
+ 'description': 'The invoicing threshold',
749
+ },
750
+ 'metadata': {
751
+ 'type': ['object', 'null'],
752
+ 'description': 'Additional metadata for the subscription',
753
+ 'additionalProperties': True,
754
+ },
755
+ },
756
+ 'required': ['id'],
757
+ 'x-airbyte-entity-name': 'subscriptions',
758
+ 'x-airbyte-stream-name': 'subscriptions',
759
+ },
760
+ ),
761
+ },
762
+ entity_schema={
763
+ 'type': 'object',
764
+ 'description': 'Subscription object',
765
+ 'properties': {
766
+ 'id': {'type': 'string', 'description': 'The unique identifier of the subscription'},
767
+ 'created_at': {
768
+ 'type': ['string', 'null'],
769
+ 'format': 'date-time',
770
+ 'description': 'The date and time when the subscription was created',
771
+ },
772
+ 'start_date': {
773
+ 'type': ['string', 'null'],
774
+ 'format': 'date-time',
775
+ 'description': 'The date and time when the subscription starts',
776
+ },
777
+ 'end_date': {
778
+ 'type': ['string', 'null'],
779
+ 'format': 'date-time',
780
+ 'description': 'The date and time when the subscription ends',
781
+ },
782
+ 'status': {
783
+ 'type': ['string', 'null'],
784
+ 'description': 'The current status of the subscription',
785
+ },
786
+ 'customer': {
787
+ 'type': ['object', 'null'],
788
+ 'description': 'The customer associated with the subscription',
789
+ 'properties': {
790
+ 'id': {
791
+ 'type': ['string', 'null'],
792
+ 'description': 'The customer ID',
793
+ },
794
+ 'external_customer_id': {
795
+ 'type': ['string', 'null'],
796
+ 'description': 'The external customer ID',
797
+ },
798
+ },
799
+ },
800
+ 'plan': {
801
+ 'type': ['object', 'null'],
802
+ 'description': 'The plan associated with the subscription',
803
+ 'properties': {
804
+ 'id': {
805
+ 'type': ['string', 'null'],
806
+ 'description': 'The plan ID',
807
+ },
808
+ 'name': {
809
+ 'type': ['string', 'null'],
810
+ 'description': 'The plan name',
811
+ },
812
+ },
813
+ },
814
+ 'current_billing_period_start_date': {
815
+ 'type': ['string', 'null'],
816
+ 'format': 'date-time',
817
+ 'description': 'The start date of the current billing period',
818
+ },
819
+ 'current_billing_period_end_date': {
820
+ 'type': ['string', 'null'],
821
+ 'format': 'date-time',
822
+ 'description': 'The end date of the current billing period',
823
+ },
824
+ 'active_plan_phase_order': {
825
+ 'type': ['integer', 'null'],
826
+ 'description': 'The order of the active plan phase',
827
+ },
828
+ 'fixed_fee_quantity_schedule': {
829
+ 'type': ['array', 'null'],
830
+ 'description': 'The fixed fee quantity schedule',
831
+ 'items': {'type': 'object'},
832
+ },
833
+ 'price_intervals': {
834
+ 'type': ['array', 'null'],
835
+ 'description': 'The price intervals for the subscription',
836
+ 'items': {'type': 'object'},
837
+ },
838
+ 'redeemed_coupon': {
839
+ 'type': ['object', 'null'],
840
+ 'description': 'The redeemed coupon for the subscription',
841
+ },
842
+ 'default_invoice_memo': {
843
+ 'type': ['string', 'null'],
844
+ 'description': 'The default invoice memo',
845
+ },
846
+ 'auto_collection': {
847
+ 'type': ['boolean', 'null'],
848
+ 'description': 'Whether auto collection is enabled',
849
+ },
850
+ 'net_terms': {
851
+ 'type': ['integer', 'null'],
852
+ 'description': 'The net terms for the subscription',
853
+ },
854
+ 'invoicing_threshold': {
855
+ 'type': ['string', 'null'],
856
+ 'description': 'The invoicing threshold',
857
+ },
858
+ 'metadata': {
859
+ 'type': ['object', 'null'],
860
+ 'description': 'Additional metadata for the subscription',
861
+ 'additionalProperties': True,
862
+ },
863
+ },
864
+ 'required': ['id'],
865
+ 'x-airbyte-entity-name': 'subscriptions',
866
+ 'x-airbyte-stream-name': 'subscriptions',
867
+ },
868
+ ),
869
+ EntityDefinition(
870
+ name='plans',
871
+ stream_name='plans',
872
+ actions=[Action.LIST, Action.GET],
873
+ endpoints={
874
+ Action.LIST: EndpointDefinition(
875
+ method='GET',
876
+ path='/plans',
877
+ action=Action.LIST,
878
+ description='Returns a paginated list of plans',
879
+ query_params=['limit', 'cursor'],
880
+ query_params_schema={
881
+ 'limit': {
882
+ 'type': 'integer',
883
+ 'required': False,
884
+ 'default': 50,
885
+ },
886
+ 'cursor': {'type': 'string', 'required': False},
887
+ },
888
+ response_schema={
889
+ 'type': 'object',
890
+ 'description': 'Paginated list of plans',
891
+ 'properties': {
892
+ 'data': {
893
+ 'type': 'array',
894
+ 'items': {
895
+ 'type': 'object',
896
+ 'description': 'Plan object',
897
+ 'properties': {
898
+ 'id': {'type': 'string', 'description': 'The unique identifier of the plan'},
899
+ 'created_at': {
900
+ 'type': ['string', 'null'],
901
+ 'format': 'date-time',
902
+ 'description': 'The date and time when the plan was created',
903
+ },
904
+ 'name': {
905
+ 'type': ['string', 'null'],
906
+ 'description': 'The name of the plan',
907
+ },
908
+ 'description': {
909
+ 'type': ['string', 'null'],
910
+ 'description': 'A description of the plan',
911
+ },
912
+ 'status': {
913
+ 'type': ['string', 'null'],
914
+ 'description': 'The status of the plan',
915
+ },
916
+ 'default_invoice_memo': {
917
+ 'type': ['string', 'null'],
918
+ 'description': 'The default invoice memo for the plan',
919
+ },
920
+ 'net_terms': {
921
+ 'type': ['integer', 'null'],
922
+ 'description': 'The net terms for the plan',
923
+ },
924
+ 'currency': {
925
+ 'type': ['string', 'null'],
926
+ 'description': 'The currency of the plan',
927
+ },
928
+ 'prices': {
929
+ 'type': ['array', 'null'],
930
+ 'description': 'The pricing options for the plan',
931
+ 'items': {
932
+ 'type': 'object',
933
+ 'properties': {
934
+ 'id': {
935
+ 'type': ['string', 'null'],
936
+ 'description': 'The unique identifier of the price',
937
+ },
938
+ 'name': {
939
+ 'type': ['string', 'null'],
940
+ 'description': 'The name of the price',
941
+ },
942
+ 'price_type': {
943
+ 'type': ['string', 'null'],
944
+ 'description': 'The type of price',
945
+ },
946
+ 'model_type': {
947
+ 'type': ['string', 'null'],
948
+ 'description': 'The model type of the price',
949
+ },
950
+ 'currency': {
951
+ 'type': ['string', 'null'],
952
+ 'description': 'The currency of the price',
953
+ },
954
+ },
955
+ },
956
+ },
957
+ 'product': {
958
+ 'type': ['object', 'null'],
959
+ 'description': 'The product associated with the plan',
960
+ 'properties': {
961
+ 'id': {
962
+ 'type': ['string', 'null'],
963
+ 'description': 'The product ID',
964
+ },
965
+ 'name': {
966
+ 'type': ['string', 'null'],
967
+ 'description': 'The product name',
968
+ },
969
+ },
970
+ },
971
+ 'minimum': {
972
+ 'type': ['object', 'null'],
973
+ 'description': 'The minimum configuration for the plan',
974
+ },
975
+ 'maximum': {
976
+ 'type': ['object', 'null'],
977
+ 'description': 'The maximum configuration for the plan',
978
+ },
979
+ 'discount': {
980
+ 'type': ['object', 'null'],
981
+ 'description': 'The discount configuration for the plan',
982
+ },
983
+ 'trial_config': {
984
+ 'type': ['object', 'null'],
985
+ 'description': 'The trial configuration for the plan',
986
+ },
987
+ 'plan_phases': {
988
+ 'type': ['array', 'null'],
989
+ 'description': 'The phases of the plan',
990
+ 'items': {'type': 'object'},
991
+ },
992
+ 'external_plan_id': {
993
+ 'type': ['string', 'null'],
994
+ 'description': 'The external plan ID',
995
+ },
996
+ 'invoicing_currency': {
997
+ 'type': ['string', 'null'],
998
+ 'description': 'The invoicing currency',
999
+ },
1000
+ 'metadata': {
1001
+ 'type': ['object', 'null'],
1002
+ 'description': 'Additional metadata for the plan',
1003
+ 'additionalProperties': True,
1004
+ },
1005
+ },
1006
+ 'required': ['id'],
1007
+ 'x-airbyte-entity-name': 'plans',
1008
+ 'x-airbyte-stream-name': 'plans',
1009
+ },
1010
+ },
1011
+ 'pagination_metadata': {
1012
+ 'type': 'object',
1013
+ 'description': 'Pagination metadata',
1014
+ 'properties': {
1015
+ 'has_more': {
1016
+ 'type': ['boolean', 'null'],
1017
+ 'description': 'Whether there are more results',
1018
+ },
1019
+ 'next_cursor': {
1020
+ 'type': ['string', 'null'],
1021
+ 'description': 'Cursor for the next page',
1022
+ },
1023
+ },
1024
+ },
1025
+ },
1026
+ },
1027
+ record_extractor='$.data',
1028
+ meta_extractor={'next_cursor': '$.pagination_metadata.next_cursor'},
1029
+ ),
1030
+ Action.GET: EndpointDefinition(
1031
+ method='GET',
1032
+ path='/plans/{plan_id}',
1033
+ action=Action.GET,
1034
+ description='Get a single plan by ID',
1035
+ path_params=['plan_id'],
1036
+ path_params_schema={
1037
+ 'plan_id': {'type': 'string', 'required': True},
1038
+ },
1039
+ response_schema={
1040
+ 'type': 'object',
1041
+ 'description': 'Plan object',
1042
+ 'properties': {
1043
+ 'id': {'type': 'string', 'description': 'The unique identifier of the plan'},
1044
+ 'created_at': {
1045
+ 'type': ['string', 'null'],
1046
+ 'format': 'date-time',
1047
+ 'description': 'The date and time when the plan was created',
1048
+ },
1049
+ 'name': {
1050
+ 'type': ['string', 'null'],
1051
+ 'description': 'The name of the plan',
1052
+ },
1053
+ 'description': {
1054
+ 'type': ['string', 'null'],
1055
+ 'description': 'A description of the plan',
1056
+ },
1057
+ 'status': {
1058
+ 'type': ['string', 'null'],
1059
+ 'description': 'The status of the plan',
1060
+ },
1061
+ 'default_invoice_memo': {
1062
+ 'type': ['string', 'null'],
1063
+ 'description': 'The default invoice memo for the plan',
1064
+ },
1065
+ 'net_terms': {
1066
+ 'type': ['integer', 'null'],
1067
+ 'description': 'The net terms for the plan',
1068
+ },
1069
+ 'currency': {
1070
+ 'type': ['string', 'null'],
1071
+ 'description': 'The currency of the plan',
1072
+ },
1073
+ 'prices': {
1074
+ 'type': ['array', 'null'],
1075
+ 'description': 'The pricing options for the plan',
1076
+ 'items': {
1077
+ 'type': 'object',
1078
+ 'properties': {
1079
+ 'id': {
1080
+ 'type': ['string', 'null'],
1081
+ 'description': 'The unique identifier of the price',
1082
+ },
1083
+ 'name': {
1084
+ 'type': ['string', 'null'],
1085
+ 'description': 'The name of the price',
1086
+ },
1087
+ 'price_type': {
1088
+ 'type': ['string', 'null'],
1089
+ 'description': 'The type of price',
1090
+ },
1091
+ 'model_type': {
1092
+ 'type': ['string', 'null'],
1093
+ 'description': 'The model type of the price',
1094
+ },
1095
+ 'currency': {
1096
+ 'type': ['string', 'null'],
1097
+ 'description': 'The currency of the price',
1098
+ },
1099
+ },
1100
+ },
1101
+ },
1102
+ 'product': {
1103
+ 'type': ['object', 'null'],
1104
+ 'description': 'The product associated with the plan',
1105
+ 'properties': {
1106
+ 'id': {
1107
+ 'type': ['string', 'null'],
1108
+ 'description': 'The product ID',
1109
+ },
1110
+ 'name': {
1111
+ 'type': ['string', 'null'],
1112
+ 'description': 'The product name',
1113
+ },
1114
+ },
1115
+ },
1116
+ 'minimum': {
1117
+ 'type': ['object', 'null'],
1118
+ 'description': 'The minimum configuration for the plan',
1119
+ },
1120
+ 'maximum': {
1121
+ 'type': ['object', 'null'],
1122
+ 'description': 'The maximum configuration for the plan',
1123
+ },
1124
+ 'discount': {
1125
+ 'type': ['object', 'null'],
1126
+ 'description': 'The discount configuration for the plan',
1127
+ },
1128
+ 'trial_config': {
1129
+ 'type': ['object', 'null'],
1130
+ 'description': 'The trial configuration for the plan',
1131
+ },
1132
+ 'plan_phases': {
1133
+ 'type': ['array', 'null'],
1134
+ 'description': 'The phases of the plan',
1135
+ 'items': {'type': 'object'},
1136
+ },
1137
+ 'external_plan_id': {
1138
+ 'type': ['string', 'null'],
1139
+ 'description': 'The external plan ID',
1140
+ },
1141
+ 'invoicing_currency': {
1142
+ 'type': ['string', 'null'],
1143
+ 'description': 'The invoicing currency',
1144
+ },
1145
+ 'metadata': {
1146
+ 'type': ['object', 'null'],
1147
+ 'description': 'Additional metadata for the plan',
1148
+ 'additionalProperties': True,
1149
+ },
1150
+ },
1151
+ 'required': ['id'],
1152
+ 'x-airbyte-entity-name': 'plans',
1153
+ 'x-airbyte-stream-name': 'plans',
1154
+ },
1155
+ ),
1156
+ },
1157
+ entity_schema={
1158
+ 'type': 'object',
1159
+ 'description': 'Plan object',
1160
+ 'properties': {
1161
+ 'id': {'type': 'string', 'description': 'The unique identifier of the plan'},
1162
+ 'created_at': {
1163
+ 'type': ['string', 'null'],
1164
+ 'format': 'date-time',
1165
+ 'description': 'The date and time when the plan was created',
1166
+ },
1167
+ 'name': {
1168
+ 'type': ['string', 'null'],
1169
+ 'description': 'The name of the plan',
1170
+ },
1171
+ 'description': {
1172
+ 'type': ['string', 'null'],
1173
+ 'description': 'A description of the plan',
1174
+ },
1175
+ 'status': {
1176
+ 'type': ['string', 'null'],
1177
+ 'description': 'The status of the plan',
1178
+ },
1179
+ 'default_invoice_memo': {
1180
+ 'type': ['string', 'null'],
1181
+ 'description': 'The default invoice memo for the plan',
1182
+ },
1183
+ 'net_terms': {
1184
+ 'type': ['integer', 'null'],
1185
+ 'description': 'The net terms for the plan',
1186
+ },
1187
+ 'currency': {
1188
+ 'type': ['string', 'null'],
1189
+ 'description': 'The currency of the plan',
1190
+ },
1191
+ 'prices': {
1192
+ 'type': ['array', 'null'],
1193
+ 'description': 'The pricing options for the plan',
1194
+ 'items': {
1195
+ 'type': 'object',
1196
+ 'properties': {
1197
+ 'id': {
1198
+ 'type': ['string', 'null'],
1199
+ 'description': 'The unique identifier of the price',
1200
+ },
1201
+ 'name': {
1202
+ 'type': ['string', 'null'],
1203
+ 'description': 'The name of the price',
1204
+ },
1205
+ 'price_type': {
1206
+ 'type': ['string', 'null'],
1207
+ 'description': 'The type of price',
1208
+ },
1209
+ 'model_type': {
1210
+ 'type': ['string', 'null'],
1211
+ 'description': 'The model type of the price',
1212
+ },
1213
+ 'currency': {
1214
+ 'type': ['string', 'null'],
1215
+ 'description': 'The currency of the price',
1216
+ },
1217
+ },
1218
+ },
1219
+ },
1220
+ 'product': {
1221
+ 'type': ['object', 'null'],
1222
+ 'description': 'The product associated with the plan',
1223
+ 'properties': {
1224
+ 'id': {
1225
+ 'type': ['string', 'null'],
1226
+ 'description': 'The product ID',
1227
+ },
1228
+ 'name': {
1229
+ 'type': ['string', 'null'],
1230
+ 'description': 'The product name',
1231
+ },
1232
+ },
1233
+ },
1234
+ 'minimum': {
1235
+ 'type': ['object', 'null'],
1236
+ 'description': 'The minimum configuration for the plan',
1237
+ },
1238
+ 'maximum': {
1239
+ 'type': ['object', 'null'],
1240
+ 'description': 'The maximum configuration for the plan',
1241
+ },
1242
+ 'discount': {
1243
+ 'type': ['object', 'null'],
1244
+ 'description': 'The discount configuration for the plan',
1245
+ },
1246
+ 'trial_config': {
1247
+ 'type': ['object', 'null'],
1248
+ 'description': 'The trial configuration for the plan',
1249
+ },
1250
+ 'plan_phases': {
1251
+ 'type': ['array', 'null'],
1252
+ 'description': 'The phases of the plan',
1253
+ 'items': {'type': 'object'},
1254
+ },
1255
+ 'external_plan_id': {
1256
+ 'type': ['string', 'null'],
1257
+ 'description': 'The external plan ID',
1258
+ },
1259
+ 'invoicing_currency': {
1260
+ 'type': ['string', 'null'],
1261
+ 'description': 'The invoicing currency',
1262
+ },
1263
+ 'metadata': {
1264
+ 'type': ['object', 'null'],
1265
+ 'description': 'Additional metadata for the plan',
1266
+ 'additionalProperties': True,
1267
+ },
1268
+ },
1269
+ 'required': ['id'],
1270
+ 'x-airbyte-entity-name': 'plans',
1271
+ 'x-airbyte-stream-name': 'plans',
1272
+ },
1273
+ ),
1274
+ EntityDefinition(
1275
+ name='invoices',
1276
+ stream_name='invoices',
1277
+ actions=[Action.LIST, Action.GET],
1278
+ endpoints={
1279
+ Action.LIST: EndpointDefinition(
1280
+ method='GET',
1281
+ path='/invoices',
1282
+ action=Action.LIST,
1283
+ description='Returns a paginated list of invoices',
1284
+ query_params=[
1285
+ 'limit',
1286
+ 'cursor',
1287
+ 'customer_id',
1288
+ 'external_customer_id',
1289
+ 'subscription_id',
1290
+ 'invoice_date_gt',
1291
+ 'invoice_date_gte',
1292
+ 'invoice_date_lt',
1293
+ 'invoice_date_lte',
1294
+ 'status',
1295
+ ],
1296
+ query_params_schema={
1297
+ 'limit': {
1298
+ 'type': 'integer',
1299
+ 'required': False,
1300
+ 'default': 50,
1301
+ },
1302
+ 'cursor': {'type': 'string', 'required': False},
1303
+ 'customer_id': {'type': 'string', 'required': False},
1304
+ 'external_customer_id': {'type': 'string', 'required': False},
1305
+ 'subscription_id': {'type': 'string', 'required': False},
1306
+ 'invoice_date_gt': {'type': 'string', 'required': False},
1307
+ 'invoice_date_gte': {'type': 'string', 'required': False},
1308
+ 'invoice_date_lt': {'type': 'string', 'required': False},
1309
+ 'invoice_date_lte': {'type': 'string', 'required': False},
1310
+ 'status': {'type': 'string', 'required': False},
1311
+ },
1312
+ response_schema={
1313
+ 'type': 'object',
1314
+ 'description': 'Paginated list of invoices',
1315
+ 'properties': {
1316
+ 'data': {
1317
+ 'type': 'array',
1318
+ 'items': {
1319
+ 'type': 'object',
1320
+ 'description': 'Invoice object',
1321
+ 'properties': {
1322
+ 'id': {'type': 'string', 'description': 'The unique identifier of the invoice'},
1323
+ 'created_at': {
1324
+ 'type': ['string', 'null'],
1325
+ 'format': 'date-time',
1326
+ 'description': 'The date and time when the invoice was created',
1327
+ },
1328
+ 'invoice_date': {
1329
+ 'type': ['string', 'null'],
1330
+ 'format': 'date-time',
1331
+ 'description': 'The date of the invoice',
1332
+ },
1333
+ 'due_date': {
1334
+ 'type': ['string', 'null'],
1335
+ 'format': 'date-time',
1336
+ 'description': 'The due date for the invoice',
1337
+ },
1338
+ 'invoice_pdf': {
1339
+ 'type': ['string', 'null'],
1340
+ 'description': 'The URL to download the PDF version of the invoice',
1341
+ },
1342
+ 'subtotal': {
1343
+ 'type': ['string', 'null'],
1344
+ 'description': 'The subtotal amount of the invoice',
1345
+ },
1346
+ 'total': {
1347
+ 'type': ['string', 'null'],
1348
+ 'description': 'The total amount of the invoice',
1349
+ },
1350
+ 'amount_due': {
1351
+ 'type': ['string', 'null'],
1352
+ 'description': 'The amount due on the invoice',
1353
+ },
1354
+ 'status': {
1355
+ 'type': ['string', 'null'],
1356
+ 'description': 'The current status of the invoice',
1357
+ },
1358
+ 'memo': {
1359
+ 'type': ['string', 'null'],
1360
+ 'description': 'Any additional notes or comments on the invoice',
1361
+ },
1362
+ 'issue_failed_at': {
1363
+ 'type': ['string', 'null'],
1364
+ 'format': 'date-time',
1365
+ 'description': 'The date and time when issuing the invoice failed',
1366
+ },
1367
+ 'sync_failed_at': {
1368
+ 'type': ['string', 'null'],
1369
+ 'format': 'date-time',
1370
+ 'description': 'The date and time when syncing the invoice failed',
1371
+ },
1372
+ 'payment_failed_at': {
1373
+ 'type': ['string', 'null'],
1374
+ 'format': 'date-time',
1375
+ 'description': 'The date and time when payment failed',
1376
+ },
1377
+ 'payment_started_at': {
1378
+ 'type': ['string', 'null'],
1379
+ 'format': 'date-time',
1380
+ 'description': 'The date and time when payment started',
1381
+ },
1382
+ 'voided_at': {
1383
+ 'type': ['string', 'null'],
1384
+ 'format': 'date-time',
1385
+ 'description': 'The date and time when the invoice was voided',
1386
+ },
1387
+ 'paid_at': {
1388
+ 'type': ['string', 'null'],
1389
+ 'format': 'date-time',
1390
+ 'description': 'The date and time when the invoice was paid',
1391
+ },
1392
+ 'issued_at': {
1393
+ 'type': ['string', 'null'],
1394
+ 'format': 'date-time',
1395
+ 'description': 'The date and time when the invoice was issued',
1396
+ },
1397
+ 'hosted_invoice_url': {
1398
+ 'type': ['string', 'null'],
1399
+ 'description': 'The URL to view the hosted invoice',
1400
+ },
1401
+ 'line_items': {
1402
+ 'type': ['array', 'null'],
1403
+ 'description': 'The line items on the invoice',
1404
+ 'items': {
1405
+ 'type': 'object',
1406
+ 'properties': {
1407
+ 'id': {
1408
+ 'type': ['string', 'null'],
1409
+ 'description': 'The unique identifier of the line item',
1410
+ },
1411
+ 'quantity': {
1412
+ 'type': ['number', 'null'],
1413
+ 'description': 'The quantity of the line item',
1414
+ },
1415
+ 'amount': {
1416
+ 'type': ['string', 'null'],
1417
+ 'description': 'The amount of the line item',
1418
+ },
1419
+ 'name': {
1420
+ 'type': ['string', 'null'],
1421
+ 'description': 'The name of the line item',
1422
+ },
1423
+ 'start_date': {
1424
+ 'type': ['string', 'null'],
1425
+ 'format': 'date-time',
1426
+ 'description': 'The start date of the line item',
1427
+ },
1428
+ 'end_date': {
1429
+ 'type': ['string', 'null'],
1430
+ 'format': 'date-time',
1431
+ 'description': 'The end date of the line item',
1432
+ },
1433
+ },
1434
+ },
1435
+ },
1436
+ 'subscription': {
1437
+ 'type': ['object', 'null'],
1438
+ 'description': 'The subscription associated with the invoice',
1439
+ 'properties': {
1440
+ 'id': {
1441
+ 'type': ['string', 'null'],
1442
+ 'description': 'The subscription ID',
1443
+ },
1444
+ },
1445
+ },
1446
+ 'customer': {
1447
+ 'type': ['object', 'null'],
1448
+ 'description': 'The customer associated with the invoice',
1449
+ 'properties': {
1450
+ 'id': {
1451
+ 'type': ['string', 'null'],
1452
+ 'description': 'The customer ID',
1453
+ },
1454
+ 'external_customer_id': {
1455
+ 'type': ['string', 'null'],
1456
+ 'description': 'The external customer ID',
1457
+ },
1458
+ },
1459
+ },
1460
+ 'currency': {
1461
+ 'type': ['string', 'null'],
1462
+ 'description': 'The currency of the invoice',
1463
+ },
1464
+ 'discount': {
1465
+ 'type': ['object', 'null'],
1466
+ 'description': 'The discount applied to the invoice',
1467
+ },
1468
+ 'minimum': {
1469
+ 'type': ['object', 'null'],
1470
+ 'description': 'The minimum configuration for the invoice',
1471
+ },
1472
+ 'maximum': {
1473
+ 'type': ['object', 'null'],
1474
+ 'description': 'The maximum configuration for the invoice',
1475
+ },
1476
+ 'credit_notes': {
1477
+ 'type': ['array', 'null'],
1478
+ 'description': 'Credit notes associated with the invoice',
1479
+ 'items': {'type': 'object'},
1480
+ },
1481
+ 'will_auto_issue': {
1482
+ 'type': ['boolean', 'null'],
1483
+ 'description': 'Whether the invoice will auto issue',
1484
+ },
1485
+ 'eligible_to_issue_at': {
1486
+ 'type': ['string', 'null'],
1487
+ 'format': 'date-time',
1488
+ 'description': 'The date when the invoice is eligible to issue',
1489
+ },
1490
+ 'customer_balance_transactions': {
1491
+ 'type': ['array', 'null'],
1492
+ 'description': 'Customer balance transactions',
1493
+ 'items': {'type': 'object'},
1494
+ },
1495
+ 'auto_collection': {
1496
+ 'type': ['object', 'null'],
1497
+ 'description': 'Auto collection settings',
1498
+ },
1499
+ 'invoice_number': {
1500
+ 'type': ['string', 'null'],
1501
+ 'description': 'The invoice number',
1502
+ },
1503
+ 'billing_address': {
1504
+ 'oneOf': [
1505
+ {
1506
+ 'type': 'object',
1507
+ 'description': 'Address object',
1508
+ 'properties': {
1509
+ 'city': {
1510
+ 'type': ['string', 'null'],
1511
+ 'description': 'The city of the address',
1512
+ },
1513
+ 'country': {
1514
+ 'type': ['string', 'null'],
1515
+ 'description': 'The country of the address',
1516
+ },
1517
+ 'line1': {
1518
+ 'type': ['string', 'null'],
1519
+ 'description': 'The first line of the address',
1520
+ },
1521
+ 'line2': {
1522
+ 'type': ['string', 'null'],
1523
+ 'description': 'The second line of the address',
1524
+ },
1525
+ 'postal_code': {
1526
+ 'type': ['string', 'null'],
1527
+ 'description': 'The postal code of the address',
1528
+ },
1529
+ 'state': {
1530
+ 'type': ['string', 'null'],
1531
+ 'description': 'The state or region of the address',
1532
+ },
1533
+ },
1534
+ },
1535
+ {'type': 'null'},
1536
+ ],
1537
+ 'description': 'The billing address on the invoice',
1538
+ },
1539
+ 'shipping_address': {
1540
+ 'oneOf': [
1541
+ {
1542
+ 'type': 'object',
1543
+ 'description': 'Address object',
1544
+ 'properties': {
1545
+ 'city': {
1546
+ 'type': ['string', 'null'],
1547
+ 'description': 'The city of the address',
1548
+ },
1549
+ 'country': {
1550
+ 'type': ['string', 'null'],
1551
+ 'description': 'The country of the address',
1552
+ },
1553
+ 'line1': {
1554
+ 'type': ['string', 'null'],
1555
+ 'description': 'The first line of the address',
1556
+ },
1557
+ 'line2': {
1558
+ 'type': ['string', 'null'],
1559
+ 'description': 'The second line of the address',
1560
+ },
1561
+ 'postal_code': {
1562
+ 'type': ['string', 'null'],
1563
+ 'description': 'The postal code of the address',
1564
+ },
1565
+ 'state': {
1566
+ 'type': ['string', 'null'],
1567
+ 'description': 'The state or region of the address',
1568
+ },
1569
+ },
1570
+ },
1571
+ {'type': 'null'},
1572
+ ],
1573
+ 'description': 'The shipping address on the invoice',
1574
+ },
1575
+ 'metadata': {
1576
+ 'type': ['object', 'null'],
1577
+ 'description': 'Additional metadata for the invoice',
1578
+ 'additionalProperties': True,
1579
+ },
1580
+ },
1581
+ 'required': ['id'],
1582
+ 'x-airbyte-entity-name': 'invoices',
1583
+ 'x-airbyte-stream-name': 'invoices',
1584
+ },
1585
+ },
1586
+ 'pagination_metadata': {
1587
+ 'type': 'object',
1588
+ 'description': 'Pagination metadata',
1589
+ 'properties': {
1590
+ 'has_more': {
1591
+ 'type': ['boolean', 'null'],
1592
+ 'description': 'Whether there are more results',
1593
+ },
1594
+ 'next_cursor': {
1595
+ 'type': ['string', 'null'],
1596
+ 'description': 'Cursor for the next page',
1597
+ },
1598
+ },
1599
+ },
1600
+ },
1601
+ },
1602
+ record_extractor='$.data',
1603
+ meta_extractor={'next_cursor': '$.pagination_metadata.next_cursor'},
1604
+ untested=True,
1605
+ ),
1606
+ Action.GET: EndpointDefinition(
1607
+ method='GET',
1608
+ path='/invoices/{invoice_id}',
1609
+ action=Action.GET,
1610
+ description='Get a single invoice by ID',
1611
+ path_params=['invoice_id'],
1612
+ path_params_schema={
1613
+ 'invoice_id': {'type': 'string', 'required': True},
1614
+ },
1615
+ response_schema={
1616
+ 'type': 'object',
1617
+ 'description': 'Invoice object',
1618
+ 'properties': {
1619
+ 'id': {'type': 'string', 'description': 'The unique identifier of the invoice'},
1620
+ 'created_at': {
1621
+ 'type': ['string', 'null'],
1622
+ 'format': 'date-time',
1623
+ 'description': 'The date and time when the invoice was created',
1624
+ },
1625
+ 'invoice_date': {
1626
+ 'type': ['string', 'null'],
1627
+ 'format': 'date-time',
1628
+ 'description': 'The date of the invoice',
1629
+ },
1630
+ 'due_date': {
1631
+ 'type': ['string', 'null'],
1632
+ 'format': 'date-time',
1633
+ 'description': 'The due date for the invoice',
1634
+ },
1635
+ 'invoice_pdf': {
1636
+ 'type': ['string', 'null'],
1637
+ 'description': 'The URL to download the PDF version of the invoice',
1638
+ },
1639
+ 'subtotal': {
1640
+ 'type': ['string', 'null'],
1641
+ 'description': 'The subtotal amount of the invoice',
1642
+ },
1643
+ 'total': {
1644
+ 'type': ['string', 'null'],
1645
+ 'description': 'The total amount of the invoice',
1646
+ },
1647
+ 'amount_due': {
1648
+ 'type': ['string', 'null'],
1649
+ 'description': 'The amount due on the invoice',
1650
+ },
1651
+ 'status': {
1652
+ 'type': ['string', 'null'],
1653
+ 'description': 'The current status of the invoice',
1654
+ },
1655
+ 'memo': {
1656
+ 'type': ['string', 'null'],
1657
+ 'description': 'Any additional notes or comments on the invoice',
1658
+ },
1659
+ 'issue_failed_at': {
1660
+ 'type': ['string', 'null'],
1661
+ 'format': 'date-time',
1662
+ 'description': 'The date and time when issuing the invoice failed',
1663
+ },
1664
+ 'sync_failed_at': {
1665
+ 'type': ['string', 'null'],
1666
+ 'format': 'date-time',
1667
+ 'description': 'The date and time when syncing the invoice failed',
1668
+ },
1669
+ 'payment_failed_at': {
1670
+ 'type': ['string', 'null'],
1671
+ 'format': 'date-time',
1672
+ 'description': 'The date and time when payment failed',
1673
+ },
1674
+ 'payment_started_at': {
1675
+ 'type': ['string', 'null'],
1676
+ 'format': 'date-time',
1677
+ 'description': 'The date and time when payment started',
1678
+ },
1679
+ 'voided_at': {
1680
+ 'type': ['string', 'null'],
1681
+ 'format': 'date-time',
1682
+ 'description': 'The date and time when the invoice was voided',
1683
+ },
1684
+ 'paid_at': {
1685
+ 'type': ['string', 'null'],
1686
+ 'format': 'date-time',
1687
+ 'description': 'The date and time when the invoice was paid',
1688
+ },
1689
+ 'issued_at': {
1690
+ 'type': ['string', 'null'],
1691
+ 'format': 'date-time',
1692
+ 'description': 'The date and time when the invoice was issued',
1693
+ },
1694
+ 'hosted_invoice_url': {
1695
+ 'type': ['string', 'null'],
1696
+ 'description': 'The URL to view the hosted invoice',
1697
+ },
1698
+ 'line_items': {
1699
+ 'type': ['array', 'null'],
1700
+ 'description': 'The line items on the invoice',
1701
+ 'items': {
1702
+ 'type': 'object',
1703
+ 'properties': {
1704
+ 'id': {
1705
+ 'type': ['string', 'null'],
1706
+ 'description': 'The unique identifier of the line item',
1707
+ },
1708
+ 'quantity': {
1709
+ 'type': ['number', 'null'],
1710
+ 'description': 'The quantity of the line item',
1711
+ },
1712
+ 'amount': {
1713
+ 'type': ['string', 'null'],
1714
+ 'description': 'The amount of the line item',
1715
+ },
1716
+ 'name': {
1717
+ 'type': ['string', 'null'],
1718
+ 'description': 'The name of the line item',
1719
+ },
1720
+ 'start_date': {
1721
+ 'type': ['string', 'null'],
1722
+ 'format': 'date-time',
1723
+ 'description': 'The start date of the line item',
1724
+ },
1725
+ 'end_date': {
1726
+ 'type': ['string', 'null'],
1727
+ 'format': 'date-time',
1728
+ 'description': 'The end date of the line item',
1729
+ },
1730
+ },
1731
+ },
1732
+ },
1733
+ 'subscription': {
1734
+ 'type': ['object', 'null'],
1735
+ 'description': 'The subscription associated with the invoice',
1736
+ 'properties': {
1737
+ 'id': {
1738
+ 'type': ['string', 'null'],
1739
+ 'description': 'The subscription ID',
1740
+ },
1741
+ },
1742
+ },
1743
+ 'customer': {
1744
+ 'type': ['object', 'null'],
1745
+ 'description': 'The customer associated with the invoice',
1746
+ 'properties': {
1747
+ 'id': {
1748
+ 'type': ['string', 'null'],
1749
+ 'description': 'The customer ID',
1750
+ },
1751
+ 'external_customer_id': {
1752
+ 'type': ['string', 'null'],
1753
+ 'description': 'The external customer ID',
1754
+ },
1755
+ },
1756
+ },
1757
+ 'currency': {
1758
+ 'type': ['string', 'null'],
1759
+ 'description': 'The currency of the invoice',
1760
+ },
1761
+ 'discount': {
1762
+ 'type': ['object', 'null'],
1763
+ 'description': 'The discount applied to the invoice',
1764
+ },
1765
+ 'minimum': {
1766
+ 'type': ['object', 'null'],
1767
+ 'description': 'The minimum configuration for the invoice',
1768
+ },
1769
+ 'maximum': {
1770
+ 'type': ['object', 'null'],
1771
+ 'description': 'The maximum configuration for the invoice',
1772
+ },
1773
+ 'credit_notes': {
1774
+ 'type': ['array', 'null'],
1775
+ 'description': 'Credit notes associated with the invoice',
1776
+ 'items': {'type': 'object'},
1777
+ },
1778
+ 'will_auto_issue': {
1779
+ 'type': ['boolean', 'null'],
1780
+ 'description': 'Whether the invoice will auto issue',
1781
+ },
1782
+ 'eligible_to_issue_at': {
1783
+ 'type': ['string', 'null'],
1784
+ 'format': 'date-time',
1785
+ 'description': 'The date when the invoice is eligible to issue',
1786
+ },
1787
+ 'customer_balance_transactions': {
1788
+ 'type': ['array', 'null'],
1789
+ 'description': 'Customer balance transactions',
1790
+ 'items': {'type': 'object'},
1791
+ },
1792
+ 'auto_collection': {
1793
+ 'type': ['object', 'null'],
1794
+ 'description': 'Auto collection settings',
1795
+ },
1796
+ 'invoice_number': {
1797
+ 'type': ['string', 'null'],
1798
+ 'description': 'The invoice number',
1799
+ },
1800
+ 'billing_address': {
1801
+ 'oneOf': [
1802
+ {
1803
+ 'type': 'object',
1804
+ 'description': 'Address object',
1805
+ 'properties': {
1806
+ 'city': {
1807
+ 'type': ['string', 'null'],
1808
+ 'description': 'The city of the address',
1809
+ },
1810
+ 'country': {
1811
+ 'type': ['string', 'null'],
1812
+ 'description': 'The country of the address',
1813
+ },
1814
+ 'line1': {
1815
+ 'type': ['string', 'null'],
1816
+ 'description': 'The first line of the address',
1817
+ },
1818
+ 'line2': {
1819
+ 'type': ['string', 'null'],
1820
+ 'description': 'The second line of the address',
1821
+ },
1822
+ 'postal_code': {
1823
+ 'type': ['string', 'null'],
1824
+ 'description': 'The postal code of the address',
1825
+ },
1826
+ 'state': {
1827
+ 'type': ['string', 'null'],
1828
+ 'description': 'The state or region of the address',
1829
+ },
1830
+ },
1831
+ },
1832
+ {'type': 'null'},
1833
+ ],
1834
+ 'description': 'The billing address on the invoice',
1835
+ },
1836
+ 'shipping_address': {
1837
+ 'oneOf': [
1838
+ {
1839
+ 'type': 'object',
1840
+ 'description': 'Address object',
1841
+ 'properties': {
1842
+ 'city': {
1843
+ 'type': ['string', 'null'],
1844
+ 'description': 'The city of the address',
1845
+ },
1846
+ 'country': {
1847
+ 'type': ['string', 'null'],
1848
+ 'description': 'The country of the address',
1849
+ },
1850
+ 'line1': {
1851
+ 'type': ['string', 'null'],
1852
+ 'description': 'The first line of the address',
1853
+ },
1854
+ 'line2': {
1855
+ 'type': ['string', 'null'],
1856
+ 'description': 'The second line of the address',
1857
+ },
1858
+ 'postal_code': {
1859
+ 'type': ['string', 'null'],
1860
+ 'description': 'The postal code of the address',
1861
+ },
1862
+ 'state': {
1863
+ 'type': ['string', 'null'],
1864
+ 'description': 'The state or region of the address',
1865
+ },
1866
+ },
1867
+ },
1868
+ {'type': 'null'},
1869
+ ],
1870
+ 'description': 'The shipping address on the invoice',
1871
+ },
1872
+ 'metadata': {
1873
+ 'type': ['object', 'null'],
1874
+ 'description': 'Additional metadata for the invoice',
1875
+ 'additionalProperties': True,
1876
+ },
1877
+ },
1878
+ 'required': ['id'],
1879
+ 'x-airbyte-entity-name': 'invoices',
1880
+ 'x-airbyte-stream-name': 'invoices',
1881
+ },
1882
+ untested=True,
1883
+ ),
1884
+ },
1885
+ entity_schema={
1886
+ 'type': 'object',
1887
+ 'description': 'Invoice object',
1888
+ 'properties': {
1889
+ 'id': {'type': 'string', 'description': 'The unique identifier of the invoice'},
1890
+ 'created_at': {
1891
+ 'type': ['string', 'null'],
1892
+ 'format': 'date-time',
1893
+ 'description': 'The date and time when the invoice was created',
1894
+ },
1895
+ 'invoice_date': {
1896
+ 'type': ['string', 'null'],
1897
+ 'format': 'date-time',
1898
+ 'description': 'The date of the invoice',
1899
+ },
1900
+ 'due_date': {
1901
+ 'type': ['string', 'null'],
1902
+ 'format': 'date-time',
1903
+ 'description': 'The due date for the invoice',
1904
+ },
1905
+ 'invoice_pdf': {
1906
+ 'type': ['string', 'null'],
1907
+ 'description': 'The URL to download the PDF version of the invoice',
1908
+ },
1909
+ 'subtotal': {
1910
+ 'type': ['string', 'null'],
1911
+ 'description': 'The subtotal amount of the invoice',
1912
+ },
1913
+ 'total': {
1914
+ 'type': ['string', 'null'],
1915
+ 'description': 'The total amount of the invoice',
1916
+ },
1917
+ 'amount_due': {
1918
+ 'type': ['string', 'null'],
1919
+ 'description': 'The amount due on the invoice',
1920
+ },
1921
+ 'status': {
1922
+ 'type': ['string', 'null'],
1923
+ 'description': 'The current status of the invoice',
1924
+ },
1925
+ 'memo': {
1926
+ 'type': ['string', 'null'],
1927
+ 'description': 'Any additional notes or comments on the invoice',
1928
+ },
1929
+ 'issue_failed_at': {
1930
+ 'type': ['string', 'null'],
1931
+ 'format': 'date-time',
1932
+ 'description': 'The date and time when issuing the invoice failed',
1933
+ },
1934
+ 'sync_failed_at': {
1935
+ 'type': ['string', 'null'],
1936
+ 'format': 'date-time',
1937
+ 'description': 'The date and time when syncing the invoice failed',
1938
+ },
1939
+ 'payment_failed_at': {
1940
+ 'type': ['string', 'null'],
1941
+ 'format': 'date-time',
1942
+ 'description': 'The date and time when payment failed',
1943
+ },
1944
+ 'payment_started_at': {
1945
+ 'type': ['string', 'null'],
1946
+ 'format': 'date-time',
1947
+ 'description': 'The date and time when payment started',
1948
+ },
1949
+ 'voided_at': {
1950
+ 'type': ['string', 'null'],
1951
+ 'format': 'date-time',
1952
+ 'description': 'The date and time when the invoice was voided',
1953
+ },
1954
+ 'paid_at': {
1955
+ 'type': ['string', 'null'],
1956
+ 'format': 'date-time',
1957
+ 'description': 'The date and time when the invoice was paid',
1958
+ },
1959
+ 'issued_at': {
1960
+ 'type': ['string', 'null'],
1961
+ 'format': 'date-time',
1962
+ 'description': 'The date and time when the invoice was issued',
1963
+ },
1964
+ 'hosted_invoice_url': {
1965
+ 'type': ['string', 'null'],
1966
+ 'description': 'The URL to view the hosted invoice',
1967
+ },
1968
+ 'line_items': {
1969
+ 'type': ['array', 'null'],
1970
+ 'description': 'The line items on the invoice',
1971
+ 'items': {
1972
+ 'type': 'object',
1973
+ 'properties': {
1974
+ 'id': {
1975
+ 'type': ['string', 'null'],
1976
+ 'description': 'The unique identifier of the line item',
1977
+ },
1978
+ 'quantity': {
1979
+ 'type': ['number', 'null'],
1980
+ 'description': 'The quantity of the line item',
1981
+ },
1982
+ 'amount': {
1983
+ 'type': ['string', 'null'],
1984
+ 'description': 'The amount of the line item',
1985
+ },
1986
+ 'name': {
1987
+ 'type': ['string', 'null'],
1988
+ 'description': 'The name of the line item',
1989
+ },
1990
+ 'start_date': {
1991
+ 'type': ['string', 'null'],
1992
+ 'format': 'date-time',
1993
+ 'description': 'The start date of the line item',
1994
+ },
1995
+ 'end_date': {
1996
+ 'type': ['string', 'null'],
1997
+ 'format': 'date-time',
1998
+ 'description': 'The end date of the line item',
1999
+ },
2000
+ },
2001
+ },
2002
+ },
2003
+ 'subscription': {
2004
+ 'type': ['object', 'null'],
2005
+ 'description': 'The subscription associated with the invoice',
2006
+ 'properties': {
2007
+ 'id': {
2008
+ 'type': ['string', 'null'],
2009
+ 'description': 'The subscription ID',
2010
+ },
2011
+ },
2012
+ },
2013
+ 'customer': {
2014
+ 'type': ['object', 'null'],
2015
+ 'description': 'The customer associated with the invoice',
2016
+ 'properties': {
2017
+ 'id': {
2018
+ 'type': ['string', 'null'],
2019
+ 'description': 'The customer ID',
2020
+ },
2021
+ 'external_customer_id': {
2022
+ 'type': ['string', 'null'],
2023
+ 'description': 'The external customer ID',
2024
+ },
2025
+ },
2026
+ },
2027
+ 'currency': {
2028
+ 'type': ['string', 'null'],
2029
+ 'description': 'The currency of the invoice',
2030
+ },
2031
+ 'discount': {
2032
+ 'type': ['object', 'null'],
2033
+ 'description': 'The discount applied to the invoice',
2034
+ },
2035
+ 'minimum': {
2036
+ 'type': ['object', 'null'],
2037
+ 'description': 'The minimum configuration for the invoice',
2038
+ },
2039
+ 'maximum': {
2040
+ 'type': ['object', 'null'],
2041
+ 'description': 'The maximum configuration for the invoice',
2042
+ },
2043
+ 'credit_notes': {
2044
+ 'type': ['array', 'null'],
2045
+ 'description': 'Credit notes associated with the invoice',
2046
+ 'items': {'type': 'object'},
2047
+ },
2048
+ 'will_auto_issue': {
2049
+ 'type': ['boolean', 'null'],
2050
+ 'description': 'Whether the invoice will auto issue',
2051
+ },
2052
+ 'eligible_to_issue_at': {
2053
+ 'type': ['string', 'null'],
2054
+ 'format': 'date-time',
2055
+ 'description': 'The date when the invoice is eligible to issue',
2056
+ },
2057
+ 'customer_balance_transactions': {
2058
+ 'type': ['array', 'null'],
2059
+ 'description': 'Customer balance transactions',
2060
+ 'items': {'type': 'object'},
2061
+ },
2062
+ 'auto_collection': {
2063
+ 'type': ['object', 'null'],
2064
+ 'description': 'Auto collection settings',
2065
+ },
2066
+ 'invoice_number': {
2067
+ 'type': ['string', 'null'],
2068
+ 'description': 'The invoice number',
2069
+ },
2070
+ 'billing_address': {
2071
+ 'oneOf': [
2072
+ {'$ref': '#/components/schemas/Address'},
2073
+ {'type': 'null'},
2074
+ ],
2075
+ 'description': 'The billing address on the invoice',
2076
+ },
2077
+ 'shipping_address': {
2078
+ 'oneOf': [
2079
+ {'$ref': '#/components/schemas/Address'},
2080
+ {'type': 'null'},
2081
+ ],
2082
+ 'description': 'The shipping address on the invoice',
2083
+ },
2084
+ 'metadata': {
2085
+ 'type': ['object', 'null'],
2086
+ 'description': 'Additional metadata for the invoice',
2087
+ 'additionalProperties': True,
2088
+ },
2089
+ },
2090
+ 'required': ['id'],
2091
+ 'x-airbyte-entity-name': 'invoices',
2092
+ 'x-airbyte-stream-name': 'invoices',
2093
+ },
2094
+ ),
2095
+ ],
2096
+ search_field_paths={
2097
+ 'customers': [
2098
+ 'id',
2099
+ 'external_customer_id',
2100
+ 'name',
2101
+ 'email',
2102
+ 'created_at',
2103
+ 'payment_provider',
2104
+ 'payment_provider_id',
2105
+ 'timezone',
2106
+ 'shipping_address',
2107
+ 'billing_address',
2108
+ 'balance',
2109
+ 'currency',
2110
+ 'auto_collection',
2111
+ 'metadata',
2112
+ ],
2113
+ 'subscriptions': [
2114
+ 'id',
2115
+ 'created_at',
2116
+ 'start_date',
2117
+ 'end_date',
2118
+ 'status',
2119
+ 'customer',
2120
+ 'plan',
2121
+ 'current_billing_period_start_date',
2122
+ 'current_billing_period_end_date',
2123
+ 'auto_collection',
2124
+ 'net_terms',
2125
+ 'metadata',
2126
+ ],
2127
+ 'plans': [
2128
+ 'id',
2129
+ 'created_at',
2130
+ 'name',
2131
+ 'description',
2132
+ 'status',
2133
+ 'currency',
2134
+ 'prices',
2135
+ 'prices[]',
2136
+ 'product',
2137
+ 'external_plan_id',
2138
+ 'metadata',
2139
+ ],
2140
+ 'invoices': [
2141
+ 'id',
2142
+ 'created_at',
2143
+ 'invoice_date',
2144
+ 'due_date',
2145
+ 'invoice_pdf',
2146
+ 'subtotal',
2147
+ 'total',
2148
+ 'amount_due',
2149
+ 'status',
2150
+ 'memo',
2151
+ 'paid_at',
2152
+ 'issued_at',
2153
+ 'hosted_invoice_url',
2154
+ 'line_items',
2155
+ 'line_items[]',
2156
+ 'subscription',
2157
+ 'customer',
2158
+ 'currency',
2159
+ 'invoice_number',
2160
+ 'metadata',
2161
+ ],
2162
+ },
2163
+ )