paid-python 1.6.0__tar.gz → 1.7.1__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.
- {paid_python-1.6.0 → paid_python-1.7.1}/PKG-INFO +3 -1
- {paid_python-1.6.0 → paid_python-1.7.1}/README.md +2 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/pyproject.toml +2 -2
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/__init__.py +51 -1
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/checkouts/client.py +34 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/checkouts/raw_client.py +34 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/client.py +19 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/client_wrapper.py +2 -2
- paid_python-1.7.1/src/paid/customer_portals/client.py +152 -0
- paid_python-1.7.1/src/paid/customer_portals/raw_client.py +242 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/orders/client.py +56 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/orders/raw_client.py +56 -0
- paid_python-1.7.1/src/paid/signals/__init__.py +4 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/gemini_patches/patches.py +8 -7
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/__init__.py +74 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/checkout.py +10 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/create_order_line_attribute_request.py +2 -1
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing.py +85 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_billing_frequency.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_billing_type.py +5 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_charge_type.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_credit_benefits_item.py +59 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_credit_benefits_item_allocation_cadence.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_credit_benefits_item_credit_grant_timing.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_credit_benefits_item_recipient.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_credit_benefits_item_rollover_duration_unit.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_price_points.py +32 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_price_points_tiers_item.py +42 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_price_points_tiers_item_tier_billing_type.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_pricing_model.py +7 -0
- paid_python-1.7.1/src/paid/types/create_order_line_attribute_request_pricing_signal_type.py +5 -0
- paid_python-1.7.1/src/paid/types/customer_portal.py +35 -0
- paid_python-1.7.1/src/paid/types/customer_portal_status.py +5 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/order.py +13 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/LICENSE +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/checkouts/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/checkouts/types/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/checkouts/types/list_checkouts_request_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/contacts/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/contacts/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/contacts/raw_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/contacts/types/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/contacts/types/create_contact_request_roles_item.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/api_error.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/datetime_utils.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/file.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/force_multipart.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_sse/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_sse/_api.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_sse/_decoders.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_sse/_exceptions.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/http_sse/_models.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/jsonable_encoder.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/pydantic_utilities.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/query_encoder.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/remove_none_from_dict.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/request_options.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/core/serialization.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/credits/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/credits/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/credits/raw_client.py +0 -0
- {paid_python-1.6.0/src/paid/customers → paid_python-1.7.1/src/paid/customer_portals}/__init__.py +0 -0
- {paid_python-1.6.0/src/paid/invoices → paid_python-1.7.1/src/paid/customers}/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/customers/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/customers/raw_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/environment.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/errors/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/errors/bad_request_error.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/errors/forbidden_error.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/errors/internal_server_error.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/errors/not_found_error.py +0 -0
- {paid_python-1.6.0/src/paid/orders → paid_python-1.7.1/src/paid/invoices}/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/invoices/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/invoices/raw_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/logger.py +0 -0
- {paid_python-1.6.0/src/paid/products → paid_python-1.7.1/src/paid/orders}/__init__.py +0 -0
- {paid_python-1.6.0/src/paid/signals → paid_python-1.7.1/src/paid/products}/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/products/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/products/raw_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/py.typed +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/signals/client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/signals/raw_client.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/anthropic_patches/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/anthropic_patches/patches.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/autoinstrumentation.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/context_data.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/context_manager.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/distributed_tracing.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/gemini_patches/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/openai_agents_patches/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/openai_agents_patches/patches.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/openai_patches/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/openai_patches/patches.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/signal.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/tracing.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/anthropic/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/anthropic/anthropicWrapper.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/bedrock/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/bedrock/bedrockWrapper.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/gemini/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/gemini/geminiWrapper.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/langchain/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/langchain/paidLangChainCallback.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/mistral/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/mistral/mistralWrapper.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/openai/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/openai/openAiWrapper.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/openai_agents/__init__.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/openai_agents/openaiAgentsHook.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/tracing/wrappers/utils.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/attribution.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/bulk_signals_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/checkout_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/checkout_product.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/checkout_product_input.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/checkout_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/contact.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/contact_billing_address.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/contact_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/contact_roles_item.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/create_order_line_request.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/credit_balance.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/credit_balance_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/credit_balance_recipient.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/credit_currency.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/credit_currency_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_attribution.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_billing_address.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_by_external_id.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_by_id.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_creation_state.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/customer_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/empty_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/error_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_line.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_line_payment_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_lines_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_payment_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_source.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/invoice_tax_status.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/order_creation_state.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/order_line.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/order_lines_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/order_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/pagination.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/product.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/product_by_external_id.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/product_by_id.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/product_list_response.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/signal.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/update_contact_request.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/update_contact_request_roles_item.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/update_customer_request.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/types/update_product_request.py +0 -0
- {paid_python-1.6.0 → paid_python-1.7.1}/src/paid/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: paid-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.10,<3.14
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -651,6 +651,7 @@ signal = Signal(
|
|
|
651
651
|
"gen_ai.usage.input_tokens": 100,
|
|
652
652
|
"gen_ai.usage.output_tokens": 300,
|
|
653
653
|
"gen_ai.usage.cached_input_tokens": 600,
|
|
654
|
+
"gen_ai.usage.cache_creation_input_tokens": 200,
|
|
654
655
|
},
|
|
655
656
|
}
|
|
656
657
|
}
|
|
@@ -680,6 +681,7 @@ def do_work():
|
|
|
680
681
|
"gen_ai.usage.input_tokens": 100,
|
|
681
682
|
"gen_ai.usage.output_tokens": 300,
|
|
682
683
|
"gen_ai.usage.cached_input_tokens": 600,
|
|
684
|
+
"gen_ai.usage.cache_creation_input_tokens": 200,
|
|
683
685
|
},
|
|
684
686
|
}
|
|
685
687
|
}
|
|
@@ -613,6 +613,7 @@ signal = Signal(
|
|
|
613
613
|
"gen_ai.usage.input_tokens": 100,
|
|
614
614
|
"gen_ai.usage.output_tokens": 300,
|
|
615
615
|
"gen_ai.usage.cached_input_tokens": 600,
|
|
616
|
+
"gen_ai.usage.cache_creation_input_tokens": 200,
|
|
616
617
|
},
|
|
617
618
|
}
|
|
618
619
|
}
|
|
@@ -642,6 +643,7 @@ def do_work():
|
|
|
642
643
|
"gen_ai.usage.input_tokens": 100,
|
|
643
644
|
"gen_ai.usage.output_tokens": 300,
|
|
644
645
|
"gen_ai.usage.cached_input_tokens": 600,
|
|
646
|
+
"gen_ai.usage.cache_creation_input_tokens": 200,
|
|
645
647
|
},
|
|
646
648
|
}
|
|
647
649
|
}
|
|
@@ -4,7 +4,7 @@ dynamic = ["version"]
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "paid-python"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.7.1"
|
|
8
8
|
description = ""
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = []
|
|
@@ -64,7 +64,7 @@ claude-agent-sdk = ">=0.1.0,<0.1.49"
|
|
|
64
64
|
google-genai = ">=1.19.0"
|
|
65
65
|
instructor = ">=1.0.0"
|
|
66
66
|
langchain-core = ">=0.1.0"
|
|
67
|
-
mistralai = ">=1.9.0
|
|
67
|
+
mistralai = ">=1.9.0 <2.0.0"
|
|
68
68
|
openai = ">=1.12.0"
|
|
69
69
|
openai-agents = ">=0.2.0"
|
|
70
70
|
pydantic-ai = ">=1.41.0"
|
|
@@ -19,6 +19,20 @@ if typing.TYPE_CHECKING:
|
|
|
19
19
|
ContactListResponse,
|
|
20
20
|
ContactRolesItem,
|
|
21
21
|
CreateOrderLineAttributeRequest,
|
|
22
|
+
CreateOrderLineAttributeRequestPricing,
|
|
23
|
+
CreateOrderLineAttributeRequestPricingBillingFrequency,
|
|
24
|
+
CreateOrderLineAttributeRequestPricingBillingType,
|
|
25
|
+
CreateOrderLineAttributeRequestPricingChargeType,
|
|
26
|
+
CreateOrderLineAttributeRequestPricingCreditBenefitsItem,
|
|
27
|
+
CreateOrderLineAttributeRequestPricingCreditBenefitsItemAllocationCadence,
|
|
28
|
+
CreateOrderLineAttributeRequestPricingCreditBenefitsItemCreditGrantTiming,
|
|
29
|
+
CreateOrderLineAttributeRequestPricingCreditBenefitsItemRecipient,
|
|
30
|
+
CreateOrderLineAttributeRequestPricingCreditBenefitsItemRolloverDurationUnit,
|
|
31
|
+
CreateOrderLineAttributeRequestPricingPricePoints,
|
|
32
|
+
CreateOrderLineAttributeRequestPricingPricePointsTiersItem,
|
|
33
|
+
CreateOrderLineAttributeRequestPricingPricePointsTiersItemTierBillingType,
|
|
34
|
+
CreateOrderLineAttributeRequestPricingPricingModel,
|
|
35
|
+
CreateOrderLineAttributeRequestPricingSignalType,
|
|
22
36
|
CreateOrderLineRequest,
|
|
23
37
|
CreditBalance,
|
|
24
38
|
CreditBalanceListResponse,
|
|
@@ -32,6 +46,8 @@ if typing.TYPE_CHECKING:
|
|
|
32
46
|
CustomerById,
|
|
33
47
|
CustomerCreationState,
|
|
34
48
|
CustomerListResponse,
|
|
49
|
+
CustomerPortal,
|
|
50
|
+
CustomerPortalStatus,
|
|
35
51
|
EmptyResponse,
|
|
36
52
|
ErrorResponse,
|
|
37
53
|
Invoice,
|
|
@@ -60,7 +76,7 @@ if typing.TYPE_CHECKING:
|
|
|
60
76
|
UpdateProductRequest,
|
|
61
77
|
)
|
|
62
78
|
from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError
|
|
63
|
-
from . import checkouts, contacts, credits, customers, invoices, orders, products, signals
|
|
79
|
+
from . import checkouts, contacts, credits, customer_portals, customers, invoices, orders, products, signals
|
|
64
80
|
from .checkouts import ListCheckoutsRequestStatus
|
|
65
81
|
from .client import AsyncPaid, Paid
|
|
66
82
|
from .contacts import CreateContactRequestRolesItem
|
|
@@ -82,6 +98,20 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
82
98
|
"ContactRolesItem": ".types",
|
|
83
99
|
"CreateContactRequestRolesItem": ".contacts",
|
|
84
100
|
"CreateOrderLineAttributeRequest": ".types",
|
|
101
|
+
"CreateOrderLineAttributeRequestPricing": ".types",
|
|
102
|
+
"CreateOrderLineAttributeRequestPricingBillingFrequency": ".types",
|
|
103
|
+
"CreateOrderLineAttributeRequestPricingBillingType": ".types",
|
|
104
|
+
"CreateOrderLineAttributeRequestPricingChargeType": ".types",
|
|
105
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItem": ".types",
|
|
106
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemAllocationCadence": ".types",
|
|
107
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemCreditGrantTiming": ".types",
|
|
108
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemRecipient": ".types",
|
|
109
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemRolloverDurationUnit": ".types",
|
|
110
|
+
"CreateOrderLineAttributeRequestPricingPricePoints": ".types",
|
|
111
|
+
"CreateOrderLineAttributeRequestPricingPricePointsTiersItem": ".types",
|
|
112
|
+
"CreateOrderLineAttributeRequestPricingPricePointsTiersItemTierBillingType": ".types",
|
|
113
|
+
"CreateOrderLineAttributeRequestPricingPricingModel": ".types",
|
|
114
|
+
"CreateOrderLineAttributeRequestPricingSignalType": ".types",
|
|
85
115
|
"CreateOrderLineRequest": ".types",
|
|
86
116
|
"CreditBalance": ".types",
|
|
87
117
|
"CreditBalanceListResponse": ".types",
|
|
@@ -95,6 +125,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
95
125
|
"CustomerById": ".types",
|
|
96
126
|
"CustomerCreationState": ".types",
|
|
97
127
|
"CustomerListResponse": ".types",
|
|
128
|
+
"CustomerPortal": ".types",
|
|
129
|
+
"CustomerPortalStatus": ".types",
|
|
98
130
|
"EmptyResponse": ".types",
|
|
99
131
|
"ErrorResponse": ".types",
|
|
100
132
|
"ForbiddenError": ".errors",
|
|
@@ -131,6 +163,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
131
163
|
"checkouts": ".checkouts",
|
|
132
164
|
"contacts": ".contacts",
|
|
133
165
|
"credits": ".credits",
|
|
166
|
+
"customer_portals": ".customer_portals",
|
|
134
167
|
"customers": ".customers",
|
|
135
168
|
"invoices": ".invoices",
|
|
136
169
|
"orders": ".orders",
|
|
@@ -176,6 +209,20 @@ __all__ = [
|
|
|
176
209
|
"ContactRolesItem",
|
|
177
210
|
"CreateContactRequestRolesItem",
|
|
178
211
|
"CreateOrderLineAttributeRequest",
|
|
212
|
+
"CreateOrderLineAttributeRequestPricing",
|
|
213
|
+
"CreateOrderLineAttributeRequestPricingBillingFrequency",
|
|
214
|
+
"CreateOrderLineAttributeRequestPricingBillingType",
|
|
215
|
+
"CreateOrderLineAttributeRequestPricingChargeType",
|
|
216
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItem",
|
|
217
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemAllocationCadence",
|
|
218
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemCreditGrantTiming",
|
|
219
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemRecipient",
|
|
220
|
+
"CreateOrderLineAttributeRequestPricingCreditBenefitsItemRolloverDurationUnit",
|
|
221
|
+
"CreateOrderLineAttributeRequestPricingPricePoints",
|
|
222
|
+
"CreateOrderLineAttributeRequestPricingPricePointsTiersItem",
|
|
223
|
+
"CreateOrderLineAttributeRequestPricingPricePointsTiersItemTierBillingType",
|
|
224
|
+
"CreateOrderLineAttributeRequestPricingPricingModel",
|
|
225
|
+
"CreateOrderLineAttributeRequestPricingSignalType",
|
|
179
226
|
"CreateOrderLineRequest",
|
|
180
227
|
"CreditBalance",
|
|
181
228
|
"CreditBalanceListResponse",
|
|
@@ -189,6 +236,8 @@ __all__ = [
|
|
|
189
236
|
"CustomerById",
|
|
190
237
|
"CustomerCreationState",
|
|
191
238
|
"CustomerListResponse",
|
|
239
|
+
"CustomerPortal",
|
|
240
|
+
"CustomerPortalStatus",
|
|
192
241
|
"EmptyResponse",
|
|
193
242
|
"ErrorResponse",
|
|
194
243
|
"ForbiddenError",
|
|
@@ -225,6 +274,7 @@ __all__ = [
|
|
|
225
274
|
"checkouts",
|
|
226
275
|
"contacts",
|
|
227
276
|
"credits",
|
|
277
|
+
"customer_portals",
|
|
228
278
|
"customers",
|
|
229
279
|
"invoices",
|
|
230
280
|
"orders",
|
|
@@ -78,9 +78,13 @@ class CheckoutsClient:
|
|
|
78
78
|
products: typing.Sequence[CheckoutProductInput],
|
|
79
79
|
success_url: str,
|
|
80
80
|
customer_id: typing.Optional[str] = OMIT,
|
|
81
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
81
82
|
cancel_url: typing.Optional[str] = OMIT,
|
|
82
83
|
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
83
84
|
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
85
|
+
collect_address: typing.Optional[bool] = OMIT,
|
|
86
|
+
collect_phone: typing.Optional[bool] = OMIT,
|
|
87
|
+
single_use: typing.Optional[bool] = OMIT,
|
|
84
88
|
request_options: typing.Optional[RequestOptions] = None,
|
|
85
89
|
) -> Checkout:
|
|
86
90
|
"""
|
|
@@ -94,12 +98,21 @@ class CheckoutsClient:
|
|
|
94
98
|
|
|
95
99
|
customer_id : typing.Optional[str]
|
|
96
100
|
|
|
101
|
+
external_customer_id : typing.Optional[str]
|
|
102
|
+
External customer identifier. Creates the customer on first use, resolves to the existing customer on subsequent uses.
|
|
103
|
+
|
|
97
104
|
cancel_url : typing.Optional[str]
|
|
98
105
|
|
|
99
106
|
expires_at : typing.Optional[dt.datetime]
|
|
100
107
|
|
|
101
108
|
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
102
109
|
|
|
110
|
+
collect_address : typing.Optional[bool]
|
|
111
|
+
|
|
112
|
+
collect_phone : typing.Optional[bool]
|
|
113
|
+
|
|
114
|
+
single_use : typing.Optional[bool]
|
|
115
|
+
|
|
103
116
|
request_options : typing.Optional[RequestOptions]
|
|
104
117
|
Request-specific configuration.
|
|
105
118
|
|
|
@@ -128,9 +141,13 @@ class CheckoutsClient:
|
|
|
128
141
|
products=products,
|
|
129
142
|
success_url=success_url,
|
|
130
143
|
customer_id=customer_id,
|
|
144
|
+
external_customer_id=external_customer_id,
|
|
131
145
|
cancel_url=cancel_url,
|
|
132
146
|
expires_at=expires_at,
|
|
133
147
|
metadata=metadata,
|
|
148
|
+
collect_address=collect_address,
|
|
149
|
+
collect_phone=collect_phone,
|
|
150
|
+
single_use=single_use,
|
|
134
151
|
request_options=request_options,
|
|
135
152
|
)
|
|
136
153
|
return _response.data
|
|
@@ -266,9 +283,13 @@ class AsyncCheckoutsClient:
|
|
|
266
283
|
products: typing.Sequence[CheckoutProductInput],
|
|
267
284
|
success_url: str,
|
|
268
285
|
customer_id: typing.Optional[str] = OMIT,
|
|
286
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
269
287
|
cancel_url: typing.Optional[str] = OMIT,
|
|
270
288
|
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
271
289
|
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
290
|
+
collect_address: typing.Optional[bool] = OMIT,
|
|
291
|
+
collect_phone: typing.Optional[bool] = OMIT,
|
|
292
|
+
single_use: typing.Optional[bool] = OMIT,
|
|
272
293
|
request_options: typing.Optional[RequestOptions] = None,
|
|
273
294
|
) -> Checkout:
|
|
274
295
|
"""
|
|
@@ -282,12 +303,21 @@ class AsyncCheckoutsClient:
|
|
|
282
303
|
|
|
283
304
|
customer_id : typing.Optional[str]
|
|
284
305
|
|
|
306
|
+
external_customer_id : typing.Optional[str]
|
|
307
|
+
External customer identifier. Creates the customer on first use, resolves to the existing customer on subsequent uses.
|
|
308
|
+
|
|
285
309
|
cancel_url : typing.Optional[str]
|
|
286
310
|
|
|
287
311
|
expires_at : typing.Optional[dt.datetime]
|
|
288
312
|
|
|
289
313
|
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
290
314
|
|
|
315
|
+
collect_address : typing.Optional[bool]
|
|
316
|
+
|
|
317
|
+
collect_phone : typing.Optional[bool]
|
|
318
|
+
|
|
319
|
+
single_use : typing.Optional[bool]
|
|
320
|
+
|
|
291
321
|
request_options : typing.Optional[RequestOptions]
|
|
292
322
|
Request-specific configuration.
|
|
293
323
|
|
|
@@ -324,9 +354,13 @@ class AsyncCheckoutsClient:
|
|
|
324
354
|
products=products,
|
|
325
355
|
success_url=success_url,
|
|
326
356
|
customer_id=customer_id,
|
|
357
|
+
external_customer_id=external_customer_id,
|
|
327
358
|
cancel_url=cancel_url,
|
|
328
359
|
expires_at=expires_at,
|
|
329
360
|
metadata=metadata,
|
|
361
|
+
collect_address=collect_address,
|
|
362
|
+
collect_phone=collect_phone,
|
|
363
|
+
single_use=single_use,
|
|
330
364
|
request_options=request_options,
|
|
331
365
|
)
|
|
332
366
|
return _response.data
|
|
@@ -121,9 +121,13 @@ class RawCheckoutsClient:
|
|
|
121
121
|
products: typing.Sequence[CheckoutProductInput],
|
|
122
122
|
success_url: str,
|
|
123
123
|
customer_id: typing.Optional[str] = OMIT,
|
|
124
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
124
125
|
cancel_url: typing.Optional[str] = OMIT,
|
|
125
126
|
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
126
127
|
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
128
|
+
collect_address: typing.Optional[bool] = OMIT,
|
|
129
|
+
collect_phone: typing.Optional[bool] = OMIT,
|
|
130
|
+
single_use: typing.Optional[bool] = OMIT,
|
|
127
131
|
request_options: typing.Optional[RequestOptions] = None,
|
|
128
132
|
) -> HttpResponse[Checkout]:
|
|
129
133
|
"""
|
|
@@ -137,12 +141,21 @@ class RawCheckoutsClient:
|
|
|
137
141
|
|
|
138
142
|
customer_id : typing.Optional[str]
|
|
139
143
|
|
|
144
|
+
external_customer_id : typing.Optional[str]
|
|
145
|
+
External customer identifier. Creates the customer on first use, resolves to the existing customer on subsequent uses.
|
|
146
|
+
|
|
140
147
|
cancel_url : typing.Optional[str]
|
|
141
148
|
|
|
142
149
|
expires_at : typing.Optional[dt.datetime]
|
|
143
150
|
|
|
144
151
|
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
145
152
|
|
|
153
|
+
collect_address : typing.Optional[bool]
|
|
154
|
+
|
|
155
|
+
collect_phone : typing.Optional[bool]
|
|
156
|
+
|
|
157
|
+
single_use : typing.Optional[bool]
|
|
158
|
+
|
|
146
159
|
request_options : typing.Optional[RequestOptions]
|
|
147
160
|
Request-specific configuration.
|
|
148
161
|
|
|
@@ -159,10 +172,14 @@ class RawCheckoutsClient:
|
|
|
159
172
|
object_=products, annotation=typing.Sequence[CheckoutProductInput], direction="write"
|
|
160
173
|
),
|
|
161
174
|
"customerId": customer_id,
|
|
175
|
+
"externalCustomerId": external_customer_id,
|
|
162
176
|
"successUrl": success_url,
|
|
163
177
|
"cancelUrl": cancel_url,
|
|
164
178
|
"expiresAt": expires_at,
|
|
165
179
|
"metadata": metadata,
|
|
180
|
+
"collectAddress": collect_address,
|
|
181
|
+
"collectPhone": collect_phone,
|
|
182
|
+
"singleUse": single_use,
|
|
166
183
|
},
|
|
167
184
|
headers={
|
|
168
185
|
"content-type": "application/json",
|
|
@@ -467,9 +484,13 @@ class AsyncRawCheckoutsClient:
|
|
|
467
484
|
products: typing.Sequence[CheckoutProductInput],
|
|
468
485
|
success_url: str,
|
|
469
486
|
customer_id: typing.Optional[str] = OMIT,
|
|
487
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
470
488
|
cancel_url: typing.Optional[str] = OMIT,
|
|
471
489
|
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
472
490
|
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
491
|
+
collect_address: typing.Optional[bool] = OMIT,
|
|
492
|
+
collect_phone: typing.Optional[bool] = OMIT,
|
|
493
|
+
single_use: typing.Optional[bool] = OMIT,
|
|
473
494
|
request_options: typing.Optional[RequestOptions] = None,
|
|
474
495
|
) -> AsyncHttpResponse[Checkout]:
|
|
475
496
|
"""
|
|
@@ -483,12 +504,21 @@ class AsyncRawCheckoutsClient:
|
|
|
483
504
|
|
|
484
505
|
customer_id : typing.Optional[str]
|
|
485
506
|
|
|
507
|
+
external_customer_id : typing.Optional[str]
|
|
508
|
+
External customer identifier. Creates the customer on first use, resolves to the existing customer on subsequent uses.
|
|
509
|
+
|
|
486
510
|
cancel_url : typing.Optional[str]
|
|
487
511
|
|
|
488
512
|
expires_at : typing.Optional[dt.datetime]
|
|
489
513
|
|
|
490
514
|
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
491
515
|
|
|
516
|
+
collect_address : typing.Optional[bool]
|
|
517
|
+
|
|
518
|
+
collect_phone : typing.Optional[bool]
|
|
519
|
+
|
|
520
|
+
single_use : typing.Optional[bool]
|
|
521
|
+
|
|
492
522
|
request_options : typing.Optional[RequestOptions]
|
|
493
523
|
Request-specific configuration.
|
|
494
524
|
|
|
@@ -505,10 +535,14 @@ class AsyncRawCheckoutsClient:
|
|
|
505
535
|
object_=products, annotation=typing.Sequence[CheckoutProductInput], direction="write"
|
|
506
536
|
),
|
|
507
537
|
"customerId": customer_id,
|
|
538
|
+
"externalCustomerId": external_customer_id,
|
|
508
539
|
"successUrl": success_url,
|
|
509
540
|
"cancelUrl": cancel_url,
|
|
510
541
|
"expiresAt": expires_at,
|
|
511
542
|
"metadata": metadata,
|
|
543
|
+
"collectAddress": collect_address,
|
|
544
|
+
"collectPhone": collect_phone,
|
|
545
|
+
"singleUse": single_use,
|
|
512
546
|
},
|
|
513
547
|
headers={
|
|
514
548
|
"content-type": "application/json",
|
|
@@ -12,6 +12,7 @@ if typing.TYPE_CHECKING:
|
|
|
12
12
|
from .checkouts.client import AsyncCheckoutsClient, CheckoutsClient
|
|
13
13
|
from .contacts.client import AsyncContactsClient, ContactsClient
|
|
14
14
|
from .credits.client import AsyncCreditsClient, CreditsClient
|
|
15
|
+
from .customer_portals.client import AsyncCustomerPortalsClient, CustomerPortalsClient
|
|
15
16
|
from .customers.client import AsyncCustomersClient, CustomersClient
|
|
16
17
|
from .invoices.client import AsyncInvoicesClient, InvoicesClient
|
|
17
18
|
from .orders.client import AsyncOrdersClient, OrdersClient
|
|
@@ -92,6 +93,7 @@ class Paid:
|
|
|
92
93
|
self._signals: typing.Optional[SignalsClient] = None
|
|
93
94
|
self._credits: typing.Optional[CreditsClient] = None
|
|
94
95
|
self._checkouts: typing.Optional[CheckoutsClient] = None
|
|
96
|
+
self._customer_portals: typing.Optional[CustomerPortalsClient] = None
|
|
95
97
|
|
|
96
98
|
@property
|
|
97
99
|
def products(self):
|
|
@@ -157,6 +159,14 @@ class Paid:
|
|
|
157
159
|
self._checkouts = CheckoutsClient(client_wrapper=self._client_wrapper)
|
|
158
160
|
return self._checkouts
|
|
159
161
|
|
|
162
|
+
@property
|
|
163
|
+
def customer_portals(self):
|
|
164
|
+
if self._customer_portals is None:
|
|
165
|
+
from .customer_portals.client import CustomerPortalsClient # noqa: E402
|
|
166
|
+
|
|
167
|
+
self._customer_portals = CustomerPortalsClient(client_wrapper=self._client_wrapper)
|
|
168
|
+
return self._customer_portals
|
|
169
|
+
|
|
160
170
|
|
|
161
171
|
class AsyncPaid:
|
|
162
172
|
"""
|
|
@@ -231,6 +241,7 @@ class AsyncPaid:
|
|
|
231
241
|
self._signals: typing.Optional[AsyncSignalsClient] = None
|
|
232
242
|
self._credits: typing.Optional[AsyncCreditsClient] = None
|
|
233
243
|
self._checkouts: typing.Optional[AsyncCheckoutsClient] = None
|
|
244
|
+
self._customer_portals: typing.Optional[AsyncCustomerPortalsClient] = None
|
|
234
245
|
|
|
235
246
|
@property
|
|
236
247
|
def products(self):
|
|
@@ -296,6 +307,14 @@ class AsyncPaid:
|
|
|
296
307
|
self._checkouts = AsyncCheckoutsClient(client_wrapper=self._client_wrapper)
|
|
297
308
|
return self._checkouts
|
|
298
309
|
|
|
310
|
+
@property
|
|
311
|
+
def customer_portals(self):
|
|
312
|
+
if self._customer_portals is None:
|
|
313
|
+
from .customer_portals.client import AsyncCustomerPortalsClient # noqa: E402
|
|
314
|
+
|
|
315
|
+
self._customer_portals = AsyncCustomerPortalsClient(client_wrapper=self._client_wrapper)
|
|
316
|
+
return self._customer_portals
|
|
317
|
+
|
|
299
318
|
|
|
300
319
|
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: PaidEnvironment) -> str:
|
|
301
320
|
if base_url is not None:
|
|
@@ -24,12 +24,12 @@ class BaseClientWrapper:
|
|
|
24
24
|
import platform
|
|
25
25
|
|
|
26
26
|
headers: typing.Dict[str, str] = {
|
|
27
|
-
"User-Agent": "paid-python/1.
|
|
27
|
+
"User-Agent": "paid-python/1.7.1",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-Runtime": f"python/{platform.python_version()}",
|
|
30
30
|
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
|
|
31
31
|
"X-Fern-SDK-Name": "paid-python",
|
|
32
|
-
"X-Fern-SDK-Version": "1.
|
|
32
|
+
"X-Fern-SDK-Version": "1.7.1",
|
|
33
33
|
**(self.get_custom_headers() or {}),
|
|
34
34
|
}
|
|
35
35
|
headers["Authorization"] = f"Bearer {self._get_token()}"
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
|
+
from ..core.request_options import RequestOptions
|
|
8
|
+
from ..types.customer_portal import CustomerPortal
|
|
9
|
+
from .raw_client import AsyncRawCustomerPortalsClient, RawCustomerPortalsClient
|
|
10
|
+
|
|
11
|
+
# this is used as the default value for optional parameters
|
|
12
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CustomerPortalsClient:
|
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
+
self._raw_client = RawCustomerPortalsClient(client_wrapper=client_wrapper)
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def with_raw_response(self) -> RawCustomerPortalsClient:
|
|
21
|
+
"""
|
|
22
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
23
|
+
|
|
24
|
+
Returns
|
|
25
|
+
-------
|
|
26
|
+
RawCustomerPortalsClient
|
|
27
|
+
"""
|
|
28
|
+
return self._raw_client
|
|
29
|
+
|
|
30
|
+
def create_customer_portal(
|
|
31
|
+
self,
|
|
32
|
+
*,
|
|
33
|
+
customer_id: typing.Optional[str] = OMIT,
|
|
34
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
35
|
+
return_url: typing.Optional[str] = OMIT,
|
|
36
|
+
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
37
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
38
|
+
) -> CustomerPortal:
|
|
39
|
+
"""
|
|
40
|
+
Creates a portal session for the customer. Returns a short-lived URL to the customer portal.
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
customer_id : typing.Optional[str]
|
|
45
|
+
The Paid customer ID (display ID or UUID). Either this or externalCustomerId must be provided.
|
|
46
|
+
|
|
47
|
+
external_customer_id : typing.Optional[str]
|
|
48
|
+
Your external customer ID. Either this or customerId must be provided.
|
|
49
|
+
|
|
50
|
+
return_url : typing.Optional[str]
|
|
51
|
+
|
|
52
|
+
expires_at : typing.Optional[dt.datetime]
|
|
53
|
+
|
|
54
|
+
request_options : typing.Optional[RequestOptions]
|
|
55
|
+
Request-specific configuration.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
CustomerPortal
|
|
60
|
+
201
|
|
61
|
+
|
|
62
|
+
Examples
|
|
63
|
+
--------
|
|
64
|
+
from paid import Paid
|
|
65
|
+
|
|
66
|
+
client = Paid(
|
|
67
|
+
token="YOUR_TOKEN",
|
|
68
|
+
)
|
|
69
|
+
client.customer_portals.create_customer_portal()
|
|
70
|
+
"""
|
|
71
|
+
_response = self._raw_client.create_customer_portal(
|
|
72
|
+
customer_id=customer_id,
|
|
73
|
+
external_customer_id=external_customer_id,
|
|
74
|
+
return_url=return_url,
|
|
75
|
+
expires_at=expires_at,
|
|
76
|
+
request_options=request_options,
|
|
77
|
+
)
|
|
78
|
+
return _response.data
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AsyncCustomerPortalsClient:
|
|
82
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
83
|
+
self._raw_client = AsyncRawCustomerPortalsClient(client_wrapper=client_wrapper)
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def with_raw_response(self) -> AsyncRawCustomerPortalsClient:
|
|
87
|
+
"""
|
|
88
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
89
|
+
|
|
90
|
+
Returns
|
|
91
|
+
-------
|
|
92
|
+
AsyncRawCustomerPortalsClient
|
|
93
|
+
"""
|
|
94
|
+
return self._raw_client
|
|
95
|
+
|
|
96
|
+
async def create_customer_portal(
|
|
97
|
+
self,
|
|
98
|
+
*,
|
|
99
|
+
customer_id: typing.Optional[str] = OMIT,
|
|
100
|
+
external_customer_id: typing.Optional[str] = OMIT,
|
|
101
|
+
return_url: typing.Optional[str] = OMIT,
|
|
102
|
+
expires_at: typing.Optional[dt.datetime] = OMIT,
|
|
103
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
104
|
+
) -> CustomerPortal:
|
|
105
|
+
"""
|
|
106
|
+
Creates a portal session for the customer. Returns a short-lived URL to the customer portal.
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
customer_id : typing.Optional[str]
|
|
111
|
+
The Paid customer ID (display ID or UUID). Either this or externalCustomerId must be provided.
|
|
112
|
+
|
|
113
|
+
external_customer_id : typing.Optional[str]
|
|
114
|
+
Your external customer ID. Either this or customerId must be provided.
|
|
115
|
+
|
|
116
|
+
return_url : typing.Optional[str]
|
|
117
|
+
|
|
118
|
+
expires_at : typing.Optional[dt.datetime]
|
|
119
|
+
|
|
120
|
+
request_options : typing.Optional[RequestOptions]
|
|
121
|
+
Request-specific configuration.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
CustomerPortal
|
|
126
|
+
201
|
|
127
|
+
|
|
128
|
+
Examples
|
|
129
|
+
--------
|
|
130
|
+
import asyncio
|
|
131
|
+
|
|
132
|
+
from paid import AsyncPaid
|
|
133
|
+
|
|
134
|
+
client = AsyncPaid(
|
|
135
|
+
token="YOUR_TOKEN",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
async def main() -> None:
|
|
140
|
+
await client.customer_portals.create_customer_portal()
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
asyncio.run(main())
|
|
144
|
+
"""
|
|
145
|
+
_response = await self._raw_client.create_customer_portal(
|
|
146
|
+
customer_id=customer_id,
|
|
147
|
+
external_customer_id=external_customer_id,
|
|
148
|
+
return_url=return_url,
|
|
149
|
+
expires_at=expires_at,
|
|
150
|
+
request_options=request_options,
|
|
151
|
+
)
|
|
152
|
+
return _response.data
|