airbyte-agent-stripe 0.5.32__py3-none-any.whl → 0.5.37__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.
- airbyte_agent_stripe/__init__.py +108 -88
- airbyte_agent_stripe/_vendored/connector_sdk/constants.py +1 -1
- airbyte_agent_stripe/_vendored/connector_sdk/executor/local_executor.py +3 -3
- airbyte_agent_stripe/_vendored/connector_sdk/extensions.py +3 -3
- airbyte_agent_stripe/_vendored/connector_sdk/introspection.py +1 -1
- airbyte_agent_stripe/_vendored/connector_sdk/observability/config.py +179 -0
- airbyte_agent_stripe/_vendored/connector_sdk/observability/session.py +35 -28
- airbyte_agent_stripe/_vendored/connector_sdk/schema/operations.py +1 -1
- airbyte_agent_stripe/_vendored/connector_sdk/telemetry/events.py +2 -1
- airbyte_agent_stripe/_vendored/connector_sdk/telemetry/tracker.py +3 -0
- airbyte_agent_stripe/_vendored/connector_sdk/types.py +1 -1
- airbyte_agent_stripe/connector.py +291 -58
- airbyte_agent_stripe/connector_model.py +3444 -692
- airbyte_agent_stripe/models.py +880 -720
- airbyte_agent_stripe/types.py +41 -13
- {airbyte_agent_stripe-0.5.32.dist-info → airbyte_agent_stripe-0.5.37.dist-info}/METADATA +12 -16
- {airbyte_agent_stripe-0.5.32.dist-info → airbyte_agent_stripe-0.5.37.dist-info}/RECORD +18 -17
- {airbyte_agent_stripe-0.5.32.dist-info → airbyte_agent_stripe-0.5.37.dist-info}/WHEEL +0 -0
|
@@ -18,43 +18,50 @@ from .types import (
|
|
|
18
18
|
BalanceTransactionsGetParams,
|
|
19
19
|
BalanceTransactionsListParams,
|
|
20
20
|
BalanceTransactionsListParamsCreated,
|
|
21
|
+
ChargesApiSearchParams,
|
|
21
22
|
ChargesGetParams,
|
|
22
23
|
ChargesListParams,
|
|
23
24
|
ChargesListParamsCreated,
|
|
24
|
-
|
|
25
|
+
CustomersApiSearchParams,
|
|
26
|
+
CustomersCreateParams,
|
|
27
|
+
CustomersDeleteParams,
|
|
25
28
|
CustomersGetParams,
|
|
26
29
|
CustomersListParams,
|
|
27
30
|
CustomersListParamsCreated,
|
|
28
|
-
|
|
31
|
+
CustomersUpdateParams,
|
|
29
32
|
DisputesGetParams,
|
|
30
33
|
DisputesListParams,
|
|
31
34
|
DisputesListParamsCreated,
|
|
35
|
+
InvoicesApiSearchParams,
|
|
32
36
|
InvoicesGetParams,
|
|
33
37
|
InvoicesListParams,
|
|
34
38
|
InvoicesListParamsCreated,
|
|
35
|
-
|
|
39
|
+
PaymentIntentsApiSearchParams,
|
|
36
40
|
PaymentIntentsGetParams,
|
|
37
41
|
PaymentIntentsListParams,
|
|
38
42
|
PaymentIntentsListParamsCreated,
|
|
39
|
-
PaymentIntentsSearchParams,
|
|
40
43
|
PayoutsGetParams,
|
|
41
44
|
PayoutsListParams,
|
|
42
45
|
PayoutsListParamsArrivalDate,
|
|
43
46
|
PayoutsListParamsCreated,
|
|
47
|
+
ProductsApiSearchParams,
|
|
48
|
+
ProductsCreateParams,
|
|
49
|
+
ProductsDeleteParams,
|
|
44
50
|
ProductsGetParams,
|
|
45
51
|
ProductsListParams,
|
|
46
52
|
ProductsListParamsCreated,
|
|
47
|
-
|
|
53
|
+
ProductsUpdateParams,
|
|
54
|
+
RefundsCreateParams,
|
|
48
55
|
RefundsGetParams,
|
|
49
56
|
RefundsListParams,
|
|
50
57
|
RefundsListParamsCreated,
|
|
58
|
+
SubscriptionsApiSearchParams,
|
|
51
59
|
SubscriptionsGetParams,
|
|
52
60
|
SubscriptionsListParams,
|
|
53
61
|
SubscriptionsListParamsAutomaticTax,
|
|
54
62
|
SubscriptionsListParamsCreated,
|
|
55
63
|
SubscriptionsListParamsCurrentPeriodEnd,
|
|
56
64
|
SubscriptionsListParamsCurrentPeriodStart,
|
|
57
|
-
SubscriptionsSearchParams,
|
|
58
65
|
)
|
|
59
66
|
if TYPE_CHECKING:
|
|
60
67
|
from .models import StripeAuthConfig
|
|
@@ -63,16 +70,16 @@ from .models import (
|
|
|
63
70
|
StripeExecuteResult,
|
|
64
71
|
StripeExecuteResultWithMeta,
|
|
65
72
|
CustomersListResult,
|
|
66
|
-
|
|
73
|
+
CustomersApiSearchResult,
|
|
67
74
|
InvoicesListResult,
|
|
68
75
|
ChargesListResult,
|
|
69
76
|
SubscriptionsListResult,
|
|
70
77
|
RefundsListResult,
|
|
71
78
|
ProductsListResult,
|
|
72
|
-
|
|
79
|
+
ProductsApiSearchResult,
|
|
73
80
|
BalanceTransactionsListResult,
|
|
74
81
|
PaymentIntentsListResult,
|
|
75
|
-
|
|
82
|
+
PaymentIntentsApiSearchResult,
|
|
76
83
|
DisputesListResult,
|
|
77
84
|
PayoutsListResult,
|
|
78
85
|
Balance,
|
|
@@ -80,12 +87,14 @@ from .models import (
|
|
|
80
87
|
Charge,
|
|
81
88
|
ChargeSearchResult,
|
|
82
89
|
Customer,
|
|
90
|
+
CustomerDeletedResponse,
|
|
83
91
|
Dispute,
|
|
84
92
|
Invoice,
|
|
85
93
|
InvoiceSearchResult,
|
|
86
94
|
PaymentIntent,
|
|
87
95
|
Payout,
|
|
88
96
|
Product,
|
|
97
|
+
ProductDeletedResponse,
|
|
89
98
|
Refund,
|
|
90
99
|
Subscription,
|
|
91
100
|
SubscriptionSearchResult,
|
|
@@ -103,34 +112,41 @@ class StripeConnector:
|
|
|
103
112
|
"""
|
|
104
113
|
|
|
105
114
|
connector_name = "stripe"
|
|
106
|
-
connector_version = "0.1.
|
|
115
|
+
connector_version = "0.1.4"
|
|
107
116
|
vendored_sdk_version = "0.1.0" # Version of vendored connector-sdk
|
|
108
117
|
|
|
109
118
|
# Map of (entity, action) -> has_extractors for envelope wrapping decision
|
|
110
119
|
_EXTRACTOR_MAP = {
|
|
111
120
|
("customers", "list"): True,
|
|
121
|
+
("customers", "create"): False,
|
|
112
122
|
("customers", "get"): False,
|
|
113
|
-
("customers", "
|
|
123
|
+
("customers", "update"): False,
|
|
124
|
+
("customers", "delete"): False,
|
|
125
|
+
("customers", "api_search"): True,
|
|
114
126
|
("invoices", "list"): True,
|
|
115
127
|
("invoices", "get"): False,
|
|
116
|
-
("invoices", "
|
|
128
|
+
("invoices", "api_search"): False,
|
|
117
129
|
("charges", "list"): True,
|
|
118
130
|
("charges", "get"): False,
|
|
119
|
-
("charges", "
|
|
131
|
+
("charges", "api_search"): False,
|
|
120
132
|
("subscriptions", "list"): True,
|
|
121
133
|
("subscriptions", "get"): False,
|
|
122
|
-
("subscriptions", "
|
|
134
|
+
("subscriptions", "api_search"): False,
|
|
123
135
|
("refunds", "list"): True,
|
|
136
|
+
("refunds", "create"): False,
|
|
124
137
|
("refunds", "get"): False,
|
|
125
138
|
("products", "list"): True,
|
|
139
|
+
("products", "create"): False,
|
|
126
140
|
("products", "get"): False,
|
|
127
|
-
("products", "
|
|
141
|
+
("products", "update"): False,
|
|
142
|
+
("products", "delete"): False,
|
|
143
|
+
("products", "api_search"): True,
|
|
128
144
|
("balance", "get"): False,
|
|
129
145
|
("balance_transactions", "list"): True,
|
|
130
146
|
("balance_transactions", "get"): False,
|
|
131
147
|
("payment_intents", "list"): True,
|
|
132
148
|
("payment_intents", "get"): False,
|
|
133
|
-
("payment_intents", "
|
|
149
|
+
("payment_intents", "api_search"): True,
|
|
134
150
|
("disputes", "list"): True,
|
|
135
151
|
("disputes", "get"): False,
|
|
136
152
|
("payouts", "list"): True,
|
|
@@ -142,26 +158,30 @@ class StripeConnector:
|
|
|
142
158
|
_PARAM_MAP = {
|
|
143
159
|
('customers', 'list'): {'limit': 'limit', 'starting_after': 'starting_after', 'ending_before': 'ending_before', 'email': 'email', 'created': 'created'},
|
|
144
160
|
('customers', 'get'): {'id': 'id'},
|
|
145
|
-
('customers', '
|
|
161
|
+
('customers', 'update'): {'id': 'id'},
|
|
162
|
+
('customers', 'delete'): {'id': 'id'},
|
|
163
|
+
('customers', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
146
164
|
('invoices', 'list'): {'collection_method': 'collection_method', 'created': 'created', 'customer': 'customer', 'customer_account': 'customer_account', 'ending_before': 'ending_before', 'limit': 'limit', 'starting_after': 'starting_after', 'status': 'status', 'subscription': 'subscription'},
|
|
147
165
|
('invoices', 'get'): {'id': 'id'},
|
|
148
|
-
('invoices', '
|
|
166
|
+
('invoices', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
149
167
|
('charges', 'list'): {'created': 'created', 'customer': 'customer', 'ending_before': 'ending_before', 'limit': 'limit', 'payment_intent': 'payment_intent', 'starting_after': 'starting_after'},
|
|
150
168
|
('charges', 'get'): {'id': 'id'},
|
|
151
|
-
('charges', '
|
|
169
|
+
('charges', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
152
170
|
('subscriptions', 'list'): {'automatic_tax': 'automatic_tax', 'collection_method': 'collection_method', 'created': 'created', 'current_period_end': 'current_period_end', 'current_period_start': 'current_period_start', 'customer': 'customer', 'customer_account': 'customer_account', 'ending_before': 'ending_before', 'limit': 'limit', 'price': 'price', 'starting_after': 'starting_after', 'status': 'status'},
|
|
153
171
|
('subscriptions', 'get'): {'id': 'id'},
|
|
154
|
-
('subscriptions', '
|
|
172
|
+
('subscriptions', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
155
173
|
('refunds', 'list'): {'charge': 'charge', 'created': 'created', 'ending_before': 'ending_before', 'limit': 'limit', 'payment_intent': 'payment_intent', 'starting_after': 'starting_after'},
|
|
156
174
|
('refunds', 'get'): {'id': 'id'},
|
|
157
175
|
('products', 'list'): {'active': 'active', 'created': 'created', 'ending_before': 'ending_before', 'ids': 'ids', 'limit': 'limit', 'shippable': 'shippable', 'starting_after': 'starting_after', 'url': 'url'},
|
|
158
176
|
('products', 'get'): {'id': 'id'},
|
|
159
|
-
('products', '
|
|
177
|
+
('products', 'update'): {'id': 'id'},
|
|
178
|
+
('products', 'delete'): {'id': 'id'},
|
|
179
|
+
('products', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
160
180
|
('balance_transactions', 'list'): {'created': 'created', 'currency': 'currency', 'ending_before': 'ending_before', 'limit': 'limit', 'payout': 'payout', 'source': 'source', 'starting_after': 'starting_after', 'type': 'type'},
|
|
161
181
|
('balance_transactions', 'get'): {'id': 'id'},
|
|
162
182
|
('payment_intents', 'list'): {'created': 'created', 'customer': 'customer', 'customer_account': 'customer_account', 'ending_before': 'ending_before', 'limit': 'limit', 'starting_after': 'starting_after'},
|
|
163
183
|
('payment_intents', 'get'): {'id': 'id'},
|
|
164
|
-
('payment_intents', '
|
|
184
|
+
('payment_intents', 'api_search'): {'query': 'query', 'limit': 'limit', 'page': 'page'},
|
|
165
185
|
('disputes', 'list'): {'charge': 'charge', 'created': 'created', 'ending_before': 'ending_before', 'limit': 'limit', 'payment_intent': 'payment_intent', 'starting_after': 'starting_after'},
|
|
166
186
|
('disputes', 'get'): {'id': 'id'},
|
|
167
187
|
('payouts', 'list'): {'arrival_date': 'arrival_date', 'created': 'created', 'destination': 'destination', 'ending_before': 'ending_before', 'limit': 'limit', 'starting_after': 'starting_after', 'status': 'status'},
|
|
@@ -265,6 +285,14 @@ class StripeConnector:
|
|
|
265
285
|
params: "CustomersListParams"
|
|
266
286
|
) -> "CustomersListResult": ...
|
|
267
287
|
|
|
288
|
+
@overload
|
|
289
|
+
async def execute(
|
|
290
|
+
self,
|
|
291
|
+
entity: Literal["customers"],
|
|
292
|
+
action: Literal["create"],
|
|
293
|
+
params: "CustomersCreateParams"
|
|
294
|
+
) -> "Customer": ...
|
|
295
|
+
|
|
268
296
|
@overload
|
|
269
297
|
async def execute(
|
|
270
298
|
self,
|
|
@@ -277,9 +305,25 @@ class StripeConnector:
|
|
|
277
305
|
async def execute(
|
|
278
306
|
self,
|
|
279
307
|
entity: Literal["customers"],
|
|
280
|
-
action: Literal["
|
|
281
|
-
params: "
|
|
282
|
-
) -> "
|
|
308
|
+
action: Literal["update"],
|
|
309
|
+
params: "CustomersUpdateParams"
|
|
310
|
+
) -> "Customer": ...
|
|
311
|
+
|
|
312
|
+
@overload
|
|
313
|
+
async def execute(
|
|
314
|
+
self,
|
|
315
|
+
entity: Literal["customers"],
|
|
316
|
+
action: Literal["delete"],
|
|
317
|
+
params: "CustomersDeleteParams"
|
|
318
|
+
) -> "CustomerDeletedResponse": ...
|
|
319
|
+
|
|
320
|
+
@overload
|
|
321
|
+
async def execute(
|
|
322
|
+
self,
|
|
323
|
+
entity: Literal["customers"],
|
|
324
|
+
action: Literal["api_search"],
|
|
325
|
+
params: "CustomersApiSearchParams"
|
|
326
|
+
) -> "CustomersApiSearchResult": ...
|
|
283
327
|
|
|
284
328
|
@overload
|
|
285
329
|
async def execute(
|
|
@@ -301,8 +345,8 @@ class StripeConnector:
|
|
|
301
345
|
async def execute(
|
|
302
346
|
self,
|
|
303
347
|
entity: Literal["invoices"],
|
|
304
|
-
action: Literal["
|
|
305
|
-
params: "
|
|
348
|
+
action: Literal["api_search"],
|
|
349
|
+
params: "InvoicesApiSearchParams"
|
|
306
350
|
) -> "InvoiceSearchResult": ...
|
|
307
351
|
|
|
308
352
|
@overload
|
|
@@ -325,8 +369,8 @@ class StripeConnector:
|
|
|
325
369
|
async def execute(
|
|
326
370
|
self,
|
|
327
371
|
entity: Literal["charges"],
|
|
328
|
-
action: Literal["
|
|
329
|
-
params: "
|
|
372
|
+
action: Literal["api_search"],
|
|
373
|
+
params: "ChargesApiSearchParams"
|
|
330
374
|
) -> "ChargeSearchResult": ...
|
|
331
375
|
|
|
332
376
|
@overload
|
|
@@ -349,8 +393,8 @@ class StripeConnector:
|
|
|
349
393
|
async def execute(
|
|
350
394
|
self,
|
|
351
395
|
entity: Literal["subscriptions"],
|
|
352
|
-
action: Literal["
|
|
353
|
-
params: "
|
|
396
|
+
action: Literal["api_search"],
|
|
397
|
+
params: "SubscriptionsApiSearchParams"
|
|
354
398
|
) -> "SubscriptionSearchResult": ...
|
|
355
399
|
|
|
356
400
|
@overload
|
|
@@ -361,6 +405,14 @@ class StripeConnector:
|
|
|
361
405
|
params: "RefundsListParams"
|
|
362
406
|
) -> "RefundsListResult": ...
|
|
363
407
|
|
|
408
|
+
@overload
|
|
409
|
+
async def execute(
|
|
410
|
+
self,
|
|
411
|
+
entity: Literal["refunds"],
|
|
412
|
+
action: Literal["create"],
|
|
413
|
+
params: "RefundsCreateParams"
|
|
414
|
+
) -> "Refund": ...
|
|
415
|
+
|
|
364
416
|
@overload
|
|
365
417
|
async def execute(
|
|
366
418
|
self,
|
|
@@ -377,6 +429,14 @@ class StripeConnector:
|
|
|
377
429
|
params: "ProductsListParams"
|
|
378
430
|
) -> "ProductsListResult": ...
|
|
379
431
|
|
|
432
|
+
@overload
|
|
433
|
+
async def execute(
|
|
434
|
+
self,
|
|
435
|
+
entity: Literal["products"],
|
|
436
|
+
action: Literal["create"],
|
|
437
|
+
params: "ProductsCreateParams"
|
|
438
|
+
) -> "Product": ...
|
|
439
|
+
|
|
380
440
|
@overload
|
|
381
441
|
async def execute(
|
|
382
442
|
self,
|
|
@@ -389,9 +449,25 @@ class StripeConnector:
|
|
|
389
449
|
async def execute(
|
|
390
450
|
self,
|
|
391
451
|
entity: Literal["products"],
|
|
392
|
-
action: Literal["
|
|
393
|
-
params: "
|
|
394
|
-
) -> "
|
|
452
|
+
action: Literal["update"],
|
|
453
|
+
params: "ProductsUpdateParams"
|
|
454
|
+
) -> "Product": ...
|
|
455
|
+
|
|
456
|
+
@overload
|
|
457
|
+
async def execute(
|
|
458
|
+
self,
|
|
459
|
+
entity: Literal["products"],
|
|
460
|
+
action: Literal["delete"],
|
|
461
|
+
params: "ProductsDeleteParams"
|
|
462
|
+
) -> "ProductDeletedResponse": ...
|
|
463
|
+
|
|
464
|
+
@overload
|
|
465
|
+
async def execute(
|
|
466
|
+
self,
|
|
467
|
+
entity: Literal["products"],
|
|
468
|
+
action: Literal["api_search"],
|
|
469
|
+
params: "ProductsApiSearchParams"
|
|
470
|
+
) -> "ProductsApiSearchResult": ...
|
|
395
471
|
|
|
396
472
|
@overload
|
|
397
473
|
async def execute(
|
|
@@ -437,9 +513,9 @@ class StripeConnector:
|
|
|
437
513
|
async def execute(
|
|
438
514
|
self,
|
|
439
515
|
entity: Literal["payment_intents"],
|
|
440
|
-
action: Literal["
|
|
441
|
-
params: "
|
|
442
|
-
) -> "
|
|
516
|
+
action: Literal["api_search"],
|
|
517
|
+
params: "PaymentIntentsApiSearchParams"
|
|
518
|
+
) -> "PaymentIntentsApiSearchResult": ...
|
|
443
519
|
|
|
444
520
|
@overload
|
|
445
521
|
async def execute(
|
|
@@ -680,6 +756,25 @@ class CustomersQuery:
|
|
|
680
756
|
|
|
681
757
|
|
|
682
758
|
|
|
759
|
+
async def create(
|
|
760
|
+
self,
|
|
761
|
+
**kwargs
|
|
762
|
+
) -> Customer:
|
|
763
|
+
"""
|
|
764
|
+
Creates a new customer object.
|
|
765
|
+
|
|
766
|
+
Returns:
|
|
767
|
+
Customer
|
|
768
|
+
"""
|
|
769
|
+
params = {k: v for k, v in {
|
|
770
|
+
**kwargs
|
|
771
|
+
}.items() if v is not None}
|
|
772
|
+
|
|
773
|
+
result = await self._connector.execute("customers", "create", params)
|
|
774
|
+
return result
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
683
778
|
async def get(
|
|
684
779
|
self,
|
|
685
780
|
id: str | None = None,
|
|
@@ -705,13 +800,63 @@ class CustomersQuery:
|
|
|
705
800
|
|
|
706
801
|
|
|
707
802
|
|
|
708
|
-
async def
|
|
803
|
+
async def update(
|
|
804
|
+
self,
|
|
805
|
+
id: str | None = None,
|
|
806
|
+
**kwargs
|
|
807
|
+
) -> Customer:
|
|
808
|
+
"""
|
|
809
|
+
Updates the specified customer by setting the values of the parameters passed.
|
|
810
|
+
|
|
811
|
+
Args:
|
|
812
|
+
id: The customer ID
|
|
813
|
+
**kwargs: Additional parameters
|
|
814
|
+
|
|
815
|
+
Returns:
|
|
816
|
+
Customer
|
|
817
|
+
"""
|
|
818
|
+
params = {k: v for k, v in {
|
|
819
|
+
"id": id,
|
|
820
|
+
**kwargs
|
|
821
|
+
}.items() if v is not None}
|
|
822
|
+
|
|
823
|
+
result = await self._connector.execute("customers", "update", params)
|
|
824
|
+
return result
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
async def delete(
|
|
829
|
+
self,
|
|
830
|
+
id: str | None = None,
|
|
831
|
+
**kwargs
|
|
832
|
+
) -> CustomerDeletedResponse:
|
|
833
|
+
"""
|
|
834
|
+
Permanently deletes a customer. It cannot be undone.
|
|
835
|
+
|
|
836
|
+
Args:
|
|
837
|
+
id: The customer ID
|
|
838
|
+
**kwargs: Additional parameters
|
|
839
|
+
|
|
840
|
+
Returns:
|
|
841
|
+
CustomerDeletedResponse
|
|
842
|
+
"""
|
|
843
|
+
params = {k: v for k, v in {
|
|
844
|
+
"id": id,
|
|
845
|
+
**kwargs
|
|
846
|
+
}.items() if v is not None}
|
|
847
|
+
|
|
848
|
+
result = await self._connector.execute("customers", "delete", params)
|
|
849
|
+
return result
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
async def api_search(
|
|
709
854
|
self,
|
|
710
855
|
query: str,
|
|
711
856
|
limit: int | None = None,
|
|
712
857
|
page: str | None = None,
|
|
713
858
|
**kwargs
|
|
714
|
-
) ->
|
|
859
|
+
) -> CustomersApiSearchResult:
|
|
715
860
|
"""
|
|
716
861
|
Search for customers using Stripe's Search Query Language.
|
|
717
862
|
|
|
@@ -722,7 +867,7 @@ class CustomersQuery:
|
|
|
722
867
|
**kwargs: Additional parameters
|
|
723
868
|
|
|
724
869
|
Returns:
|
|
725
|
-
|
|
870
|
+
CustomersApiSearchResult
|
|
726
871
|
"""
|
|
727
872
|
params = {k: v for k, v in {
|
|
728
873
|
"query": query,
|
|
@@ -731,9 +876,9 @@ class CustomersQuery:
|
|
|
731
876
|
**kwargs
|
|
732
877
|
}.items() if v is not None}
|
|
733
878
|
|
|
734
|
-
result = await self._connector.execute("customers", "
|
|
879
|
+
result = await self._connector.execute("customers", "api_search", params)
|
|
735
880
|
# Cast generic envelope to concrete typed result
|
|
736
|
-
return
|
|
881
|
+
return CustomersApiSearchResult(
|
|
737
882
|
data=result.data,
|
|
738
883
|
meta=result.meta )
|
|
739
884
|
|
|
@@ -825,7 +970,7 @@ class InvoicesQuery:
|
|
|
825
970
|
|
|
826
971
|
|
|
827
972
|
|
|
828
|
-
async def
|
|
973
|
+
async def api_search(
|
|
829
974
|
self,
|
|
830
975
|
query: str,
|
|
831
976
|
limit: int | None = None,
|
|
@@ -851,7 +996,7 @@ class InvoicesQuery:
|
|
|
851
996
|
**kwargs
|
|
852
997
|
}.items() if v is not None}
|
|
853
998
|
|
|
854
|
-
result = await self._connector.execute("invoices", "
|
|
999
|
+
result = await self._connector.execute("invoices", "api_search", params)
|
|
855
1000
|
return result
|
|
856
1001
|
|
|
857
1002
|
|
|
@@ -933,7 +1078,7 @@ class ChargesQuery:
|
|
|
933
1078
|
|
|
934
1079
|
|
|
935
1080
|
|
|
936
|
-
async def
|
|
1081
|
+
async def api_search(
|
|
937
1082
|
self,
|
|
938
1083
|
query: str,
|
|
939
1084
|
limit: int | None = None,
|
|
@@ -959,7 +1104,7 @@ class ChargesQuery:
|
|
|
959
1104
|
**kwargs
|
|
960
1105
|
}.items() if v is not None}
|
|
961
1106
|
|
|
962
|
-
result = await self._connector.execute("charges", "
|
|
1107
|
+
result = await self._connector.execute("charges", "api_search", params)
|
|
963
1108
|
return result
|
|
964
1109
|
|
|
965
1110
|
|
|
@@ -1059,7 +1204,7 @@ class SubscriptionsQuery:
|
|
|
1059
1204
|
|
|
1060
1205
|
|
|
1061
1206
|
|
|
1062
|
-
async def
|
|
1207
|
+
async def api_search(
|
|
1063
1208
|
self,
|
|
1064
1209
|
query: str,
|
|
1065
1210
|
limit: int | None = None,
|
|
@@ -1085,7 +1230,7 @@ class SubscriptionsQuery:
|
|
|
1085
1230
|
**kwargs
|
|
1086
1231
|
}.items() if v is not None}
|
|
1087
1232
|
|
|
1088
|
-
result = await self._connector.execute("subscriptions", "
|
|
1233
|
+
result = await self._connector.execute("subscriptions", "api_search", params)
|
|
1089
1234
|
return result
|
|
1090
1235
|
|
|
1091
1236
|
|
|
@@ -1142,6 +1287,25 @@ class RefundsQuery:
|
|
|
1142
1287
|
|
|
1143
1288
|
|
|
1144
1289
|
|
|
1290
|
+
async def create(
|
|
1291
|
+
self,
|
|
1292
|
+
**kwargs
|
|
1293
|
+
) -> Refund:
|
|
1294
|
+
"""
|
|
1295
|
+
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. Creating a new refund will refund a charge that has previously been created but not yet refunded.
|
|
1296
|
+
|
|
1297
|
+
Returns:
|
|
1298
|
+
Refund
|
|
1299
|
+
"""
|
|
1300
|
+
params = {k: v for k, v in {
|
|
1301
|
+
**kwargs
|
|
1302
|
+
}.items() if v is not None}
|
|
1303
|
+
|
|
1304
|
+
result = await self._connector.execute("refunds", "create", params)
|
|
1305
|
+
return result
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1145
1309
|
async def get(
|
|
1146
1310
|
self,
|
|
1147
1311
|
id: str | None = None,
|
|
@@ -1225,6 +1389,25 @@ class ProductsQuery:
|
|
|
1225
1389
|
|
|
1226
1390
|
|
|
1227
1391
|
|
|
1392
|
+
async def create(
|
|
1393
|
+
self,
|
|
1394
|
+
**kwargs
|
|
1395
|
+
) -> Product:
|
|
1396
|
+
"""
|
|
1397
|
+
Creates a new product object. Your product's name, description, and other information will be displayed in all product and invoice displays.
|
|
1398
|
+
|
|
1399
|
+
Returns:
|
|
1400
|
+
Product
|
|
1401
|
+
"""
|
|
1402
|
+
params = {k: v for k, v in {
|
|
1403
|
+
**kwargs
|
|
1404
|
+
}.items() if v is not None}
|
|
1405
|
+
|
|
1406
|
+
result = await self._connector.execute("products", "create", params)
|
|
1407
|
+
return result
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1228
1411
|
async def get(
|
|
1229
1412
|
self,
|
|
1230
1413
|
id: str | None = None,
|
|
@@ -1250,13 +1433,63 @@ class ProductsQuery:
|
|
|
1250
1433
|
|
|
1251
1434
|
|
|
1252
1435
|
|
|
1253
|
-
async def
|
|
1436
|
+
async def update(
|
|
1437
|
+
self,
|
|
1438
|
+
id: str | None = None,
|
|
1439
|
+
**kwargs
|
|
1440
|
+
) -> Product:
|
|
1441
|
+
"""
|
|
1442
|
+
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
1443
|
+
|
|
1444
|
+
Args:
|
|
1445
|
+
id: The product ID
|
|
1446
|
+
**kwargs: Additional parameters
|
|
1447
|
+
|
|
1448
|
+
Returns:
|
|
1449
|
+
Product
|
|
1450
|
+
"""
|
|
1451
|
+
params = {k: v for k, v in {
|
|
1452
|
+
"id": id,
|
|
1453
|
+
**kwargs
|
|
1454
|
+
}.items() if v is not None}
|
|
1455
|
+
|
|
1456
|
+
result = await self._connector.execute("products", "update", params)
|
|
1457
|
+
return result
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
async def delete(
|
|
1462
|
+
self,
|
|
1463
|
+
id: str | None = None,
|
|
1464
|
+
**kwargs
|
|
1465
|
+
) -> ProductDeletedResponse:
|
|
1466
|
+
"""
|
|
1467
|
+
Deletes a product. Deleting a product is only possible if it has no prices associated with it.
|
|
1468
|
+
|
|
1469
|
+
Args:
|
|
1470
|
+
id: The product ID
|
|
1471
|
+
**kwargs: Additional parameters
|
|
1472
|
+
|
|
1473
|
+
Returns:
|
|
1474
|
+
ProductDeletedResponse
|
|
1475
|
+
"""
|
|
1476
|
+
params = {k: v for k, v in {
|
|
1477
|
+
"id": id,
|
|
1478
|
+
**kwargs
|
|
1479
|
+
}.items() if v is not None}
|
|
1480
|
+
|
|
1481
|
+
result = await self._connector.execute("products", "delete", params)
|
|
1482
|
+
return result
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
async def api_search(
|
|
1254
1487
|
self,
|
|
1255
1488
|
query: str,
|
|
1256
1489
|
limit: int | None = None,
|
|
1257
1490
|
page: str | None = None,
|
|
1258
1491
|
**kwargs
|
|
1259
|
-
) ->
|
|
1492
|
+
) -> ProductsApiSearchResult:
|
|
1260
1493
|
"""
|
|
1261
1494
|
Search for products using Stripe's Search Query Language.
|
|
1262
1495
|
|
|
@@ -1267,7 +1500,7 @@ class ProductsQuery:
|
|
|
1267
1500
|
**kwargs: Additional parameters
|
|
1268
1501
|
|
|
1269
1502
|
Returns:
|
|
1270
|
-
|
|
1503
|
+
ProductsApiSearchResult
|
|
1271
1504
|
"""
|
|
1272
1505
|
params = {k: v for k, v in {
|
|
1273
1506
|
"query": query,
|
|
@@ -1276,9 +1509,9 @@ class ProductsQuery:
|
|
|
1276
1509
|
**kwargs
|
|
1277
1510
|
}.items() if v is not None}
|
|
1278
1511
|
|
|
1279
|
-
result = await self._connector.execute("products", "
|
|
1512
|
+
result = await self._connector.execute("products", "api_search", params)
|
|
1280
1513
|
# Cast generic envelope to concrete typed result
|
|
1281
|
-
return
|
|
1514
|
+
return ProductsApiSearchResult(
|
|
1282
1515
|
data=result.data,
|
|
1283
1516
|
meta=result.meta )
|
|
1284
1517
|
|
|
@@ -1472,13 +1705,13 @@ class PaymentIntentsQuery:
|
|
|
1472
1705
|
|
|
1473
1706
|
|
|
1474
1707
|
|
|
1475
|
-
async def
|
|
1708
|
+
async def api_search(
|
|
1476
1709
|
self,
|
|
1477
1710
|
query: str,
|
|
1478
1711
|
limit: int | None = None,
|
|
1479
1712
|
page: str | None = None,
|
|
1480
1713
|
**kwargs
|
|
1481
|
-
) ->
|
|
1714
|
+
) -> PaymentIntentsApiSearchResult:
|
|
1482
1715
|
"""
|
|
1483
1716
|
Search for payment intents using Stripe's Search Query Language.
|
|
1484
1717
|
|
|
@@ -1489,7 +1722,7 @@ class PaymentIntentsQuery:
|
|
|
1489
1722
|
**kwargs: Additional parameters
|
|
1490
1723
|
|
|
1491
1724
|
Returns:
|
|
1492
|
-
|
|
1725
|
+
PaymentIntentsApiSearchResult
|
|
1493
1726
|
"""
|
|
1494
1727
|
params = {k: v for k, v in {
|
|
1495
1728
|
"query": query,
|
|
@@ -1498,9 +1731,9 @@ class PaymentIntentsQuery:
|
|
|
1498
1731
|
**kwargs
|
|
1499
1732
|
}.items() if v is not None}
|
|
1500
1733
|
|
|
1501
|
-
result = await self._connector.execute("payment_intents", "
|
|
1734
|
+
result = await self._connector.execute("payment_intents", "api_search", params)
|
|
1502
1735
|
# Cast generic envelope to concrete typed result
|
|
1503
|
-
return
|
|
1736
|
+
return PaymentIntentsApiSearchResult(
|
|
1504
1737
|
data=result.data,
|
|
1505
1738
|
meta=result.meta )
|
|
1506
1739
|
|