ottimate-sdk 0.1.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.
- ottimate_sdk-0.1.1/PKG-INFO +10 -0
- ottimate_sdk-0.1.1/accounts/__init__.py +37 -0
- ottimate_sdk-0.1.1/accounts/client.py +273 -0
- ottimate_sdk-0.1.1/accounts/raw_client.py +259 -0
- ottimate_sdk-0.1.1/accounts/types/__init__.py +38 -0
- ottimate_sdk-0.1.1/accounts/types/get_accounts_id_companies_response.py +25 -0
- ottimate_sdk-0.1.1/accounts/types/get_accounts_id_locations_response.py +25 -0
- ottimate_sdk-0.1.1/batch/__init__.py +4 -0
- ottimate_sdk-0.1.1/batch/client.py +197 -0
- ottimate_sdk-0.1.1/batch/raw_client.py +270 -0
- ottimate_sdk-0.1.1/catalog/__init__.py +100 -0
- ottimate_sdk-0.1.1/catalog/client.py +2324 -0
- ottimate_sdk-0.1.1/catalog/raw_client.py +2771 -0
- ottimate_sdk-0.1.1/catalog/types/__init__.py +110 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_allowance_bulk_create_request_allowances_item.py +40 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_allowance_bulk_create_request_allowances_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_entry_bulk_create_request_entries_item.py +61 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_entry_bulk_create_request_entries_item_allowances_item.py +77 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_entry_bulk_create_request_entries_item_allowances_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_entry_bulk_create_request_entries_item_prices_item.py +72 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_entry_bulk_create_request_entries_item_prices_item_price_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_prices_bulk_create_request_prices_item.py +33 -0
- ottimate_sdk-0.1.1/catalog/types/catalog_prices_bulk_create_request_prices_item_price_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/get_catalog_prices_request_price_type.py +5 -0
- ottimate_sdk-0.1.1/catalog/types/get_catalog_prices_response.py +29 -0
- ottimate_sdk-0.1.1/catalog/types/get_catalog_variances_request_exception_type.py +5 -0
- ottimate_sdk-0.1.1/catalog/types/patch_catalog_allowances_id_request_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/patch_catalog_entries_id_request_dimensions.py +21 -0
- ottimate_sdk-0.1.1/catalog/types/patch_catalog_entries_id_request_properties.py +21 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_allowances_request_allowance_type.py +5 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_entries_request_allowances_item.py +68 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_entries_request_prices_item.py +64 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_entries_request_prices_item_price_type.py +7 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_prices_bulk_response.py +47 -0
- ottimate_sdk-0.1.1/catalog/types/post_catalog_prices_request_price_type.py +5 -0
- ottimate_sdk-0.1.1/core/__init__.py +105 -0
- ottimate_sdk-0.1.1/core/api_error.py +23 -0
- ottimate_sdk-0.1.1/core/client_wrapper.py +94 -0
- ottimate_sdk-0.1.1/core/datetime_utils.py +28 -0
- ottimate_sdk-0.1.1/core/file.py +67 -0
- ottimate_sdk-0.1.1/core/force_multipart.py +18 -0
- ottimate_sdk-0.1.1/core/http_client.py +629 -0
- ottimate_sdk-0.1.1/core/http_response.py +55 -0
- ottimate_sdk-0.1.1/core/http_sse/__init__.py +42 -0
- ottimate_sdk-0.1.1/core/http_sse/_api.py +112 -0
- ottimate_sdk-0.1.1/core/http_sse/_decoders.py +61 -0
- ottimate_sdk-0.1.1/core/http_sse/_exceptions.py +7 -0
- ottimate_sdk-0.1.1/core/http_sse/_models.py +17 -0
- ottimate_sdk-0.1.1/core/jsonable_encoder.py +100 -0
- ottimate_sdk-0.1.1/core/pydantic_utilities.py +260 -0
- ottimate_sdk-0.1.1/core/query_encoder.py +58 -0
- ottimate_sdk-0.1.1/core/remove_none_from_dict.py +11 -0
- ottimate_sdk-0.1.1/core/request_options.py +35 -0
- ottimate_sdk-0.1.1/core/serialization.py +276 -0
- ottimate_sdk-0.1.1/dimensions/__init__.py +82 -0
- ottimate_sdk-0.1.1/dimensions/client.py +526 -0
- ottimate_sdk-0.1.1/dimensions/raw_client.py +605 -0
- ottimate_sdk-0.1.1/dimensions/types/__init__.py +84 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_id_response.py +21 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_id_response_dimension.py +58 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_id_response_dimension_ottimate_type.py +25 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_root_response.py +24 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_root_response_dimensions_item.py +60 -0
- ottimate_sdk-0.1.1/dimensions/types/get_dimensions_root_response_dimensions_item_ottimate_type.py +25 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_request_dimensions_item.py +50 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_request_dimensions_item_ottimate_type.py +25 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_response.py +29 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_response_created_item.py +20 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_response_errors_item.py +20 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_bulk_create_response_updated_item.py +20 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_root_request_ottimate_type.py +25 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_root_response.py +36 -0
- ottimate_sdk-0.1.1/dimensions/types/post_dimensions_root_response_ottimate_type.py +25 -0
- ottimate_sdk-0.1.1/errors/__init__.py +59 -0
- ottimate_sdk-0.1.1/errors/bad_request_error.py +11 -0
- ottimate_sdk-0.1.1/errors/content_too_large_error.py +11 -0
- ottimate_sdk-0.1.1/errors/forbidden_error.py +11 -0
- ottimate_sdk-0.1.1/errors/internal_server_error.py +11 -0
- ottimate_sdk-0.1.1/errors/not_found_error.py +11 -0
- ottimate_sdk-0.1.1/errors/precondition_failed_error.py +11 -0
- ottimate_sdk-0.1.1/errors/unauthorized_error.py +11 -0
- ottimate_sdk-0.1.1/errors/unprocessable_entity_error.py +11 -0
- ottimate_sdk-0.1.1/invoices/__init__.py +94 -0
- ottimate_sdk-0.1.1/invoices/client.py +2096 -0
- ottimate_sdk-0.1.1/invoices/raw_client.py +3122 -0
- ottimate_sdk-0.1.1/invoices/types/__init__.py +92 -0
- ottimate_sdk-0.1.1/invoices/types/delete_invoices_id_approvers_response.py +21 -0
- ottimate_sdk-0.1.1/invoices/types/get_invoices_id_approvers_response.py +25 -0
- ottimate_sdk-0.1.1/invoices/types/get_invoices_root_request_payment_status.py +5 -0
- ottimate_sdk-0.1.1/invoices/types/get_invoices_root_request_status.py +17 -0
- ottimate_sdk-0.1.1/invoices/types/get_invoices_root_response.py +33 -0
- ottimate_sdk-0.1.1/invoices/types/get_invoices_uploads_response.py +30 -0
- ottimate_sdk-0.1.1/invoices/types/patch_invoices_id_request_items_item.py +37 -0
- ottimate_sdk-0.1.1/invoices/types/patch_invoices_id_request_type.py +5 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_id_approve_response.py +35 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_id_approve_response_invoice.py +32 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_id_approvers_response.py +32 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_id_flag_response.py +35 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_id_flag_response_invoice.py +32 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_mark_exported_request_invoices_item.py +32 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_mark_unexported_request_invoices_item.py +27 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_root_request_items_item.py +27 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_root_request_type.py +5 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_root_response.py +48 -0
- ottimate_sdk-0.1.1/invoices/types/post_invoices_root_response_items.py +36 -0
- ottimate_sdk-0.1.1/oauth/__init__.py +34 -0
- ottimate_sdk-0.1.1/oauth/client.py +149 -0
- ottimate_sdk-0.1.1/oauth/raw_client.py +191 -0
- ottimate_sdk-0.1.1/oauth/types/__init__.py +34 -0
- ottimate_sdk-0.1.1/oauth/types/post_oauth_token_response.py +37 -0
- ottimate_sdk-0.1.1/ottimate_sdk.egg-info/PKG-INFO +10 -0
- ottimate_sdk-0.1.1/ottimate_sdk.egg-info/SOURCES.txt +281 -0
- ottimate_sdk-0.1.1/ottimate_sdk.egg-info/dependency_links.txt +1 -0
- ottimate_sdk-0.1.1/ottimate_sdk.egg-info/requires.txt +4 -0
- ottimate_sdk-0.1.1/ottimate_sdk.egg-info/top_level.txt +13 -0
- ottimate_sdk-0.1.1/purchase_orders/__init__.py +55 -0
- ottimate_sdk-0.1.1/purchase_orders/client.py +823 -0
- ottimate_sdk-0.1.1/purchase_orders/raw_client.py +918 -0
- ottimate_sdk-0.1.1/purchase_orders/types/__init__.py +57 -0
- ottimate_sdk-0.1.1/purchase_orders/types/get_purchase_orders_root_request_status.py +7 -0
- ottimate_sdk-0.1.1/purchase_orders/types/get_purchase_orders_root_response.py +24 -0
- ottimate_sdk-0.1.1/purchase_orders/types/patch_purchase_orders_id_request_items_item.py +41 -0
- ottimate_sdk-0.1.1/purchase_orders/types/purchase_order_bulk_upsert_request_purchase_orders_item.py +53 -0
- ottimate_sdk-0.1.1/purchase_orders/types/purchase_order_bulk_upsert_request_purchase_orders_item_items_item.py +24 -0
- ottimate_sdk-0.1.1/purchase_orders/types/purchase_order_create_request_items_item.py +24 -0
- ottimate_sdk-0.1.1/pyproject.toml +21 -0
- ottimate_sdk-0.1.1/receipts/__init__.py +52 -0
- ottimate_sdk-0.1.1/receipts/client.py +718 -0
- ottimate_sdk-0.1.1/receipts/raw_client.py +833 -0
- ottimate_sdk-0.1.1/receipts/types/__init__.py +50 -0
- ottimate_sdk-0.1.1/receipts/types/get_receipts_root_response.py +24 -0
- ottimate_sdk-0.1.1/receipts/types/patch_receipts_id_request_items_item.py +36 -0
- ottimate_sdk-0.1.1/receipts/types/receipt_bulk_upsert_request_receipts_item.py +31 -0
- ottimate_sdk-0.1.1/receipts/types/receipt_bulk_upsert_request_receipts_item_items_item.py +23 -0
- ottimate_sdk-0.1.1/receipts/types/receipt_create_request_items_item.py +23 -0
- ottimate_sdk-0.1.1/setup.cfg +4 -0
- ottimate_sdk-0.1.1/types/__init__.py +413 -0
- ottimate_sdk-0.1.1/types/approver_object.py +40 -0
- ottimate_sdk-0.1.1/types/approver_object_approver.py +36 -0
- ottimate_sdk-0.1.1/types/approver_object_policy.py +31 -0
- ottimate_sdk-0.1.1/types/batch_progress_response.py +59 -0
- ottimate_sdk-0.1.1/types/batch_progress_response_status.py +5 -0
- ottimate_sdk-0.1.1/types/batch_results_response.py +29 -0
- ottimate_sdk-0.1.1/types/batch_results_response_results_item.py +32 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_failure.py +27 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_operation_response.py +28 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_operation_response_failed_item.py +27 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_unexport_operation_response.py +41 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_unexport_operation_response_failed_item.py +27 -0
- ottimate_sdk-0.1.1/types/bulk_invoice_unexport_operation_response_skipped_item.py +27 -0
- ottimate_sdk-0.1.1/types/bulk_upsert_async_response.py +25 -0
- ottimate_sdk-0.1.1/types/bulk_upsert_async_response_summary.py +20 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_bulk_item.py +39 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_bulk_item_allowance_type.py +5 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_list_response.py +23 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_list_response_results_item.py +96 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_list_response_results_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_list_response_results_item_target_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_nested_create_request.py +73 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_nested_create_request_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_nested_object.py +89 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_nested_object_allowance_type.py +5 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_nested_object_target_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_object.py +94 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_object_allowance_type.py +5 -0
- ottimate_sdk-0.1.1/types/catalog_allowance_object_target_type.py +5 -0
- ottimate_sdk-0.1.1/types/catalog_bulk_error_item.py +46 -0
- ottimate_sdk-0.1.1/types/catalog_bulk_response.py +77 -0
- ottimate_sdk-0.1.1/types/catalog_bulk_response_errors_item.py +46 -0
- ottimate_sdk-0.1.1/types/catalog_bulk_skipped_item.py +36 -0
- ottimate_sdk-0.1.1/types/catalog_entry_basic_object.py +107 -0
- ottimate_sdk-0.1.1/types/catalog_entry_bulk_item.py +49 -0
- ottimate_sdk-0.1.1/types/catalog_entry_bulk_item_allowances_item.py +73 -0
- ottimate_sdk-0.1.1/types/catalog_entry_bulk_item_allowances_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_bulk_item_prices_item.py +68 -0
- ottimate_sdk-0.1.1/types/catalog_entry_bulk_item_prices_item_price_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_create_request.py +113 -0
- ottimate_sdk-0.1.1/types/catalog_entry_create_request_allowances_item.py +75 -0
- ottimate_sdk-0.1.1/types/catalog_entry_create_request_allowances_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_create_request_prices_item.py +68 -0
- ottimate_sdk-0.1.1/types/catalog_entry_create_request_prices_item_price_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_list_response.py +48 -0
- ottimate_sdk-0.1.1/types/catalog_entry_list_response_results_item.py +107 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object.py +129 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object_allowances_item.py +89 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object_allowances_item_allowance_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object_allowances_item_target_type.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object_prices_item.py +83 -0
- ottimate_sdk-0.1.1/types/catalog_entry_object_prices_item_price_type_display.py +7 -0
- ottimate_sdk-0.1.1/types/catalog_error_response.py +38 -0
- ottimate_sdk-0.1.1/types/catalog_price_create_request.py +68 -0
- ottimate_sdk-0.1.1/types/catalog_price_create_request_price_type.py +5 -0
- ottimate_sdk-0.1.1/types/catalog_price_item.py +93 -0
- ottimate_sdk-0.1.1/types/catalog_price_item_price_type_display.py +5 -0
- ottimate_sdk-0.1.1/types/company_object.py +22 -0
- ottimate_sdk-0.1.1/types/error_response.py +33 -0
- ottimate_sdk-0.1.1/types/instant_capture_file_object.py +53 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response.py +57 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_batch.py +32 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_batch_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_container.py +41 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_invoice.py +38 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_invoice_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_processing.py +38 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_processing_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_upload.py +46 -0
- ottimate_sdk-0.1.1/types/invoice_creation_response_upload_upload_method.py +7 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object.py +144 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_history_item.py +44 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_history_item_user.py +41 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_images_item.py +27 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_items_processing_result.py +37 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_items_processing_result_status.py +7 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_payment_info.py +31 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_payment_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_detail_object_type.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_item_variance_list_response.py +54 -0
- ottimate_sdk-0.1.1/types/invoice_item_variance_list_response_results_item.py +26 -0
- ottimate_sdk-0.1.1/types/invoice_needs_attention_object.py +131 -0
- ottimate_sdk-0.1.1/types/invoice_needs_attention_object_on_hold.py +31 -0
- ottimate_sdk-0.1.1/types/invoice_needs_attention_object_payment_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_needs_attention_object_type.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_object.py +147 -0
- ottimate_sdk-0.1.1/types/invoice_object_images_item.py +27 -0
- ottimate_sdk-0.1.1/types/invoice_object_on_hold.py +31 -0
- ottimate_sdk-0.1.1/types/invoice_object_payment_status.py +5 -0
- ottimate_sdk-0.1.1/types/invoice_object_type.py +5 -0
- ottimate_sdk-0.1.1/types/line_item_object.py +77 -0
- ottimate_sdk-0.1.1/types/location_object.py +22 -0
- ottimate_sdk-0.1.1/types/oauth_scope.py +5 -0
- ottimate_sdk-0.1.1/types/purchase_order_create_response.py +32 -0
- ottimate_sdk-0.1.1/types/purchase_order_create_response_status.py +7 -0
- ottimate_sdk-0.1.1/types/purchase_order_detail.py +21 -0
- ottimate_sdk-0.1.1/types/purchase_order_detail_purchase_order.py +41 -0
- ottimate_sdk-0.1.1/types/purchase_order_detail_purchase_order_items_item.py +28 -0
- ottimate_sdk-0.1.1/types/purchase_order_detail_purchase_order_status.py +7 -0
- ottimate_sdk-0.1.1/types/purchase_order_item.py +28 -0
- ottimate_sdk-0.1.1/types/purchase_order_summary.py +48 -0
- ottimate_sdk-0.1.1/types/purchase_order_summary_status.py +7 -0
- ottimate_sdk-0.1.1/types/purchase_order_update_response.py +33 -0
- ottimate_sdk-0.1.1/types/purchase_order_update_response_status.py +7 -0
- ottimate_sdk-0.1.1/types/receipt_bulk_upsert_async_response.py +25 -0
- ottimate_sdk-0.1.1/types/receipt_bulk_upsert_async_response_summary.py +20 -0
- ottimate_sdk-0.1.1/types/receipt_create_response.py +29 -0
- ottimate_sdk-0.1.1/types/receipt_create_response_status.py +7 -0
- ottimate_sdk-0.1.1/types/receipt_detail.py +21 -0
- ottimate_sdk-0.1.1/types/receipt_detail_receipt.py +33 -0
- ottimate_sdk-0.1.1/types/receipt_detail_receipt_items_item.py +29 -0
- ottimate_sdk-0.1.1/types/receipt_detail_receipt_status.py +7 -0
- ottimate_sdk-0.1.1/types/receipt_item.py +29 -0
- ottimate_sdk-0.1.1/types/receipt_summary.py +28 -0
- ottimate_sdk-0.1.1/types/receipt_summary_status.py +7 -0
- ottimate_sdk-0.1.1/types/receipt_update_response.py +30 -0
- ottimate_sdk-0.1.1/types/receipt_update_response_status.py +7 -0
- ottimate_sdk-0.1.1/types/variance_list_response.py +23 -0
- ottimate_sdk-0.1.1/types/variance_list_response_results_item.py +34 -0
- ottimate_sdk-0.1.1/types/variance_list_response_results_item_last_invoice_item.py +23 -0
- ottimate_sdk-0.1.1/types/variance_object.py +63 -0
- ottimate_sdk-0.1.1/types/variance_object_invoice_items.py +42 -0
- ottimate_sdk-0.1.1/types/variance_object_invoice_items_data_item.py +26 -0
- ottimate_sdk-0.1.1/types/variance_object_last_invoice_item.py +27 -0
- ottimate_sdk-0.1.1/vendors/__init__.py +91 -0
- ottimate_sdk-0.1.1/vendors/client.py +554 -0
- ottimate_sdk-0.1.1/vendors/raw_client.py +631 -0
- ottimate_sdk-0.1.1/vendors/types/__init__.py +95 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_id_response.py +21 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_id_response_vendor.py +35 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_id_response_vendor_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_root_response.py +24 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_root_response_vendors_item.py +35 -0
- ottimate_sdk-0.1.1/vendors/types/get_vendors_root_response_vendors_item_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_request_vendors_item.py +81 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_request_vendors_item_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response.py +29 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response_created_item.py +36 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response_created_item_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response_errors_item.py +22 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response_updated_item.py +36 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_bulk_create_response_updated_item_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_root_request_payment_method.py +7 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_root_response.py +21 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_root_response_vendor.py +34 -0
- ottimate_sdk-0.1.1/vendors/types/post_vendors_root_response_vendor_payment_method.py +7 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ottimate-sdk
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Python SDK for the Ottimate API
|
|
5
|
+
Project-URL: Homepage, https://ottimate.com
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Requires-Dist: httpx==0.28.1
|
|
8
|
+
Requires-Dist: pydantic==2.12.5
|
|
9
|
+
Requires-Dist: certifi==2025.11.12
|
|
10
|
+
Requires-Dist: python-dotenv
|
|
@@ -0,0 +1,37 @@
|
|
|
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 GetAccountsIdCompaniesResponse, GetAccountsIdLocationsResponse
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
11
|
+
"GetAccountsIdCompaniesResponse": ".types",
|
|
12
|
+
"GetAccountsIdLocationsResponse": ".types",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
17
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
18
|
+
if module_name is None:
|
|
19
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
20
|
+
try:
|
|
21
|
+
module = import_module(module_name, __package__)
|
|
22
|
+
if module_name == f".{attr_name}":
|
|
23
|
+
return module
|
|
24
|
+
else:
|
|
25
|
+
return getattr(module, attr_name)
|
|
26
|
+
except ImportError as e:
|
|
27
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
28
|
+
except AttributeError as e:
|
|
29
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def __dir__():
|
|
33
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
34
|
+
return sorted(lazy_attrs)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
__all__ = ["GetAccountsIdCompaniesResponse", "GetAccountsIdLocationsResponse"]
|
|
@@ -0,0 +1,273 @@
|
|
|
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 .raw_client import AsyncRawAccountsClient, RawAccountsClient
|
|
8
|
+
from .types.get_accounts_id_companies_response import GetAccountsIdCompaniesResponse
|
|
9
|
+
from .types.get_accounts_id_locations_response import GetAccountsIdLocationsResponse
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AccountsClient:
|
|
13
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
14
|
+
self._raw_client = RawAccountsClient(client_wrapper=client_wrapper)
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def with_raw_response(self) -> RawAccountsClient:
|
|
18
|
+
"""
|
|
19
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
RawAccountsClient
|
|
24
|
+
"""
|
|
25
|
+
return self._raw_client
|
|
26
|
+
|
|
27
|
+
def get_accounts_id_companies(
|
|
28
|
+
self,
|
|
29
|
+
id: str,
|
|
30
|
+
*,
|
|
31
|
+
search: typing.Optional[str] = None,
|
|
32
|
+
limit: typing.Optional[int] = None,
|
|
33
|
+
page: typing.Optional[int] = None,
|
|
34
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
35
|
+
) -> GetAccountsIdCompaniesResponse:
|
|
36
|
+
"""
|
|
37
|
+
Returns a paginated list of companies associated with the specified account.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
id : str
|
|
42
|
+
Account ID
|
|
43
|
+
|
|
44
|
+
search : typing.Optional[str]
|
|
45
|
+
Search term for company name
|
|
46
|
+
|
|
47
|
+
limit : typing.Optional[int]
|
|
48
|
+
Number of items per page
|
|
49
|
+
|
|
50
|
+
page : typing.Optional[int]
|
|
51
|
+
Page number for pagination
|
|
52
|
+
|
|
53
|
+
request_options : typing.Optional[RequestOptions]
|
|
54
|
+
Request-specific configuration.
|
|
55
|
+
|
|
56
|
+
Returns
|
|
57
|
+
-------
|
|
58
|
+
GetAccountsIdCompaniesResponse
|
|
59
|
+
Successful response with paginated company list
|
|
60
|
+
|
|
61
|
+
Examples
|
|
62
|
+
--------
|
|
63
|
+
from ottimate import OttimateApi
|
|
64
|
+
|
|
65
|
+
client = OttimateApi(
|
|
66
|
+
api_key="YOUR_API_KEY",
|
|
67
|
+
api_version="YOUR_API_VERSION",
|
|
68
|
+
api_key="YOUR_API_KEY",
|
|
69
|
+
)
|
|
70
|
+
client.accounts.get_accounts_id_companies(
|
|
71
|
+
id="racc_90832490382904802384",
|
|
72
|
+
limit=50,
|
|
73
|
+
page=0,
|
|
74
|
+
)
|
|
75
|
+
"""
|
|
76
|
+
_response = self._raw_client.get_accounts_id_companies(
|
|
77
|
+
id, search=search, limit=limit, page=page, request_options=request_options
|
|
78
|
+
)
|
|
79
|
+
return _response.data
|
|
80
|
+
|
|
81
|
+
def get_accounts_id_locations(
|
|
82
|
+
self,
|
|
83
|
+
id: str,
|
|
84
|
+
*,
|
|
85
|
+
search: typing.Optional[str] = None,
|
|
86
|
+
limit: typing.Optional[int] = None,
|
|
87
|
+
page: typing.Optional[int] = None,
|
|
88
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
89
|
+
) -> GetAccountsIdLocationsResponse:
|
|
90
|
+
"""
|
|
91
|
+
Returns a paginated list of locations associated with the specified account.
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
id : str
|
|
96
|
+
Account ID
|
|
97
|
+
|
|
98
|
+
search : typing.Optional[str]
|
|
99
|
+
Search term for location name
|
|
100
|
+
|
|
101
|
+
limit : typing.Optional[int]
|
|
102
|
+
Number of items per page
|
|
103
|
+
|
|
104
|
+
page : typing.Optional[int]
|
|
105
|
+
Page number for pagination
|
|
106
|
+
|
|
107
|
+
request_options : typing.Optional[RequestOptions]
|
|
108
|
+
Request-specific configuration.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
GetAccountsIdLocationsResponse
|
|
113
|
+
Successful response with paginated location list
|
|
114
|
+
|
|
115
|
+
Examples
|
|
116
|
+
--------
|
|
117
|
+
from ottimate import OttimateApi
|
|
118
|
+
|
|
119
|
+
client = OttimateApi(
|
|
120
|
+
api_key="YOUR_API_KEY",
|
|
121
|
+
api_version="YOUR_API_VERSION",
|
|
122
|
+
api_key="YOUR_API_KEY",
|
|
123
|
+
)
|
|
124
|
+
client.accounts.get_accounts_id_locations(
|
|
125
|
+
id="racc_90832490382904802384",
|
|
126
|
+
limit=50,
|
|
127
|
+
page=0,
|
|
128
|
+
)
|
|
129
|
+
"""
|
|
130
|
+
_response = self._raw_client.get_accounts_id_locations(
|
|
131
|
+
id, search=search, limit=limit, page=page, request_options=request_options
|
|
132
|
+
)
|
|
133
|
+
return _response.data
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class AsyncAccountsClient:
|
|
137
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
138
|
+
self._raw_client = AsyncRawAccountsClient(client_wrapper=client_wrapper)
|
|
139
|
+
|
|
140
|
+
@property
|
|
141
|
+
def with_raw_response(self) -> AsyncRawAccountsClient:
|
|
142
|
+
"""
|
|
143
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
AsyncRawAccountsClient
|
|
148
|
+
"""
|
|
149
|
+
return self._raw_client
|
|
150
|
+
|
|
151
|
+
async def get_accounts_id_companies(
|
|
152
|
+
self,
|
|
153
|
+
id: str,
|
|
154
|
+
*,
|
|
155
|
+
search: typing.Optional[str] = None,
|
|
156
|
+
limit: typing.Optional[int] = None,
|
|
157
|
+
page: typing.Optional[int] = None,
|
|
158
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
159
|
+
) -> GetAccountsIdCompaniesResponse:
|
|
160
|
+
"""
|
|
161
|
+
Returns a paginated list of companies associated with the specified account.
|
|
162
|
+
|
|
163
|
+
Parameters
|
|
164
|
+
----------
|
|
165
|
+
id : str
|
|
166
|
+
Account ID
|
|
167
|
+
|
|
168
|
+
search : typing.Optional[str]
|
|
169
|
+
Search term for company name
|
|
170
|
+
|
|
171
|
+
limit : typing.Optional[int]
|
|
172
|
+
Number of items per page
|
|
173
|
+
|
|
174
|
+
page : typing.Optional[int]
|
|
175
|
+
Page number for pagination
|
|
176
|
+
|
|
177
|
+
request_options : typing.Optional[RequestOptions]
|
|
178
|
+
Request-specific configuration.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
GetAccountsIdCompaniesResponse
|
|
183
|
+
Successful response with paginated company list
|
|
184
|
+
|
|
185
|
+
Examples
|
|
186
|
+
--------
|
|
187
|
+
import asyncio
|
|
188
|
+
|
|
189
|
+
from ottimate import AsyncOttimateApi
|
|
190
|
+
|
|
191
|
+
client = AsyncOttimateApi(
|
|
192
|
+
api_key="YOUR_API_KEY",
|
|
193
|
+
api_version="YOUR_API_VERSION",
|
|
194
|
+
api_key="YOUR_API_KEY",
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
async def main() -> None:
|
|
199
|
+
await client.accounts.get_accounts_id_companies(
|
|
200
|
+
id="racc_90832490382904802384",
|
|
201
|
+
limit=50,
|
|
202
|
+
page=0,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
asyncio.run(main())
|
|
207
|
+
"""
|
|
208
|
+
_response = await self._raw_client.get_accounts_id_companies(
|
|
209
|
+
id, search=search, limit=limit, page=page, request_options=request_options
|
|
210
|
+
)
|
|
211
|
+
return _response.data
|
|
212
|
+
|
|
213
|
+
async def get_accounts_id_locations(
|
|
214
|
+
self,
|
|
215
|
+
id: str,
|
|
216
|
+
*,
|
|
217
|
+
search: typing.Optional[str] = None,
|
|
218
|
+
limit: typing.Optional[int] = None,
|
|
219
|
+
page: typing.Optional[int] = None,
|
|
220
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
221
|
+
) -> GetAccountsIdLocationsResponse:
|
|
222
|
+
"""
|
|
223
|
+
Returns a paginated list of locations associated with the specified account.
|
|
224
|
+
|
|
225
|
+
Parameters
|
|
226
|
+
----------
|
|
227
|
+
id : str
|
|
228
|
+
Account ID
|
|
229
|
+
|
|
230
|
+
search : typing.Optional[str]
|
|
231
|
+
Search term for location name
|
|
232
|
+
|
|
233
|
+
limit : typing.Optional[int]
|
|
234
|
+
Number of items per page
|
|
235
|
+
|
|
236
|
+
page : typing.Optional[int]
|
|
237
|
+
Page number for pagination
|
|
238
|
+
|
|
239
|
+
request_options : typing.Optional[RequestOptions]
|
|
240
|
+
Request-specific configuration.
|
|
241
|
+
|
|
242
|
+
Returns
|
|
243
|
+
-------
|
|
244
|
+
GetAccountsIdLocationsResponse
|
|
245
|
+
Successful response with paginated location list
|
|
246
|
+
|
|
247
|
+
Examples
|
|
248
|
+
--------
|
|
249
|
+
import asyncio
|
|
250
|
+
|
|
251
|
+
from ottimate import AsyncOttimateApi
|
|
252
|
+
|
|
253
|
+
client = AsyncOttimateApi(
|
|
254
|
+
api_key="YOUR_API_KEY",
|
|
255
|
+
api_version="YOUR_API_VERSION",
|
|
256
|
+
api_key="YOUR_API_KEY",
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
async def main() -> None:
|
|
261
|
+
await client.accounts.get_accounts_id_locations(
|
|
262
|
+
id="racc_90832490382904802384",
|
|
263
|
+
limit=50,
|
|
264
|
+
page=0,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
asyncio.run(main())
|
|
269
|
+
"""
|
|
270
|
+
_response = await self._raw_client.get_accounts_id_locations(
|
|
271
|
+
id, search=search, limit=limit, page=page, request_options=request_options
|
|
272
|
+
)
|
|
273
|
+
return _response.data
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.jsonable_encoder import jsonable_encoder
|
|
10
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
11
|
+
from ..core.request_options import RequestOptions
|
|
12
|
+
from .types.get_accounts_id_companies_response import GetAccountsIdCompaniesResponse
|
|
13
|
+
from .types.get_accounts_id_locations_response import GetAccountsIdLocationsResponse
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RawAccountsClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._client_wrapper = client_wrapper
|
|
19
|
+
|
|
20
|
+
def get_accounts_id_companies(
|
|
21
|
+
self,
|
|
22
|
+
id: str,
|
|
23
|
+
*,
|
|
24
|
+
search: typing.Optional[str] = None,
|
|
25
|
+
limit: typing.Optional[int] = None,
|
|
26
|
+
page: typing.Optional[int] = None,
|
|
27
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
28
|
+
) -> HttpResponse[GetAccountsIdCompaniesResponse]:
|
|
29
|
+
"""
|
|
30
|
+
Returns a paginated list of companies associated with the specified account.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
id : str
|
|
35
|
+
Account ID
|
|
36
|
+
|
|
37
|
+
search : typing.Optional[str]
|
|
38
|
+
Search term for company name
|
|
39
|
+
|
|
40
|
+
limit : typing.Optional[int]
|
|
41
|
+
Number of items per page
|
|
42
|
+
|
|
43
|
+
page : typing.Optional[int]
|
|
44
|
+
Page number for pagination
|
|
45
|
+
|
|
46
|
+
request_options : typing.Optional[RequestOptions]
|
|
47
|
+
Request-specific configuration.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
HttpResponse[GetAccountsIdCompaniesResponse]
|
|
52
|
+
Successful response with paginated company list
|
|
53
|
+
"""
|
|
54
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
55
|
+
f"accounts/{jsonable_encoder(id)}/companies",
|
|
56
|
+
method="GET",
|
|
57
|
+
params={
|
|
58
|
+
"search": search,
|
|
59
|
+
"limit": limit,
|
|
60
|
+
"page": page,
|
|
61
|
+
},
|
|
62
|
+
request_options=request_options,
|
|
63
|
+
)
|
|
64
|
+
try:
|
|
65
|
+
if 200 <= _response.status_code < 300:
|
|
66
|
+
_data = typing.cast(
|
|
67
|
+
GetAccountsIdCompaniesResponse,
|
|
68
|
+
parse_obj_as(
|
|
69
|
+
type_=GetAccountsIdCompaniesResponse, # type: ignore
|
|
70
|
+
object_=_response.json(),
|
|
71
|
+
),
|
|
72
|
+
)
|
|
73
|
+
return HttpResponse(response=_response, data=_data)
|
|
74
|
+
_response_json = _response.json()
|
|
75
|
+
except JSONDecodeError:
|
|
76
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
77
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
78
|
+
|
|
79
|
+
def get_accounts_id_locations(
|
|
80
|
+
self,
|
|
81
|
+
id: str,
|
|
82
|
+
*,
|
|
83
|
+
search: typing.Optional[str] = None,
|
|
84
|
+
limit: typing.Optional[int] = None,
|
|
85
|
+
page: typing.Optional[int] = None,
|
|
86
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
87
|
+
) -> HttpResponse[GetAccountsIdLocationsResponse]:
|
|
88
|
+
"""
|
|
89
|
+
Returns a paginated list of locations associated with the specified account.
|
|
90
|
+
|
|
91
|
+
Parameters
|
|
92
|
+
----------
|
|
93
|
+
id : str
|
|
94
|
+
Account ID
|
|
95
|
+
|
|
96
|
+
search : typing.Optional[str]
|
|
97
|
+
Search term for location name
|
|
98
|
+
|
|
99
|
+
limit : typing.Optional[int]
|
|
100
|
+
Number of items per page
|
|
101
|
+
|
|
102
|
+
page : typing.Optional[int]
|
|
103
|
+
Page number for pagination
|
|
104
|
+
|
|
105
|
+
request_options : typing.Optional[RequestOptions]
|
|
106
|
+
Request-specific configuration.
|
|
107
|
+
|
|
108
|
+
Returns
|
|
109
|
+
-------
|
|
110
|
+
HttpResponse[GetAccountsIdLocationsResponse]
|
|
111
|
+
Successful response with paginated location list
|
|
112
|
+
"""
|
|
113
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
114
|
+
f"accounts/{jsonable_encoder(id)}/locations",
|
|
115
|
+
method="GET",
|
|
116
|
+
params={
|
|
117
|
+
"search": search,
|
|
118
|
+
"limit": limit,
|
|
119
|
+
"page": page,
|
|
120
|
+
},
|
|
121
|
+
request_options=request_options,
|
|
122
|
+
)
|
|
123
|
+
try:
|
|
124
|
+
if 200 <= _response.status_code < 300:
|
|
125
|
+
_data = typing.cast(
|
|
126
|
+
GetAccountsIdLocationsResponse,
|
|
127
|
+
parse_obj_as(
|
|
128
|
+
type_=GetAccountsIdLocationsResponse, # type: ignore
|
|
129
|
+
object_=_response.json(),
|
|
130
|
+
),
|
|
131
|
+
)
|
|
132
|
+
return HttpResponse(response=_response, data=_data)
|
|
133
|
+
_response_json = _response.json()
|
|
134
|
+
except JSONDecodeError:
|
|
135
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
136
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncRawAccountsClient:
|
|
140
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
141
|
+
self._client_wrapper = client_wrapper
|
|
142
|
+
|
|
143
|
+
async def get_accounts_id_companies(
|
|
144
|
+
self,
|
|
145
|
+
id: str,
|
|
146
|
+
*,
|
|
147
|
+
search: typing.Optional[str] = None,
|
|
148
|
+
limit: typing.Optional[int] = None,
|
|
149
|
+
page: typing.Optional[int] = None,
|
|
150
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
151
|
+
) -> AsyncHttpResponse[GetAccountsIdCompaniesResponse]:
|
|
152
|
+
"""
|
|
153
|
+
Returns a paginated list of companies associated with the specified account.
|
|
154
|
+
|
|
155
|
+
Parameters
|
|
156
|
+
----------
|
|
157
|
+
id : str
|
|
158
|
+
Account ID
|
|
159
|
+
|
|
160
|
+
search : typing.Optional[str]
|
|
161
|
+
Search term for company name
|
|
162
|
+
|
|
163
|
+
limit : typing.Optional[int]
|
|
164
|
+
Number of items per page
|
|
165
|
+
|
|
166
|
+
page : typing.Optional[int]
|
|
167
|
+
Page number for pagination
|
|
168
|
+
|
|
169
|
+
request_options : typing.Optional[RequestOptions]
|
|
170
|
+
Request-specific configuration.
|
|
171
|
+
|
|
172
|
+
Returns
|
|
173
|
+
-------
|
|
174
|
+
AsyncHttpResponse[GetAccountsIdCompaniesResponse]
|
|
175
|
+
Successful response with paginated company list
|
|
176
|
+
"""
|
|
177
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
178
|
+
f"accounts/{jsonable_encoder(id)}/companies",
|
|
179
|
+
method="GET",
|
|
180
|
+
params={
|
|
181
|
+
"search": search,
|
|
182
|
+
"limit": limit,
|
|
183
|
+
"page": page,
|
|
184
|
+
},
|
|
185
|
+
request_options=request_options,
|
|
186
|
+
)
|
|
187
|
+
try:
|
|
188
|
+
if 200 <= _response.status_code < 300:
|
|
189
|
+
_data = typing.cast(
|
|
190
|
+
GetAccountsIdCompaniesResponse,
|
|
191
|
+
parse_obj_as(
|
|
192
|
+
type_=GetAccountsIdCompaniesResponse, # type: ignore
|
|
193
|
+
object_=_response.json(),
|
|
194
|
+
),
|
|
195
|
+
)
|
|
196
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
197
|
+
_response_json = _response.json()
|
|
198
|
+
except JSONDecodeError:
|
|
199
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
200
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
201
|
+
|
|
202
|
+
async def get_accounts_id_locations(
|
|
203
|
+
self,
|
|
204
|
+
id: str,
|
|
205
|
+
*,
|
|
206
|
+
search: typing.Optional[str] = None,
|
|
207
|
+
limit: typing.Optional[int] = None,
|
|
208
|
+
page: typing.Optional[int] = None,
|
|
209
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
210
|
+
) -> AsyncHttpResponse[GetAccountsIdLocationsResponse]:
|
|
211
|
+
"""
|
|
212
|
+
Returns a paginated list of locations associated with the specified account.
|
|
213
|
+
|
|
214
|
+
Parameters
|
|
215
|
+
----------
|
|
216
|
+
id : str
|
|
217
|
+
Account ID
|
|
218
|
+
|
|
219
|
+
search : typing.Optional[str]
|
|
220
|
+
Search term for location name
|
|
221
|
+
|
|
222
|
+
limit : typing.Optional[int]
|
|
223
|
+
Number of items per page
|
|
224
|
+
|
|
225
|
+
page : typing.Optional[int]
|
|
226
|
+
Page number for pagination
|
|
227
|
+
|
|
228
|
+
request_options : typing.Optional[RequestOptions]
|
|
229
|
+
Request-specific configuration.
|
|
230
|
+
|
|
231
|
+
Returns
|
|
232
|
+
-------
|
|
233
|
+
AsyncHttpResponse[GetAccountsIdLocationsResponse]
|
|
234
|
+
Successful response with paginated location list
|
|
235
|
+
"""
|
|
236
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
237
|
+
f"accounts/{jsonable_encoder(id)}/locations",
|
|
238
|
+
method="GET",
|
|
239
|
+
params={
|
|
240
|
+
"search": search,
|
|
241
|
+
"limit": limit,
|
|
242
|
+
"page": page,
|
|
243
|
+
},
|
|
244
|
+
request_options=request_options,
|
|
245
|
+
)
|
|
246
|
+
try:
|
|
247
|
+
if 200 <= _response.status_code < 300:
|
|
248
|
+
_data = typing.cast(
|
|
249
|
+
GetAccountsIdLocationsResponse,
|
|
250
|
+
parse_obj_as(
|
|
251
|
+
type_=GetAccountsIdLocationsResponse, # type: ignore
|
|
252
|
+
object_=_response.json(),
|
|
253
|
+
),
|
|
254
|
+
)
|
|
255
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
256
|
+
_response_json = _response.json()
|
|
257
|
+
except JSONDecodeError:
|
|
258
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
259
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -0,0 +1,38 @@
|
|
|
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 .get_accounts_id_companies_response import GetAccountsIdCompaniesResponse
|
|
10
|
+
from .get_accounts_id_locations_response import GetAccountsIdLocationsResponse
|
|
11
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
12
|
+
"GetAccountsIdCompaniesResponse": ".get_accounts_id_companies_response",
|
|
13
|
+
"GetAccountsIdLocationsResponse": ".get_accounts_id_locations_response",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
18
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
19
|
+
if module_name is None:
|
|
20
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
21
|
+
try:
|
|
22
|
+
module = import_module(module_name, __package__)
|
|
23
|
+
if module_name == f".{attr_name}":
|
|
24
|
+
return module
|
|
25
|
+
else:
|
|
26
|
+
return getattr(module, attr_name)
|
|
27
|
+
except ImportError as e:
|
|
28
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
29
|
+
except AttributeError as e:
|
|
30
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__():
|
|
34
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
35
|
+
return sorted(lazy_attrs)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
__all__ = ["GetAccountsIdCompaniesResponse", "GetAccountsIdLocationsResponse"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from ...types.company_object import CompanyObject
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GetAccountsIdCompaniesResponse(UniversalBaseModel):
|
|
11
|
+
count: typing.Optional[int] = None
|
|
12
|
+
page: typing.Optional[int] = None
|
|
13
|
+
limit: typing.Optional[int] = None
|
|
14
|
+
next: typing.Optional[str] = None
|
|
15
|
+
previous: typing.Optional[str] = None
|
|
16
|
+
results: typing.Optional[typing.List[CompanyObject]] = None
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from ...types.location_object import LocationObject
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GetAccountsIdLocationsResponse(UniversalBaseModel):
|
|
11
|
+
count: typing.Optional[int] = None
|
|
12
|
+
page: typing.Optional[int] = None
|
|
13
|
+
limit: typing.Optional[int] = None
|
|
14
|
+
next: typing.Optional[str] = None
|
|
15
|
+
previous: typing.Optional[str] = None
|
|
16
|
+
results: typing.Optional[typing.List[LocationObject]] = None
|
|
17
|
+
|
|
18
|
+
if IS_PYDANTIC_V2:
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|