lago-python-client 1.49.0__tar.gz → 1.52.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.
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/PKG-INFO +1 -1
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/client.py +20 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoices/clients.py +2 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/__init__.py +43 -1
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/credit_note.py +1 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/customer_usage.py +1 -1
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoice.py +3 -0
- lago_python_client-1.52.0/lago_python_client/models/order.py +39 -0
- lago_python_client-1.52.0/lago_python_client/models/order_form.py +28 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/payment_request.py +1 -0
- lago_python_client-1.52.0/lago_python_client/models/quote.py +83 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/subscription.py +21 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/wallet.py +4 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/wallet_transaction.py +2 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/webhook_endpoint.py +6 -1
- lago_python_client-1.52.0/lago_python_client/order_forms/clients.py +74 -0
- lago_python_client-1.52.0/lago_python_client/orders/clients.py +53 -0
- lago_python_client-1.52.0/lago_python_client/quote_versions/clients.py +90 -0
- lago_python_client-1.52.0/lago_python_client/quotes/clients.py +56 -0
- lago_python_client-1.52.0/lago_python_client/version.py +1 -0
- lago_python_client-1.52.0/lago_python_client/webhook_endpoints/__init__.py +0 -0
- lago_python_client-1.52.0/lago_python_client/webhooks/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client.egg-info/PKG-INFO +1 -1
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client.egg-info/SOURCES.txt +30 -0
- lago_python_client-1.52.0/tests/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_client.py +2 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_invoice_client.py +27 -0
- lago_python_client-1.52.0/tests/test_order_client.py +146 -0
- lago_python_client-1.52.0/tests/test_order_form_client.py +161 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_payment_request_client.py +14 -0
- lago_python_client-1.52.0/tests/test_quote_client.py +118 -0
- lago_python_client-1.52.0/tests/test_quote_version_client.py +126 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_subscription_client.py +36 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_wallet_client.py +20 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_wallet_transaction_client.py +2 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_webhook_endpoint_client.py +6 -1
- lago_python_client-1.52.0/tests/utils/__init__.py +0 -0
- lago_python_client-1.49.0/lago_python_client/version.py +0 -1
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/LICENSE +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/README.md +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/activity_logs/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/activity_logs/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/add_ons/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/add_ons/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/api_logs/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/api_logs/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/base_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/base_model.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/billable_metrics/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/billable_metrics/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/billing_entities/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/billing_entities/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/coupons/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/coupons/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/credit_notes/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/credit_notes/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/applied_coupons_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/credit_notes_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/invoices_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/payment_methods_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/payment_requests_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/payments_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/subscriptions_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/wallet_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/wallets/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/wallets/alert_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/wallets/metadata_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/customers/wallets_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/events/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/events/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/exceptions.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/fees/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/fees/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/functools_ext.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/gross_revenues/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/gross_revenues/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoice_collections/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoice_collections/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoiced_usages/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoiced_usages/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoices/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/mixins.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/activity_log.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/add_on.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/alert.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/api_log.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/applied_coupon.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/billable_metric.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/billing_entity.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/billing_period.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/charge.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/coupon.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/credit.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/customer.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/customer_projected_usage.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/error_detail.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/event.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/fee.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/fixed_charge.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/gross_revenue.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoice_collection.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoice_custom_section.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoice_item.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoiced_usage.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/lifetime_usage.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/minimum_commitment.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/mrr.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/organization.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/overdue_balance.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/payment.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/payment_method.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/payment_receipt.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/plan.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/tax.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/usage.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/usage_threshold.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/mrrs/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/mrrs/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/observability.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/organizations → lago_python_client-1.52.0/lago_python_client/order_forms}/__init__.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/overdue_balances → lago_python_client-1.52.0/lago_python_client/orders}/__init__.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/payment_receipts → lago_python_client-1.52.0/lago_python_client/organizations}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/organizations/clients.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/payment_requests → lago_python_client-1.52.0/lago_python_client/overdue_balances}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/overdue_balances/clients.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/payments → lago_python_client-1.52.0/lago_python_client/payment_receipts}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/payment_receipts/clients.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/plans → lago_python_client-1.52.0/lago_python_client/payment_requests}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/payment_requests/clients.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/services → lago_python_client-1.52.0/lago_python_client/payments}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/payments/clients.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/subscriptions → lago_python_client-1.52.0/lago_python_client/plans}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/plans/charges_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/plans/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/plans/fixed_charges_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/py.typed +0 -0
- {lago_python_client-1.49.0/lago_python_client/taxes → lago_python_client-1.52.0/lago_python_client/quote_versions}/__init__.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/usages → lago_python_client-1.52.0/lago_python_client/quotes}/__init__.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/wallets → lago_python_client-1.52.0/lago_python_client/services}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/services/json.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/services/rate_limit.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/services/request.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/services/response.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/webhook_endpoints → lago_python_client-1.52.0/lago_python_client/subscriptions}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/subscriptions/charges_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/subscriptions/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/subscriptions/fixed_charges_client.py +0 -0
- {lago_python_client-1.49.0/lago_python_client/webhooks → lago_python_client-1.52.0/lago_python_client/taxes}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/taxes/clients.py +0 -0
- {lago_python_client-1.49.0/tests → lago_python_client-1.52.0/lago_python_client/usages}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/usages/clients.py +0 -0
- {lago_python_client-1.49.0/tests/utils → lago_python_client-1.52.0/lago_python_client/wallets}/__init__.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/wallets/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/webhook_endpoints/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/webhooks/clients.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client.egg-info/dependency_links.txt +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client.egg-info/requires.txt +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client.egg-info/top_level.txt +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/pyproject.toml +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/setup.cfg +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_activity_logs_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_add_on_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_api_logs_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_applied_coupon_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_billable_metric_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_billing_entity_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_coupon_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_credit_note_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_applied_coupons_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_credit_notes_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_invoices_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_payment_methods_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_payment_requests_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_payments_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_sbscriptions_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_wallet_alert_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_wallet_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_wallet_metadata_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_customer_wallets_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_event_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_fee_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_functools_ext.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_gross_revenue_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_invoice_collection_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_invoiced_usage_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_json_services.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_mrr_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_organization_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_overdue_balance_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_payment_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_payment_receipt_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_plan_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_rate_limit.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_request_services.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_response_services.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_tax_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_usage_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/test_webhook_client.py +0 -0
- {lago_python_client-1.49.0 → lago_python_client-1.52.0}/tests/utils/mixin.py +0 -0
|
@@ -25,6 +25,8 @@ from .invoice_collections.clients import InvoiceCollectionClient
|
|
|
25
25
|
from .invoiced_usages.clients import InvoicedUsageClient
|
|
26
26
|
from .invoices.clients import InvoiceClient
|
|
27
27
|
from .mrrs.clients import MrrClient
|
|
28
|
+
from .order_forms.clients import OrderFormClient
|
|
29
|
+
from .orders.clients import OrderClient
|
|
28
30
|
from .organizations.clients import OrganizationClient
|
|
29
31
|
from .overdue_balances.clients import OverdueBalanceClient
|
|
30
32
|
from .payment_receipts.clients import PaymentReceiptClient
|
|
@@ -33,6 +35,8 @@ from .payments.clients import PaymentClient
|
|
|
33
35
|
from .plans.charges_client import PlanChargesClient
|
|
34
36
|
from .plans.clients import PlanClient
|
|
35
37
|
from .plans.fixed_charges_client import PlanFixedChargesClient
|
|
38
|
+
from .quote_versions.clients import QuoteVersionClient
|
|
39
|
+
from .quotes.clients import QuoteClient
|
|
36
40
|
from .services.rate_limit import RateLimitCallback, RateLimitRetryConfig
|
|
37
41
|
from .subscriptions.charges_client import SubscriptionChargesClient
|
|
38
42
|
from .subscriptions.clients import SubscriptionClient
|
|
@@ -180,6 +184,14 @@ class Client:
|
|
|
180
184
|
def mrrs(self) -> MrrClient:
|
|
181
185
|
return self._create_client(MrrClient, self.base_api_url, self.api_key)
|
|
182
186
|
|
|
187
|
+
@callable_cached_property
|
|
188
|
+
def order_forms(self) -> OrderFormClient:
|
|
189
|
+
return self._create_client(OrderFormClient, self.base_api_url, self.api_key)
|
|
190
|
+
|
|
191
|
+
@callable_cached_property
|
|
192
|
+
def orders(self) -> OrderClient:
|
|
193
|
+
return self._create_client(OrderClient, self.base_api_url, self.api_key)
|
|
194
|
+
|
|
183
195
|
@callable_cached_property
|
|
184
196
|
def organizations(self) -> OrganizationClient:
|
|
185
197
|
return self._create_client(OrganizationClient, self.base_api_url, self.api_key)
|
|
@@ -216,6 +228,14 @@ class Client:
|
|
|
216
228
|
def plan_fixed_charges(self) -> PlanFixedChargesClient:
|
|
217
229
|
return self._create_client(PlanFixedChargesClient, self.base_api_url, self.api_key)
|
|
218
230
|
|
|
231
|
+
@callable_cached_property
|
|
232
|
+
def quotes(self) -> QuoteClient:
|
|
233
|
+
return self._create_client(QuoteClient, self.base_api_url, self.api_key)
|
|
234
|
+
|
|
235
|
+
@callable_cached_property
|
|
236
|
+
def quote_versions(self) -> QuoteVersionClient:
|
|
237
|
+
return self._create_client(QuoteVersionClient, self.base_api_url, self.api_key)
|
|
238
|
+
|
|
219
239
|
@callable_cached_property
|
|
220
240
|
def subscriptions(self) -> SubscriptionClient:
|
|
221
241
|
return self._create_client(SubscriptionClient, self.base_api_url, self.api_key)
|
{lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/invoices/clients.py
RENAMED
|
@@ -3,6 +3,7 @@ from typing import Any, ClassVar, Mapping, Optional, Type
|
|
|
3
3
|
from ..base_client import BaseClient
|
|
4
4
|
from ..mixins import (
|
|
5
5
|
CreateCommandMixin,
|
|
6
|
+
DestroyCommandMixin,
|
|
6
7
|
FindAllCommandMixin,
|
|
7
8
|
FindCommandMixin,
|
|
8
9
|
UpdateCommandMixin,
|
|
@@ -24,6 +25,7 @@ class InvoiceClient(
|
|
|
24
25
|
FindAllCommandMixin[InvoiceResponse],
|
|
25
26
|
UpdateCommandMixin[InvoiceResponse],
|
|
26
27
|
CreateCommandMixin[InvoiceResponse],
|
|
28
|
+
DestroyCommandMixin[InvoiceResponse],
|
|
27
29
|
BaseClient,
|
|
28
30
|
):
|
|
29
31
|
API_RESOURCE: ClassVar[str] = "invoices"
|
{lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/__init__.py
RENAMED
|
@@ -218,6 +218,21 @@ from .minimum_commitment import (
|
|
|
218
218
|
from .minimum_commitment import (
|
|
219
219
|
MinimumCommitmentResponse as MinimumCommitmentResponse,
|
|
220
220
|
)
|
|
221
|
+
from .order import (
|
|
222
|
+
OrderExecute as OrderExecute,
|
|
223
|
+
)
|
|
224
|
+
from .order import (
|
|
225
|
+
OrderExecutionRecordResponse as OrderExecutionRecordResponse,
|
|
226
|
+
)
|
|
227
|
+
from .order import (
|
|
228
|
+
OrderResponse as OrderResponse,
|
|
229
|
+
)
|
|
230
|
+
from .order_form import (
|
|
231
|
+
OrderFormMarkAsSigned as OrderFormMarkAsSigned,
|
|
232
|
+
)
|
|
233
|
+
from .order_form import (
|
|
234
|
+
OrderFormResponse as OrderFormResponse,
|
|
235
|
+
)
|
|
221
236
|
from .organization import (
|
|
222
237
|
Organization as Organization,
|
|
223
238
|
)
|
|
@@ -234,7 +249,34 @@ from .payment_receipt import (
|
|
|
234
249
|
from .payment_request import PaymentRequest as PaymentRequest
|
|
235
250
|
from .payment_method import PaymentMethod as PaymentMethod, PaymentMethodResponse as PaymentMethodResponse
|
|
236
251
|
from .plan import Plan as Plan
|
|
237
|
-
from .
|
|
252
|
+
from .quote import (
|
|
253
|
+
QuoteBillingItemAddOnResponse as QuoteBillingItemAddOnResponse,
|
|
254
|
+
)
|
|
255
|
+
from .quote import (
|
|
256
|
+
QuoteBillingItemCouponResponse as QuoteBillingItemCouponResponse,
|
|
257
|
+
)
|
|
258
|
+
from .quote import (
|
|
259
|
+
QuoteBillingItemPlanResponse as QuoteBillingItemPlanResponse,
|
|
260
|
+
)
|
|
261
|
+
from .quote import (
|
|
262
|
+
QuoteBillingItemsResponse as QuoteBillingItemsResponse,
|
|
263
|
+
)
|
|
264
|
+
from .quote import (
|
|
265
|
+
QuoteBillingItemWalletCreditResponse as QuoteBillingItemWalletCreditResponse,
|
|
266
|
+
)
|
|
267
|
+
from .quote import (
|
|
268
|
+
QuoteOwnerResponse as QuoteOwnerResponse,
|
|
269
|
+
)
|
|
270
|
+
from .quote import (
|
|
271
|
+
QuoteResponse as QuoteResponse,
|
|
272
|
+
)
|
|
273
|
+
from .quote import (
|
|
274
|
+
QuoteVersionApprove as QuoteVersionApprove,
|
|
275
|
+
)
|
|
276
|
+
from .quote import (
|
|
277
|
+
QuoteVersionResponse as QuoteVersionResponse,
|
|
278
|
+
)
|
|
279
|
+
from .subscription import ActivationRuleInput as ActivationRuleInput, Subscription as Subscription
|
|
238
280
|
from .tax import (
|
|
239
281
|
Tax as Tax,
|
|
240
282
|
)
|
{lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/credit_note.py
RENAMED
|
@@ -43,6 +43,7 @@ class CreditNoteResponse(BaseResponseModel):
|
|
|
43
43
|
number: Optional[str]
|
|
44
44
|
lago_invoice_id: Optional[str]
|
|
45
45
|
invoice_number: Optional[str]
|
|
46
|
+
purchase_order_number: Optional[str]
|
|
46
47
|
credit_status: Optional[str]
|
|
47
48
|
refund_status: Optional[str]
|
|
48
49
|
reason: Optional[str]
|
{lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/invoice.py
RENAMED
|
@@ -58,6 +58,7 @@ class OneOffInvoice(BaseModel):
|
|
|
58
58
|
payment_method: Optional[PaymentMethod]
|
|
59
59
|
invoice_custom_section: Optional[InvoiceCustomSectionInput]
|
|
60
60
|
billing_entity_code: Optional[str]
|
|
61
|
+
purchase_order_number: Optional[str]
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
class InvoicePreview(BaseModel):
|
|
@@ -115,6 +116,7 @@ class InvoiceResponse(BaseResponseModel):
|
|
|
115
116
|
lago_id: str
|
|
116
117
|
sequential_id: Optional[int]
|
|
117
118
|
number: str
|
|
119
|
+
purchase_order_number: Optional[str]
|
|
118
120
|
issuing_date: Optional[str]
|
|
119
121
|
payment_dispute_lost_at: Optional[str]
|
|
120
122
|
payment_due_date: Optional[str]
|
|
@@ -139,6 +141,7 @@ class InvoiceResponse(BaseResponseModel):
|
|
|
139
141
|
prepaid_purchased_credit_amount_cents: Optional[int]
|
|
140
142
|
|
|
141
143
|
file_url: Optional[str]
|
|
144
|
+
web_url: Optional[str]
|
|
142
145
|
customer: Optional[CustomerResponse]
|
|
143
146
|
billing_periods: Optional[BillingPeriodsResponse]
|
|
144
147
|
subscriptions: Optional[SubscriptionsResponse]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from lago_python_client.base_model import BaseModel
|
|
4
|
+
|
|
5
|
+
from ..base_model import BaseResponseModel
|
|
6
|
+
from .quote import QuoteBillingItemsResponse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class OrderExecute(BaseModel):
|
|
10
|
+
execution_mode: Optional[str]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OrderExecutionRecordResponse(BaseResponseModel):
|
|
14
|
+
executed_at: Optional[str]
|
|
15
|
+
execution_mode: Optional[str]
|
|
16
|
+
invoice_id: Optional[str]
|
|
17
|
+
subscription_ids: Optional[List[str]]
|
|
18
|
+
terminated_subscription_ids: Optional[List[str]]
|
|
19
|
+
applied_coupon_ids: Optional[List[str]]
|
|
20
|
+
wallet_ids: Optional[List[str]]
|
|
21
|
+
errors: Optional[List[str]]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class OrderResponse(BaseResponseModel):
|
|
25
|
+
lago_id: str
|
|
26
|
+
number: str
|
|
27
|
+
status: str
|
|
28
|
+
order_type: str
|
|
29
|
+
execution_mode: Optional[str]
|
|
30
|
+
currency: Optional[str]
|
|
31
|
+
executed_at: Optional[str]
|
|
32
|
+
execution_record: Optional[OrderExecutionRecordResponse]
|
|
33
|
+
lago_organization_id: str
|
|
34
|
+
lago_customer_id: str
|
|
35
|
+
lago_order_form_id: str
|
|
36
|
+
created_at: str
|
|
37
|
+
updated_at: str
|
|
38
|
+
# Omitted from the webhook payloads, being a heavy blob.
|
|
39
|
+
billing_snapshot: Optional[QuoteBillingItemsResponse]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from lago_python_client.base_model import BaseModel
|
|
4
|
+
|
|
5
|
+
from ..base_model import BaseResponseModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class OrderFormMarkAsSigned(BaseModel):
|
|
9
|
+
signed_document: Optional[str]
|
|
10
|
+
execution_mode: Optional[str]
|
|
11
|
+
execute_at: Optional[str]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class OrderFormResponse(BaseResponseModel):
|
|
15
|
+
lago_id: str
|
|
16
|
+
number: str
|
|
17
|
+
status: str
|
|
18
|
+
void_reason: Optional[str]
|
|
19
|
+
expires_at: Optional[str]
|
|
20
|
+
signed_at: Optional[str]
|
|
21
|
+
voided_at: Optional[str]
|
|
22
|
+
signed_document_url: Optional[str]
|
|
23
|
+
lago_organization_id: str
|
|
24
|
+
lago_customer_id: str
|
|
25
|
+
lago_quote_id: str
|
|
26
|
+
lago_quote_version_id: str
|
|
27
|
+
created_at: str
|
|
28
|
+
updated_at: str
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from lago_python_client.base_model import BaseModel
|
|
4
|
+
|
|
5
|
+
from ..base_model import BaseResponseModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class QuoteVersionApprove(BaseModel):
|
|
9
|
+
expires_at: Optional[str]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class QuoteBillingItemAddOnResponse(BaseResponseModel):
|
|
13
|
+
id: Optional[str]
|
|
14
|
+
localId: Optional[str]
|
|
15
|
+
type: Optional[str]
|
|
16
|
+
payload: Optional[Dict[str, Any]]
|
|
17
|
+
overrides: Optional[Dict[str, Any]]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class QuoteBillingItemPlanResponse(BaseResponseModel):
|
|
21
|
+
id: Optional[str]
|
|
22
|
+
localId: Optional[str]
|
|
23
|
+
type: Optional[str]
|
|
24
|
+
payload: Optional[Dict[str, Any]]
|
|
25
|
+
overrides: Optional[Dict[str, Any]]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class QuoteBillingItemCouponResponse(BaseResponseModel):
|
|
29
|
+
id: Optional[str]
|
|
30
|
+
localId: Optional[str]
|
|
31
|
+
type: Optional[str]
|
|
32
|
+
payload: Optional[Dict[str, Any]]
|
|
33
|
+
overrides: Optional[Dict[str, Any]]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class QuoteBillingItemWalletCreditResponse(BaseResponseModel):
|
|
37
|
+
localId: Optional[str]
|
|
38
|
+
type: Optional[str]
|
|
39
|
+
payload: Optional[Dict[str, Any]]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class QuoteBillingItemsResponse(BaseResponseModel):
|
|
43
|
+
addOns: Optional[List[QuoteBillingItemAddOnResponse]]
|
|
44
|
+
plans: Optional[List[QuoteBillingItemPlanResponse]]
|
|
45
|
+
coupons: Optional[List[QuoteBillingItemCouponResponse]]
|
|
46
|
+
walletCredits: Optional[List[QuoteBillingItemWalletCreditResponse]]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class QuoteVersionResponse(BaseResponseModel):
|
|
50
|
+
lago_id: str
|
|
51
|
+
lago_quote_id: str
|
|
52
|
+
lago_organization_id: str
|
|
53
|
+
version: int
|
|
54
|
+
status: str
|
|
55
|
+
currency: Optional[str]
|
|
56
|
+
billing_entity_code: Optional[str]
|
|
57
|
+
void_reason: Optional[str]
|
|
58
|
+
approved_at: Optional[str]
|
|
59
|
+
voided_at: Optional[str]
|
|
60
|
+
created_at: str
|
|
61
|
+
updated_at: str
|
|
62
|
+
# Only returned when a single version is retrieved.
|
|
63
|
+
content: Optional[str]
|
|
64
|
+
billing_items: Optional[QuoteBillingItemsResponse]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class QuoteOwnerResponse(BaseResponseModel):
|
|
68
|
+
lago_id: str
|
|
69
|
+
email: Optional[str]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class QuoteResponse(BaseResponseModel):
|
|
73
|
+
lago_id: str
|
|
74
|
+
number: str
|
|
75
|
+
order_type: str
|
|
76
|
+
lago_customer_id: str
|
|
77
|
+
lago_subscription_id: Optional[str]
|
|
78
|
+
lago_organization_id: str
|
|
79
|
+
created_at: str
|
|
80
|
+
updated_at: str
|
|
81
|
+
current_version: Optional[QuoteVersionResponse]
|
|
82
|
+
# Only returned when a single quote is retrieved.
|
|
83
|
+
owners: Optional[List[QuoteOwnerResponse]]
|
{lago_python_client-1.49.0 → lago_python_client-1.52.0}/lago_python_client/models/subscription.py
RENAMED
|
@@ -8,6 +8,11 @@ from .payment_method import PaymentMethod
|
|
|
8
8
|
from .plan import PlanOverrides
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
class ActivationRuleInput(BaseModel):
|
|
12
|
+
type: Optional[str]
|
|
13
|
+
timeout_hours: Optional[int]
|
|
14
|
+
|
|
15
|
+
|
|
11
16
|
class Subscription(BaseModel):
|
|
12
17
|
plan_code: Optional[str]
|
|
13
18
|
external_customer_id: Optional[str]
|
|
@@ -21,6 +26,8 @@ class Subscription(BaseModel):
|
|
|
21
26
|
invoice_custom_section: Optional[InvoiceCustomSectionInput]
|
|
22
27
|
consolidate_invoice: Optional[bool]
|
|
23
28
|
billing_entity_code: Optional[str]
|
|
29
|
+
purchase_order_number: Optional[str]
|
|
30
|
+
activation_rules: Optional[List[ActivationRuleInput]]
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class Subscriptions(BaseModel):
|
|
@@ -29,6 +36,16 @@ class Subscriptions(BaseModel):
|
|
|
29
36
|
terminated_at: Optional[str]
|
|
30
37
|
|
|
31
38
|
|
|
39
|
+
class ActivationRuleResponse(BaseResponseModel):
|
|
40
|
+
lago_id: Optional[str]
|
|
41
|
+
type: Optional[str]
|
|
42
|
+
timeout_hours: Optional[int]
|
|
43
|
+
status: Optional[str]
|
|
44
|
+
expires_at: Optional[str]
|
|
45
|
+
created_at: Optional[str]
|
|
46
|
+
updated_at: Optional[str]
|
|
47
|
+
|
|
48
|
+
|
|
32
49
|
class SubscriptionResponse(BaseResponseModel):
|
|
33
50
|
lago_id: str
|
|
34
51
|
lago_customer_id: Optional[str]
|
|
@@ -59,6 +76,10 @@ class SubscriptionResponse(BaseResponseModel):
|
|
|
59
76
|
applied_invoice_custom_sections: Optional[AppliedInvoiceCustomSections]
|
|
60
77
|
consolidate_invoice: Optional[bool]
|
|
61
78
|
billing_entity_code: Optional[str]
|
|
79
|
+
purchase_order_number: Optional[str]
|
|
80
|
+
cancellation_reason: Optional[str]
|
|
81
|
+
activated_at: Optional[str]
|
|
82
|
+
activation_rules: Optional[List[ActivationRuleResponse]]
|
|
62
83
|
|
|
63
84
|
|
|
64
85
|
class SubscriptionsResponse(BaseResponseModel):
|
|
@@ -22,6 +22,7 @@ class RecurringTransactionRule(BaseModel):
|
|
|
22
22
|
transaction_name: Optional[str]
|
|
23
23
|
ignore_paid_top_up_limits: Optional[bool]
|
|
24
24
|
grants_target_top_up: Optional[bool]
|
|
25
|
+
purchase_order_number: Optional[str]
|
|
25
26
|
payment_method: Optional[PaymentMethod]
|
|
26
27
|
invoice_custom_section: Optional[InvoiceCustomSectionInput]
|
|
27
28
|
|
|
@@ -43,6 +44,7 @@ class RecurringTransactionRuleResponse(BaseModel):
|
|
|
43
44
|
transaction_name: Optional[str]
|
|
44
45
|
ignore_paid_top_up_limits: Optional[bool]
|
|
45
46
|
grants_target_top_up: Optional[bool]
|
|
47
|
+
purchase_order_number: Optional[str]
|
|
46
48
|
payment_method: Optional[PaymentMethod]
|
|
47
49
|
applied_invoice_custom_sections: Optional[AppliedInvoiceCustomSections]
|
|
48
50
|
|
|
@@ -82,6 +84,7 @@ class Wallet(BaseModel):
|
|
|
82
84
|
payment_method: Optional[PaymentMethod]
|
|
83
85
|
invoice_custom_section: Optional[InvoiceCustomSectionInput]
|
|
84
86
|
billing_entity_code: Optional[str]
|
|
87
|
+
purchase_order_number: Optional[str]
|
|
85
88
|
|
|
86
89
|
|
|
87
90
|
class WalletResponse(BaseResponseModel):
|
|
@@ -115,3 +118,4 @@ class WalletResponse(BaseResponseModel):
|
|
|
115
118
|
payment_method: Optional[PaymentMethod]
|
|
116
119
|
applied_invoice_custom_sections: Optional[AppliedInvoiceCustomSections]
|
|
117
120
|
billing_entity_code: Optional[str]
|
|
121
|
+
purchase_order_number: Optional[str]
|
|
@@ -16,6 +16,7 @@ class WalletTransaction(BaseModel):
|
|
|
16
16
|
metadata: Optional[List[Dict[str, str]]]
|
|
17
17
|
name: Optional[str]
|
|
18
18
|
ignore_paid_top_up_limits: Optional[bool]
|
|
19
|
+
purchase_order_number: Optional[str]
|
|
19
20
|
payment_method: Optional[PaymentMethod]
|
|
20
21
|
invoice_custom_section: Optional[InvoiceCustomSectionInput]
|
|
21
22
|
|
|
@@ -41,6 +42,7 @@ class WalletTransactionResponse(BaseResponseModel):
|
|
|
41
42
|
metadata: Optional[List[Dict[str, str]]]
|
|
42
43
|
name: Optional[str]
|
|
43
44
|
invoice_requires_successful_payment: Optional[bool]
|
|
45
|
+
purchase_order_number: Optional[str]
|
|
44
46
|
payment_method: Optional[PaymentMethod]
|
|
45
47
|
applied_invoice_custom_sections: Optional[AppliedInvoiceCustomSections]
|
|
46
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import List, Optional
|
|
2
2
|
|
|
3
3
|
from lago_python_client.base_model import BaseModel
|
|
4
4
|
|
|
@@ -7,6 +7,9 @@ from ..base_model import BaseResponseModel
|
|
|
7
7
|
|
|
8
8
|
class WebhookEndpoint(BaseModel):
|
|
9
9
|
webhook_url: Optional[str]
|
|
10
|
+
signature_algo: Optional[str]
|
|
11
|
+
name: Optional[str]
|
|
12
|
+
event_types: Optional[List[str]]
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
class WebhookEndpointResponse(BaseResponseModel):
|
|
@@ -14,4 +17,6 @@ class WebhookEndpointResponse(BaseResponseModel):
|
|
|
14
17
|
lago_organization_id: str
|
|
15
18
|
webhook_url: str
|
|
16
19
|
signature_algo: Optional[str]
|
|
20
|
+
name: Optional[str]
|
|
21
|
+
event_types: Optional[List[str]]
|
|
17
22
|
created_at: str
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import ClassVar, Optional, Type
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from ..base_client import BaseClient
|
|
6
|
+
from ..mixins import (
|
|
7
|
+
DEFAULT_TIMEOUT,
|
|
8
|
+
FindAllCommandMixin,
|
|
9
|
+
FindCommandMixin,
|
|
10
|
+
)
|
|
11
|
+
from ..models.order_form import OrderFormMarkAsSigned, OrderFormResponse
|
|
12
|
+
from ..services.json import to_json
|
|
13
|
+
from ..services.request import (
|
|
14
|
+
make_headers,
|
|
15
|
+
make_url,
|
|
16
|
+
send_post_request,
|
|
17
|
+
)
|
|
18
|
+
from ..services.response import Response, get_response_data, prepare_object_response
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class OrderFormClient(
|
|
22
|
+
FindCommandMixin[OrderFormResponse],
|
|
23
|
+
FindAllCommandMixin[OrderFormResponse],
|
|
24
|
+
BaseClient,
|
|
25
|
+
):
|
|
26
|
+
API_RESOURCE: ClassVar[str] = "order_forms"
|
|
27
|
+
RESPONSE_MODEL: ClassVar[Type[OrderFormResponse]] = OrderFormResponse
|
|
28
|
+
ROOT_NAME: ClassVar[str] = "order_form"
|
|
29
|
+
|
|
30
|
+
def mark_as_signed(
|
|
31
|
+
self,
|
|
32
|
+
resource_id: str,
|
|
33
|
+
input_object: Optional[OrderFormMarkAsSigned] = None,
|
|
34
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
35
|
+
) -> OrderFormResponse:
|
|
36
|
+
"""Record the customer's signature and create the order carrying the deal out."""
|
|
37
|
+
payload = input_object.dict(exclude_none=True) if input_object else {}
|
|
38
|
+
|
|
39
|
+
api_response: Response = send_post_request(
|
|
40
|
+
url=make_url(
|
|
41
|
+
origin=self.base_url,
|
|
42
|
+
path_parts=(self.API_RESOURCE, resource_id, "mark_as_signed"),
|
|
43
|
+
),
|
|
44
|
+
content=to_json({self.ROOT_NAME: payload}) if payload else None,
|
|
45
|
+
headers=make_headers(api_key=self.api_key),
|
|
46
|
+
timeout=timeout,
|
|
47
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return prepare_object_response(
|
|
51
|
+
response_model=self.RESPONSE_MODEL,
|
|
52
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def void(
|
|
56
|
+
self,
|
|
57
|
+
resource_id: str,
|
|
58
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
59
|
+
) -> OrderFormResponse:
|
|
60
|
+
"""Void a generated order form, cascading to the quote version it came from."""
|
|
61
|
+
api_response: Response = send_post_request(
|
|
62
|
+
url=make_url(
|
|
63
|
+
origin=self.base_url,
|
|
64
|
+
path_parts=(self.API_RESOURCE, resource_id, "void"),
|
|
65
|
+
),
|
|
66
|
+
headers=make_headers(api_key=self.api_key),
|
|
67
|
+
timeout=timeout,
|
|
68
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return prepare_object_response(
|
|
72
|
+
response_model=self.RESPONSE_MODEL,
|
|
73
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
74
|
+
)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from typing import ClassVar, Optional, Type
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from ..base_client import BaseClient
|
|
6
|
+
from ..mixins import (
|
|
7
|
+
DEFAULT_TIMEOUT,
|
|
8
|
+
FindAllCommandMixin,
|
|
9
|
+
FindCommandMixin,
|
|
10
|
+
)
|
|
11
|
+
from ..models.order import OrderExecute, OrderResponse
|
|
12
|
+
from ..services.json import to_json
|
|
13
|
+
from ..services.request import (
|
|
14
|
+
make_headers,
|
|
15
|
+
make_url,
|
|
16
|
+
send_post_request,
|
|
17
|
+
)
|
|
18
|
+
from ..services.response import Response, get_response_data, prepare_object_response
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class OrderClient(
|
|
22
|
+
FindCommandMixin[OrderResponse],
|
|
23
|
+
FindAllCommandMixin[OrderResponse],
|
|
24
|
+
BaseClient,
|
|
25
|
+
):
|
|
26
|
+
API_RESOURCE: ClassVar[str] = "orders"
|
|
27
|
+
RESPONSE_MODEL: ClassVar[Type[OrderResponse]] = OrderResponse
|
|
28
|
+
ROOT_NAME: ClassVar[str] = "order"
|
|
29
|
+
|
|
30
|
+
def execute(
|
|
31
|
+
self,
|
|
32
|
+
resource_id: str,
|
|
33
|
+
input_object: Optional[OrderExecute] = None,
|
|
34
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
35
|
+
) -> OrderResponse:
|
|
36
|
+
"""Carry out an order on demand, without waiting for its schedule."""
|
|
37
|
+
payload = input_object.dict(exclude_none=True) if input_object else {}
|
|
38
|
+
|
|
39
|
+
api_response: Response = send_post_request(
|
|
40
|
+
url=make_url(
|
|
41
|
+
origin=self.base_url,
|
|
42
|
+
path_parts=(self.API_RESOURCE, resource_id, "execute"),
|
|
43
|
+
),
|
|
44
|
+
content=to_json({self.ROOT_NAME: payload}) if payload else None,
|
|
45
|
+
headers=make_headers(api_key=self.api_key),
|
|
46
|
+
timeout=timeout,
|
|
47
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return prepare_object_response(
|
|
51
|
+
response_model=self.RESPONSE_MODEL,
|
|
52
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
53
|
+
)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from typing import ClassVar, Optional, Type
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from ..base_client import BaseClient
|
|
6
|
+
from ..mixins import DEFAULT_TIMEOUT, FindCommandMixin
|
|
7
|
+
from ..models.quote import QuoteVersionApprove, QuoteVersionResponse
|
|
8
|
+
from ..services.json import to_json
|
|
9
|
+
from ..services.request import (
|
|
10
|
+
make_headers,
|
|
11
|
+
make_url,
|
|
12
|
+
send_post_request,
|
|
13
|
+
)
|
|
14
|
+
from ..services.response import Response, get_response_data, prepare_object_response
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class QuoteVersionClient(
|
|
18
|
+
FindCommandMixin[QuoteVersionResponse],
|
|
19
|
+
BaseClient,
|
|
20
|
+
):
|
|
21
|
+
API_RESOURCE: ClassVar[str] = "quote_versions"
|
|
22
|
+
RESPONSE_MODEL: ClassVar[Type[QuoteVersionResponse]] = QuoteVersionResponse
|
|
23
|
+
ROOT_NAME: ClassVar[str] = "quote_version"
|
|
24
|
+
|
|
25
|
+
def approve(
|
|
26
|
+
self,
|
|
27
|
+
resource_id: str,
|
|
28
|
+
input_object: Optional[QuoteVersionApprove] = None,
|
|
29
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
30
|
+
) -> QuoteVersionResponse:
|
|
31
|
+
"""Approve a draft version and generate the order form to sign."""
|
|
32
|
+
payload = input_object.dict(exclude_none=True) if input_object else {}
|
|
33
|
+
|
|
34
|
+
api_response: Response = send_post_request(
|
|
35
|
+
url=make_url(
|
|
36
|
+
origin=self.base_url,
|
|
37
|
+
path_parts=(self.API_RESOURCE, resource_id, "approve"),
|
|
38
|
+
),
|
|
39
|
+
content=to_json(payload) if payload else None,
|
|
40
|
+
headers=make_headers(api_key=self.api_key),
|
|
41
|
+
timeout=timeout,
|
|
42
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return prepare_object_response(
|
|
46
|
+
response_model=self.RESPONSE_MODEL,
|
|
47
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def void(
|
|
51
|
+
self,
|
|
52
|
+
resource_id: str,
|
|
53
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
54
|
+
) -> QuoteVersionResponse:
|
|
55
|
+
"""Void a draft version, which makes it definitive."""
|
|
56
|
+
api_response: Response = send_post_request(
|
|
57
|
+
url=make_url(
|
|
58
|
+
origin=self.base_url,
|
|
59
|
+
path_parts=(self.API_RESOURCE, resource_id, "void"),
|
|
60
|
+
),
|
|
61
|
+
headers=make_headers(api_key=self.api_key),
|
|
62
|
+
timeout=timeout,
|
|
63
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return prepare_object_response(
|
|
67
|
+
response_model=self.RESPONSE_MODEL,
|
|
68
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
def clone(
|
|
72
|
+
self,
|
|
73
|
+
resource_id: str,
|
|
74
|
+
timeout: Optional[httpx.Timeout] = DEFAULT_TIMEOUT,
|
|
75
|
+
) -> QuoteVersionResponse:
|
|
76
|
+
"""Copy a version into a new draft version of the same quote."""
|
|
77
|
+
api_response: Response = send_post_request(
|
|
78
|
+
url=make_url(
|
|
79
|
+
origin=self.base_url,
|
|
80
|
+
path_parts=(self.API_RESOURCE, resource_id, "clone"),
|
|
81
|
+
),
|
|
82
|
+
headers=make_headers(api_key=self.api_key),
|
|
83
|
+
timeout=timeout,
|
|
84
|
+
rate_limit_retry_config=self.rate_limit_retry_config,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
return prepare_object_response(
|
|
88
|
+
response_model=self.RESPONSE_MODEL,
|
|
89
|
+
data=get_response_data(response=api_response, key=self.ROOT_NAME),
|
|
90
|
+
)
|