adila-pay 0.3.0__tar.gz
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.
- adila_pay-0.3.0/PKG-INFO +67 -0
- adila_pay-0.3.0/README.md +54 -0
- adila_pay-0.3.0/adila_pay/__init__.py +232 -0
- adila_pay-0.3.0/adila_pay/_default_clients.py +30 -0
- adila_pay-0.3.0/adila_pay/account/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/account/client.py +114 -0
- adila_pay-0.3.0/adila_pay/account/raw_client.py +363 -0
- adila_pay-0.3.0/adila_pay/balance/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/balance/client.py +114 -0
- adila_pay-0.3.0/adila_pay/balance/raw_client.py +363 -0
- adila_pay-0.3.0/adila_pay/balance_transactions/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/balance_transactions/client.py +174 -0
- adila_pay-0.3.0/adila_pay/balance_transactions/raw_client.py +421 -0
- adila_pay-0.3.0/adila_pay/billing_portal/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/billing_portal/client.py +151 -0
- adila_pay-0.3.0/adila_pay/billing_portal/raw_client.py +402 -0
- adila_pay-0.3.0/adila_pay/charges/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/charges/client.py +241 -0
- adila_pay-0.3.0/adila_pay/charges/raw_client.py +738 -0
- adila_pay-0.3.0/adila_pay/checkout/__init__.py +37 -0
- adila_pay-0.3.0/adila_pay/checkout/client.py +289 -0
- adila_pay-0.3.0/adila_pay/checkout/raw_client.py +785 -0
- adila_pay-0.3.0/adila_pay/checkout/types/__init__.py +38 -0
- adila_pay-0.3.0/adila_pay/checkout/types/create_checkout_request_line_items_item.py +20 -0
- adila_pay-0.3.0/adila_pay/checkout/types/create_checkout_request_mode.py +5 -0
- adila_pay-0.3.0/adila_pay/client.py +563 -0
- adila_pay-0.3.0/adila_pay/core/__init__.py +127 -0
- adila_pay-0.3.0/adila_pay/core/api_error.py +23 -0
- adila_pay-0.3.0/adila_pay/core/client_wrapper.py +138 -0
- adila_pay-0.3.0/adila_pay/core/datetime_utils.py +70 -0
- adila_pay-0.3.0/adila_pay/core/file.py +67 -0
- adila_pay-0.3.0/adila_pay/core/force_multipart.py +18 -0
- adila_pay-0.3.0/adila_pay/core/http_client.py +965 -0
- adila_pay-0.3.0/adila_pay/core/http_response.py +63 -0
- adila_pay-0.3.0/adila_pay/core/http_sse/__init__.py +42 -0
- adila_pay-0.3.0/adila_pay/core/http_sse/_api.py +455 -0
- adila_pay-0.3.0/adila_pay/core/http_sse/_decoders.py +74 -0
- adila_pay-0.3.0/adila_pay/core/http_sse/_exceptions.py +7 -0
- adila_pay-0.3.0/adila_pay/core/http_sse/_models.py +17 -0
- adila_pay-0.3.0/adila_pay/core/jsonable_encoder.py +133 -0
- adila_pay-0.3.0/adila_pay/core/logging.py +107 -0
- adila_pay-0.3.0/adila_pay/core/parse_error.py +36 -0
- adila_pay-0.3.0/adila_pay/core/pydantic_utilities.py +486 -0
- adila_pay-0.3.0/adila_pay/core/query_encoder.py +58 -0
- adila_pay-0.3.0/adila_pay/core/remove_none_from_dict.py +11 -0
- adila_pay-0.3.0/adila_pay/core/request_options.py +40 -0
- adila_pay-0.3.0/adila_pay/core/serialization.py +347 -0
- adila_pay-0.3.0/adila_pay/customers/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/customers/client.py +508 -0
- adila_pay-0.3.0/adila_pay/customers/raw_client.py +1523 -0
- adila_pay-0.3.0/adila_pay/disputes/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/disputes/client.py +219 -0
- adila_pay-0.3.0/adila_pay/disputes/raw_client.py +722 -0
- adila_pay-0.3.0/adila_pay/environment.py +7 -0
- adila_pay-0.3.0/adila_pay/errors/__init__.py +68 -0
- adila_pay-0.3.0/adila_pay/errors/bad_gateway_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/bad_request_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/conflict_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/forbidden_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/internal_server_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/not_found_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/payment_required_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/service_unavailable_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/too_many_requests_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/unauthorized_error.py +10 -0
- adila_pay-0.3.0/adila_pay/errors/unprocessable_entity_error.py +10 -0
- adila_pay-0.3.0/adila_pay/invoices/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/invoices/client.py +219 -0
- adila_pay-0.3.0/adila_pay/invoices/raw_client.py +722 -0
- adila_pay-0.3.0/adila_pay/openapi.json +5427 -0
- adila_pay-0.3.0/adila_pay/payment_intents/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/payment_intents/client.py +496 -0
- adila_pay-0.3.0/adila_pay/payment_intents/raw_client.py +1499 -0
- adila_pay-0.3.0/adila_pay/payment_links/__init__.py +37 -0
- adila_pay-0.3.0/adila_pay/payment_links/client.py +433 -0
- adila_pay-0.3.0/adila_pay/payment_links/raw_client.py +1185 -0
- adila_pay-0.3.0/adila_pay/payment_links/types/__init__.py +40 -0
- adila_pay-0.3.0/adila_pay/payment_links/types/create_payment_links_request_line_items_item.py +24 -0
- adila_pay-0.3.0/adila_pay/payment_links/types/create_payment_links_request_line_items_item_adjustable_quantity.py +21 -0
- adila_pay-0.3.0/adila_pay/payout_settings/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/payout_settings/client.py +114 -0
- adila_pay-0.3.0/adila_pay/payout_settings/raw_client.py +363 -0
- adila_pay-0.3.0/adila_pay/payouts/__init__.py +4 -0
- adila_pay-0.3.0/adila_pay/payouts/client.py +219 -0
- adila_pay-0.3.0/adila_pay/payouts/raw_client.py +722 -0
- adila_pay-0.3.0/adila_pay/prices/__init__.py +73 -0
- adila_pay-0.3.0/adila_pay/prices/client.py +544 -0
- adila_pay-0.3.0/adila_pay/prices/raw_client.py +1576 -0
- adila_pay-0.3.0/adila_pay/prices/types/__init__.py +71 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_billing_scheme.py +5 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_custom_unit_amount.py +22 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_product_data.py +20 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_recurring.py +22 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_recurring_interval.py +5 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_tax_behavior.py +5 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_tiers_item.py +22 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_tiers_item_up_to.py +7 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_tiers_item_up_to_zero.py +5 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_tiers_mode.py +5 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_transform_quantity.py +21 -0
- adila_pay-0.3.0/adila_pay/prices/types/create_prices_request_transform_quantity_round.py +5 -0
- adila_pay-0.3.0/adila_pay/products/__init__.py +52 -0
- adila_pay-0.3.0/adila_pay/products/client.py +609 -0
- adila_pay-0.3.0/adila_pay/products/raw_client.py +1643 -0
- adila_pay-0.3.0/adila_pay/products/types/__init__.py +52 -0
- adila_pay-0.3.0/adila_pay/products/types/create_products_request_default_price_data.py +22 -0
- adila_pay-0.3.0/adila_pay/products/types/create_products_request_default_price_data_recurring.py +23 -0
- adila_pay-0.3.0/adila_pay/products/types/create_products_request_default_price_data_recurring_interval.py +7 -0
- adila_pay-0.3.0/adila_pay/products/types/create_products_request_marketing_features_item.py +19 -0
- adila_pay-0.3.0/adila_pay/products/types/update_products_request_marketing_features_item.py +19 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/__init__.py +49 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/client.py +444 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/raw_client.py +1190 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/types/__init__.py +47 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/types/create_promotion_codes_request_discount.py +10 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/types/create_promotion_codes_request_discount_amount_off.py +20 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/types/create_promotion_codes_request_discount_percent_off.py +19 -0
- adila_pay-0.3.0/adila_pay/promotion_codes/types/create_promotion_codes_request_duration.py +5 -0
- adila_pay-0.3.0/adila_pay/provenance.json +8 -0
- adila_pay-0.3.0/adila_pay/py.typed +0 -0
- adila_pay-0.3.0/adila_pay/refunds/__init__.py +34 -0
- adila_pay-0.3.0/adila_pay/refunds/client.py +355 -0
- adila_pay-0.3.0/adila_pay/refunds/raw_client.py +1114 -0
- adila_pay-0.3.0/adila_pay/refunds/types/__init__.py +34 -0
- adila_pay-0.3.0/adila_pay/refunds/types/create_refunds_request_reason.py +7 -0
- adila_pay-0.3.0/adila_pay/subscriptions/__init__.py +34 -0
- adila_pay-0.3.0/adila_pay/subscriptions/client.py +355 -0
- adila_pay-0.3.0/adila_pay/subscriptions/raw_client.py +1104 -0
- adila_pay-0.3.0/adila_pay/subscriptions/types/__init__.py +34 -0
- adila_pay-0.3.0/adila_pay/subscriptions/types/list_subscriptions_request_status.py +10 -0
- adila_pay-0.3.0/adila_pay/types/__init__.py +35 -0
- adila_pay-0.3.0/adila_pay/types/stripe_list.py +21 -0
- adila_pay-0.3.0/adila_pay/types/stripe_object.py +8 -0
- adila_pay-0.3.0/adila_pay.egg-info/PKG-INFO +67 -0
- adila_pay-0.3.0/adila_pay.egg-info/SOURCES.txt +138 -0
- adila_pay-0.3.0/adila_pay.egg-info/dependency_links.txt +1 -0
- adila_pay-0.3.0/adila_pay.egg-info/requires.txt +3 -0
- adila_pay-0.3.0/adila_pay.egg-info/top_level.txt +1 -0
- adila_pay-0.3.0/pyproject.toml +27 -0
- adila_pay-0.3.0/setup.cfg +4 -0
adila_pay-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: adila-pay
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: SDK Adila Pay para Python, com clientes síncrono e assíncrono
|
|
5
|
+
Project-URL: Documentation, https://docs.adila.co/sdk
|
|
6
|
+
Project-URL: Repository, https://github.com/adila-sh/payment-sdks
|
|
7
|
+
Project-URL: Issues, https://github.com/adila-sh/payment-sdks/issues
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: httpx<1,>=0.28.1
|
|
11
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
12
|
+
Requires-Dist: typing_extensions<5,>=4.12
|
|
13
|
+
|
|
14
|
+
# Adila Pay para Python
|
|
15
|
+
|
|
16
|
+
SDK Python 3.10+ com clientes síncrono e assíncrono, gerado a partir do mesmo
|
|
17
|
+
contrato financeiro dos SDKs Node.js/Bun. O módulo se chama `adila_pay`.
|
|
18
|
+
|
|
19
|
+
## Instalação
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python -m pip install adila-pay
|
|
23
|
+
# ou
|
|
24
|
+
uv add adila-pay
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Uso no servidor
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import os
|
|
31
|
+
import httpx
|
|
32
|
+
from adila_pay import AdilaPayClient
|
|
33
|
+
|
|
34
|
+
with httpx.Client(follow_redirects=False) as transport:
|
|
35
|
+
client = AdilaPayClient(
|
|
36
|
+
base_url=os.environ["ADILA_PAY_BASE_URL"],
|
|
37
|
+
api_key=os.environ["ADILA_PAY_API_KEY"],
|
|
38
|
+
timeout=30,
|
|
39
|
+
max_retries=2,
|
|
40
|
+
httpx_client=transport,
|
|
41
|
+
)
|
|
42
|
+
customers = client.customers.list(
|
|
43
|
+
organization_id=os.environ["ADILA_PAY_ORGANIZATION_ID"],
|
|
44
|
+
limit=10,
|
|
45
|
+
)
|
|
46
|
+
customer = client.customers.create(
|
|
47
|
+
organization_id=os.environ["ADILA_PAY_ORGANIZATION_ID"],
|
|
48
|
+
idempotency_key="cliente-integracao-001",
|
|
49
|
+
name="Cliente de exemplo",
|
|
50
|
+
)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Para async, importe `AsyncAdilaPayClient`, use `httpx.AsyncClient` com
|
|
54
|
+
`async with` e aguarde os métodos com `await`. O contexto fecha o transporte.
|
|
55
|
+
Erros HTTP derivam de `adila_pay.core.api_error.ApiError` e expõem `status_code`.
|
|
56
|
+
Configure a URL da sua instalação; API keys pertencem somente ao servidor.
|
|
57
|
+
|
|
58
|
+
São 43 operações financeiras, incluindo links de pagamento, códigos promocionais e configuração de repasses.
|
|
59
|
+
Criação de conta, onboarding e cadastro humano
|
|
60
|
+
ficam fora do cliente. Respostas Stripe continuam abertas, com modelos Pydantic
|
|
61
|
+
para os envelopes de lista. A aplicação controla `starting_after` e `has_more`.
|
|
62
|
+
Mutações exigem chave de idempotência de 8 a 255 caracteres. Reutilize a mesma
|
|
63
|
+
chave e corpo somente para repetir a mesma operação lógica.
|
|
64
|
+
|
|
65
|
+
Consulte [a documentação](https://docs.adila.co/sdk) para o exemplo assíncrono
|
|
66
|
+
completo e os limites de ambiente. O módulo contém `openapi.json`,
|
|
67
|
+
`provenance.json` e `py.typed`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Adila Pay para Python
|
|
2
|
+
|
|
3
|
+
SDK Python 3.10+ com clientes síncrono e assíncrono, gerado a partir do mesmo
|
|
4
|
+
contrato financeiro dos SDKs Node.js/Bun. O módulo se chama `adila_pay`.
|
|
5
|
+
|
|
6
|
+
## Instalação
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
python -m pip install adila-pay
|
|
10
|
+
# ou
|
|
11
|
+
uv add adila-pay
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Uso no servidor
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
import os
|
|
18
|
+
import httpx
|
|
19
|
+
from adila_pay import AdilaPayClient
|
|
20
|
+
|
|
21
|
+
with httpx.Client(follow_redirects=False) as transport:
|
|
22
|
+
client = AdilaPayClient(
|
|
23
|
+
base_url=os.environ["ADILA_PAY_BASE_URL"],
|
|
24
|
+
api_key=os.environ["ADILA_PAY_API_KEY"],
|
|
25
|
+
timeout=30,
|
|
26
|
+
max_retries=2,
|
|
27
|
+
httpx_client=transport,
|
|
28
|
+
)
|
|
29
|
+
customers = client.customers.list(
|
|
30
|
+
organization_id=os.environ["ADILA_PAY_ORGANIZATION_ID"],
|
|
31
|
+
limit=10,
|
|
32
|
+
)
|
|
33
|
+
customer = client.customers.create(
|
|
34
|
+
organization_id=os.environ["ADILA_PAY_ORGANIZATION_ID"],
|
|
35
|
+
idempotency_key="cliente-integracao-001",
|
|
36
|
+
name="Cliente de exemplo",
|
|
37
|
+
)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Para async, importe `AsyncAdilaPayClient`, use `httpx.AsyncClient` com
|
|
41
|
+
`async with` e aguarde os métodos com `await`. O contexto fecha o transporte.
|
|
42
|
+
Erros HTTP derivam de `adila_pay.core.api_error.ApiError` e expõem `status_code`.
|
|
43
|
+
Configure a URL da sua instalação; API keys pertencem somente ao servidor.
|
|
44
|
+
|
|
45
|
+
São 43 operações financeiras, incluindo links de pagamento, códigos promocionais e configuração de repasses.
|
|
46
|
+
Criação de conta, onboarding e cadastro humano
|
|
47
|
+
ficam fora do cliente. Respostas Stripe continuam abertas, com modelos Pydantic
|
|
48
|
+
para os envelopes de lista. A aplicação controla `starting_after` e `has_more`.
|
|
49
|
+
Mutações exigem chave de idempotência de 8 a 255 caracteres. Reutilize a mesma
|
|
50
|
+
chave e corpo somente para repetir a mesma operação lógica.
|
|
51
|
+
|
|
52
|
+
Consulte [a documentação](https://docs.adila.co/sdk) para o exemplo assíncrono
|
|
53
|
+
completo e os limites de ambiente. O módulo contém `openapi.json`,
|
|
54
|
+
`provenance.json` e `py.typed`.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import StripeList, StripeObject
|
|
10
|
+
from .errors import (
|
|
11
|
+
BadGatewayError,
|
|
12
|
+
BadRequestError,
|
|
13
|
+
ConflictError,
|
|
14
|
+
ForbiddenError,
|
|
15
|
+
InternalServerError,
|
|
16
|
+
NotFoundError,
|
|
17
|
+
PaymentRequiredError,
|
|
18
|
+
ServiceUnavailableError,
|
|
19
|
+
TooManyRequestsError,
|
|
20
|
+
UnauthorizedError,
|
|
21
|
+
UnprocessableEntityError,
|
|
22
|
+
)
|
|
23
|
+
from . import (
|
|
24
|
+
account,
|
|
25
|
+
balance,
|
|
26
|
+
balance_transactions,
|
|
27
|
+
billing_portal,
|
|
28
|
+
charges,
|
|
29
|
+
checkout,
|
|
30
|
+
customers,
|
|
31
|
+
disputes,
|
|
32
|
+
invoices,
|
|
33
|
+
payment_intents,
|
|
34
|
+
payment_links,
|
|
35
|
+
payout_settings,
|
|
36
|
+
payouts,
|
|
37
|
+
prices,
|
|
38
|
+
products,
|
|
39
|
+
promotion_codes,
|
|
40
|
+
refunds,
|
|
41
|
+
subscriptions,
|
|
42
|
+
)
|
|
43
|
+
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
|
|
44
|
+
from .checkout import CreateCheckoutRequestLineItemsItem, CreateCheckoutRequestMode
|
|
45
|
+
from .client import AdilaPayClient, AsyncAdilaPayClient
|
|
46
|
+
from .environment import AdilaPayClientEnvironment
|
|
47
|
+
from .payment_links import (
|
|
48
|
+
CreatePaymentLinksRequestLineItemsItem,
|
|
49
|
+
CreatePaymentLinksRequestLineItemsItemAdjustableQuantity,
|
|
50
|
+
)
|
|
51
|
+
from .prices import (
|
|
52
|
+
CreatePricesRequestBillingScheme,
|
|
53
|
+
CreatePricesRequestCustomUnitAmount,
|
|
54
|
+
CreatePricesRequestProductData,
|
|
55
|
+
CreatePricesRequestRecurring,
|
|
56
|
+
CreatePricesRequestRecurringInterval,
|
|
57
|
+
CreatePricesRequestTaxBehavior,
|
|
58
|
+
CreatePricesRequestTiersItem,
|
|
59
|
+
CreatePricesRequestTiersItemUpTo,
|
|
60
|
+
CreatePricesRequestTiersItemUpToZero,
|
|
61
|
+
CreatePricesRequestTiersMode,
|
|
62
|
+
CreatePricesRequestTransformQuantity,
|
|
63
|
+
CreatePricesRequestTransformQuantityRound,
|
|
64
|
+
)
|
|
65
|
+
from .products import (
|
|
66
|
+
CreateProductsRequestDefaultPriceData,
|
|
67
|
+
CreateProductsRequestDefaultPriceDataRecurring,
|
|
68
|
+
CreateProductsRequestDefaultPriceDataRecurringInterval,
|
|
69
|
+
CreateProductsRequestMarketingFeaturesItem,
|
|
70
|
+
UpdateProductsRequestMarketingFeaturesItem,
|
|
71
|
+
)
|
|
72
|
+
from .promotion_codes import (
|
|
73
|
+
CreatePromotionCodesRequestDiscount,
|
|
74
|
+
CreatePromotionCodesRequestDiscountAmountOff,
|
|
75
|
+
CreatePromotionCodesRequestDiscountPercentOff,
|
|
76
|
+
CreatePromotionCodesRequestDuration,
|
|
77
|
+
)
|
|
78
|
+
from .refunds import CreateRefundsRequestReason
|
|
79
|
+
from .subscriptions import ListSubscriptionsRequestStatus
|
|
80
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
81
|
+
"AdilaPayClient": ".client",
|
|
82
|
+
"AdilaPayClientEnvironment": ".environment",
|
|
83
|
+
"AsyncAdilaPayClient": ".client",
|
|
84
|
+
"BadGatewayError": ".errors",
|
|
85
|
+
"BadRequestError": ".errors",
|
|
86
|
+
"ConflictError": ".errors",
|
|
87
|
+
"CreateCheckoutRequestLineItemsItem": ".checkout",
|
|
88
|
+
"CreateCheckoutRequestMode": ".checkout",
|
|
89
|
+
"CreatePaymentLinksRequestLineItemsItem": ".payment_links",
|
|
90
|
+
"CreatePaymentLinksRequestLineItemsItemAdjustableQuantity": ".payment_links",
|
|
91
|
+
"CreatePricesRequestBillingScheme": ".prices",
|
|
92
|
+
"CreatePricesRequestCustomUnitAmount": ".prices",
|
|
93
|
+
"CreatePricesRequestProductData": ".prices",
|
|
94
|
+
"CreatePricesRequestRecurring": ".prices",
|
|
95
|
+
"CreatePricesRequestRecurringInterval": ".prices",
|
|
96
|
+
"CreatePricesRequestTaxBehavior": ".prices",
|
|
97
|
+
"CreatePricesRequestTiersItem": ".prices",
|
|
98
|
+
"CreatePricesRequestTiersItemUpTo": ".prices",
|
|
99
|
+
"CreatePricesRequestTiersItemUpToZero": ".prices",
|
|
100
|
+
"CreatePricesRequestTiersMode": ".prices",
|
|
101
|
+
"CreatePricesRequestTransformQuantity": ".prices",
|
|
102
|
+
"CreatePricesRequestTransformQuantityRound": ".prices",
|
|
103
|
+
"CreateProductsRequestDefaultPriceData": ".products",
|
|
104
|
+
"CreateProductsRequestDefaultPriceDataRecurring": ".products",
|
|
105
|
+
"CreateProductsRequestDefaultPriceDataRecurringInterval": ".products",
|
|
106
|
+
"CreateProductsRequestMarketingFeaturesItem": ".products",
|
|
107
|
+
"CreatePromotionCodesRequestDiscount": ".promotion_codes",
|
|
108
|
+
"CreatePromotionCodesRequestDiscountAmountOff": ".promotion_codes",
|
|
109
|
+
"CreatePromotionCodesRequestDiscountPercentOff": ".promotion_codes",
|
|
110
|
+
"CreatePromotionCodesRequestDuration": ".promotion_codes",
|
|
111
|
+
"CreateRefundsRequestReason": ".refunds",
|
|
112
|
+
"DefaultAioHttpClient": "._default_clients",
|
|
113
|
+
"DefaultAsyncHttpxClient": "._default_clients",
|
|
114
|
+
"ForbiddenError": ".errors",
|
|
115
|
+
"InternalServerError": ".errors",
|
|
116
|
+
"ListSubscriptionsRequestStatus": ".subscriptions",
|
|
117
|
+
"NotFoundError": ".errors",
|
|
118
|
+
"PaymentRequiredError": ".errors",
|
|
119
|
+
"ServiceUnavailableError": ".errors",
|
|
120
|
+
"StripeList": ".types",
|
|
121
|
+
"StripeObject": ".types",
|
|
122
|
+
"TooManyRequestsError": ".errors",
|
|
123
|
+
"UnauthorizedError": ".errors",
|
|
124
|
+
"UnprocessableEntityError": ".errors",
|
|
125
|
+
"UpdateProductsRequestMarketingFeaturesItem": ".products",
|
|
126
|
+
"account": ".account",
|
|
127
|
+
"balance": ".balance",
|
|
128
|
+
"balance_transactions": ".balance_transactions",
|
|
129
|
+
"billing_portal": ".billing_portal",
|
|
130
|
+
"charges": ".charges",
|
|
131
|
+
"checkout": ".checkout",
|
|
132
|
+
"customers": ".customers",
|
|
133
|
+
"disputes": ".disputes",
|
|
134
|
+
"invoices": ".invoices",
|
|
135
|
+
"payment_intents": ".payment_intents",
|
|
136
|
+
"payment_links": ".payment_links",
|
|
137
|
+
"payout_settings": ".payout_settings",
|
|
138
|
+
"payouts": ".payouts",
|
|
139
|
+
"prices": ".prices",
|
|
140
|
+
"products": ".products",
|
|
141
|
+
"promotion_codes": ".promotion_codes",
|
|
142
|
+
"refunds": ".refunds",
|
|
143
|
+
"subscriptions": ".subscriptions",
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
148
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
149
|
+
if module_name is None:
|
|
150
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
151
|
+
try:
|
|
152
|
+
module = import_module(module_name, __package__)
|
|
153
|
+
if module_name == f".{attr_name}":
|
|
154
|
+
return module
|
|
155
|
+
else:
|
|
156
|
+
return getattr(module, attr_name)
|
|
157
|
+
except ImportError as e:
|
|
158
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
159
|
+
except AttributeError as e:
|
|
160
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def __dir__():
|
|
164
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
165
|
+
return sorted(lazy_attrs)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
__all__ = [
|
|
169
|
+
"AdilaPayClient",
|
|
170
|
+
"AdilaPayClientEnvironment",
|
|
171
|
+
"AsyncAdilaPayClient",
|
|
172
|
+
"BadGatewayError",
|
|
173
|
+
"BadRequestError",
|
|
174
|
+
"ConflictError",
|
|
175
|
+
"CreateCheckoutRequestLineItemsItem",
|
|
176
|
+
"CreateCheckoutRequestMode",
|
|
177
|
+
"CreatePaymentLinksRequestLineItemsItem",
|
|
178
|
+
"CreatePaymentLinksRequestLineItemsItemAdjustableQuantity",
|
|
179
|
+
"CreatePricesRequestBillingScheme",
|
|
180
|
+
"CreatePricesRequestCustomUnitAmount",
|
|
181
|
+
"CreatePricesRequestProductData",
|
|
182
|
+
"CreatePricesRequestRecurring",
|
|
183
|
+
"CreatePricesRequestRecurringInterval",
|
|
184
|
+
"CreatePricesRequestTaxBehavior",
|
|
185
|
+
"CreatePricesRequestTiersItem",
|
|
186
|
+
"CreatePricesRequestTiersItemUpTo",
|
|
187
|
+
"CreatePricesRequestTiersItemUpToZero",
|
|
188
|
+
"CreatePricesRequestTiersMode",
|
|
189
|
+
"CreatePricesRequestTransformQuantity",
|
|
190
|
+
"CreatePricesRequestTransformQuantityRound",
|
|
191
|
+
"CreateProductsRequestDefaultPriceData",
|
|
192
|
+
"CreateProductsRequestDefaultPriceDataRecurring",
|
|
193
|
+
"CreateProductsRequestDefaultPriceDataRecurringInterval",
|
|
194
|
+
"CreateProductsRequestMarketingFeaturesItem",
|
|
195
|
+
"CreatePromotionCodesRequestDiscount",
|
|
196
|
+
"CreatePromotionCodesRequestDiscountAmountOff",
|
|
197
|
+
"CreatePromotionCodesRequestDiscountPercentOff",
|
|
198
|
+
"CreatePromotionCodesRequestDuration",
|
|
199
|
+
"CreateRefundsRequestReason",
|
|
200
|
+
"DefaultAioHttpClient",
|
|
201
|
+
"DefaultAsyncHttpxClient",
|
|
202
|
+
"ForbiddenError",
|
|
203
|
+
"InternalServerError",
|
|
204
|
+
"ListSubscriptionsRequestStatus",
|
|
205
|
+
"NotFoundError",
|
|
206
|
+
"PaymentRequiredError",
|
|
207
|
+
"ServiceUnavailableError",
|
|
208
|
+
"StripeList",
|
|
209
|
+
"StripeObject",
|
|
210
|
+
"TooManyRequestsError",
|
|
211
|
+
"UnauthorizedError",
|
|
212
|
+
"UnprocessableEntityError",
|
|
213
|
+
"UpdateProductsRequestMarketingFeaturesItem",
|
|
214
|
+
"account",
|
|
215
|
+
"balance",
|
|
216
|
+
"balance_transactions",
|
|
217
|
+
"billing_portal",
|
|
218
|
+
"charges",
|
|
219
|
+
"checkout",
|
|
220
|
+
"customers",
|
|
221
|
+
"disputes",
|
|
222
|
+
"invoices",
|
|
223
|
+
"payment_intents",
|
|
224
|
+
"payment_links",
|
|
225
|
+
"payout_settings",
|
|
226
|
+
"payouts",
|
|
227
|
+
"prices",
|
|
228
|
+
"products",
|
|
229
|
+
"promotion_codes",
|
|
230
|
+
"refunds",
|
|
231
|
+
"subscriptions",
|
|
232
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
SDK_DEFAULT_TIMEOUT = 60
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import httpx_aiohttp # type: ignore[import-not-found]
|
|
11
|
+
except ImportError:
|
|
12
|
+
|
|
13
|
+
class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore
|
|
14
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
15
|
+
raise RuntimeError("To use the aiohttp client, install the aiohttp extra: pip install adila_pay[aiohttp]")
|
|
16
|
+
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
|
20
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
21
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
22
|
+
kwargs.setdefault("follow_redirects", True)
|
|
23
|
+
super().__init__(**kwargs)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
27
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
28
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
29
|
+
kwargs.setdefault("follow_redirects", True)
|
|
30
|
+
super().__init__(**kwargs)
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.stripe_object import StripeObject
|
|
8
|
+
from .raw_client import AsyncRawAccountClient, RawAccountClient
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AccountClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
13
|
+
self._raw_client = RawAccountClient(client_wrapper=client_wrapper)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def with_raw_response(self) -> RawAccountClient:
|
|
17
|
+
"""
|
|
18
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
19
|
+
|
|
20
|
+
Returns
|
|
21
|
+
-------
|
|
22
|
+
RawAccountClient
|
|
23
|
+
"""
|
|
24
|
+
return self._raw_client
|
|
25
|
+
|
|
26
|
+
def retrieve(
|
|
27
|
+
self, *, organization_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
28
|
+
) -> StripeObject:
|
|
29
|
+
"""
|
|
30
|
+
Permissão: `payment-account:read`. A conta Stripe é resolvida no servidor a partir da organização autorizada.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
organization_id : str
|
|
35
|
+
UUID da organização vinculada à API key ou à sessão autorizada.
|
|
36
|
+
|
|
37
|
+
request_options : typing.Optional[RequestOptions]
|
|
38
|
+
Request-specific configuration.
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
-------
|
|
42
|
+
StripeObject
|
|
43
|
+
Objeto Stripe retornado pelo backend. Campos de resposta ainda não possuem schema detalhado neste contrato.
|
|
44
|
+
|
|
45
|
+
Examples
|
|
46
|
+
--------
|
|
47
|
+
from adila_pay import AdilaPayClient
|
|
48
|
+
|
|
49
|
+
client = AdilaPayClient(
|
|
50
|
+
api_key="YOUR_API_KEY",
|
|
51
|
+
)
|
|
52
|
+
client.account.retrieve(
|
|
53
|
+
organization_id="organizationId",
|
|
54
|
+
)
|
|
55
|
+
"""
|
|
56
|
+
_response = self._raw_client.retrieve(organization_id=organization_id, request_options=request_options)
|
|
57
|
+
return _response.data
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class AsyncAccountClient:
|
|
61
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
62
|
+
self._raw_client = AsyncRawAccountClient(client_wrapper=client_wrapper)
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def with_raw_response(self) -> AsyncRawAccountClient:
|
|
66
|
+
"""
|
|
67
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
68
|
+
|
|
69
|
+
Returns
|
|
70
|
+
-------
|
|
71
|
+
AsyncRawAccountClient
|
|
72
|
+
"""
|
|
73
|
+
return self._raw_client
|
|
74
|
+
|
|
75
|
+
async def retrieve(
|
|
76
|
+
self, *, organization_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
77
|
+
) -> StripeObject:
|
|
78
|
+
"""
|
|
79
|
+
Permissão: `payment-account:read`. A conta Stripe é resolvida no servidor a partir da organização autorizada.
|
|
80
|
+
|
|
81
|
+
Parameters
|
|
82
|
+
----------
|
|
83
|
+
organization_id : str
|
|
84
|
+
UUID da organização vinculada à API key ou à sessão autorizada.
|
|
85
|
+
|
|
86
|
+
request_options : typing.Optional[RequestOptions]
|
|
87
|
+
Request-specific configuration.
|
|
88
|
+
|
|
89
|
+
Returns
|
|
90
|
+
-------
|
|
91
|
+
StripeObject
|
|
92
|
+
Objeto Stripe retornado pelo backend. Campos de resposta ainda não possuem schema detalhado neste contrato.
|
|
93
|
+
|
|
94
|
+
Examples
|
|
95
|
+
--------
|
|
96
|
+
import asyncio
|
|
97
|
+
|
|
98
|
+
from adila_pay import AsyncAdilaPayClient
|
|
99
|
+
|
|
100
|
+
client = AsyncAdilaPayClient(
|
|
101
|
+
api_key="YOUR_API_KEY",
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
async def main() -> None:
|
|
106
|
+
await client.account.retrieve(
|
|
107
|
+
organization_id="organizationId",
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
asyncio.run(main())
|
|
112
|
+
"""
|
|
113
|
+
_response = await self._raw_client.retrieve(organization_id=organization_id, request_options=request_options)
|
|
114
|
+
return _response.data
|