qanswer-sdk 0.46.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (624) hide show
  1. qanswer_sdk/__init__.py +1268 -0
  2. qanswer_sdk/api/__init__.py +64 -0
  3. qanswer_sdk/api/admin_api.py +7383 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5879 -0
  5. qanswer_sdk/api/ai_assistant_api.py +8960 -0
  6. qanswer_sdk/api/auto_complete_api.py +612 -0
  7. qanswer_sdk/api/bot_slack_api.py +1069 -0
  8. qanswer_sdk/api/branding_api.py +5723 -0
  9. qanswer_sdk/api/chatbot_api.py +1102 -0
  10. qanswer_sdk/api/connector_audio_api.py +3264 -0
  11. qanswer_sdk/api/connector_document_api.py +1990 -0
  12. qanswer_sdk/api/connector_e_consilium_api.py +313 -0
  13. qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1164 -0
  14. qanswer_sdk/api/connector_google_drive_api.py +1896 -0
  15. qanswer_sdk/api/connector_imapapi_api.py +1775 -0
  16. qanswer_sdk/api/connector_one_drive_api.py +1579 -0
  17. qanswer_sdk/api/connector_onenote_api.py +1596 -0
  18. qanswer_sdk/api/connector_pinecone_api.py +893 -0
  19. qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
  20. qanswer_sdk/api/connector_qn_a_api.py +1521 -0
  21. qanswer_sdk/api/connector_rdf_answer_api.py +1393 -0
  22. qanswer_sdk/api/connector_rdf_api.py +5093 -0
  23. qanswer_sdk/api/connector_sharepoint_api.py +3445 -0
  24. qanswer_sdk/api/connector_websearch_api.py +332 -0
  25. qanswer_sdk/api/connector_website_api.py +2829 -0
  26. qanswer_sdk/api/connectors_api.py +6824 -0
  27. qanswer_sdk/api/connectors_data_api.py +5415 -0
  28. qanswer_sdk/api/conversation_logs_api.py +13159 -0
  29. qanswer_sdk/api/dataset_api.py +6487 -0
  30. qanswer_sdk/api/dataset_config_api.py +4643 -0
  31. qanswer_sdk/api/debug_api.py +278 -0
  32. qanswer_sdk/api/default_api.py +763 -0
  33. qanswer_sdk/api/embedder_endpoint_api.py +3330 -0
  34. qanswer_sdk/api/frontend_config_api.py +270 -0
  35. qanswer_sdk/api/health_check_api_api.py +278 -0
  36. qanswer_sdk/api/llm_endpoint_api.py +4660 -0
  37. qanswer_sdk/api/mcp_api.py +11201 -0
  38. qanswer_sdk/api/metadata_api.py +2070 -0
  39. qanswer_sdk/api/notifications_api.py +1841 -0
  40. qanswer_sdk/api/o_auth2_api.py +648 -0
  41. qanswer_sdk/api/payment_api.py +1852 -0
  42. qanswer_sdk/api/socket_api.py +4220 -0
  43. qanswer_sdk/api/speech_to_text_api.py +919 -0
  44. qanswer_sdk/api/task_ai_excel_api.py +7541 -0
  45. qanswer_sdk/api/task_chat_api.py +2598 -0
  46. qanswer_sdk/api/task_document_parsing_api.py +619 -0
  47. qanswer_sdk/api/task_entity_linking_api.py +315 -0
  48. qanswer_sdk/api/task_rdf_linker_api.py +4408 -0
  49. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3189 -0
  50. qanswer_sdk/api/task_rdf_text_linker_api.py +1452 -0
  51. qanswer_sdk/api/task_report_copilot_api.py +7010 -0
  52. qanswer_sdk/api/task_search_api.py +2012 -0
  53. qanswer_sdk/api/task_text2sparql_api.py +902 -0
  54. qanswer_sdk/api/task_text_classification_api.py +592 -0
  55. qanswer_sdk/api/tasks_api.py +318 -0
  56. qanswer_sdk/api/tool_embedder_api.py +5208 -0
  57. qanswer_sdk/api/tool_llm_api.py +6518 -0
  58. qanswer_sdk/api/unit_organizations_api.py +7086 -0
  59. qanswer_sdk/api/unit_teams_api.py +4255 -0
  60. qanswer_sdk/api/unit_user_api.py +11948 -0
  61. qanswer_sdk/api/v1_chat_completion_api.py +330 -0
  62. qanswer_sdk/api/v1_embeddings_api.py +297 -0
  63. qanswer_sdk/api_client.py +804 -0
  64. qanswer_sdk/api_response.py +21 -0
  65. qanswer_sdk/configuration.py +614 -0
  66. qanswer_sdk/exceptions.py +216 -0
  67. qanswer_sdk/models/__init__.py +567 -0
  68. qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
  69. qanswer_sdk/models/access_pdf_payload_model.py +111 -0
  70. qanswer_sdk/models/access_type.py +42 -0
  71. qanswer_sdk/models/access_type_shared.py +38 -0
  72. qanswer_sdk/models/add_qn_a_request.py +103 -0
  73. qanswer_sdk/models/add_synonyms.py +93 -0
  74. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  75. qanswer_sdk/models/admin_overall_stats_response.py +105 -0
  76. qanswer_sdk/models/admin_user_overall_stats.py +99 -0
  77. qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
  78. qanswer_sdk/models/aggregate.py +93 -0
  79. qanswer_sdk/models/aggregation.py +116 -0
  80. qanswer_sdk/models/aggregation_type.py +41 -0
  81. qanswer_sdk/models/aggregations_group.py +102 -0
  82. qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
  83. qanswer_sdk/models/ai_assistant_dto.py +122 -0
  84. qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
  85. qanswer_sdk/models/ai_assistant_list.py +101 -0
  86. qanswer_sdk/models/ai_assistant_share_response.py +93 -0
  87. qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
  88. qanswer_sdk/models/ai_excel_task_settings.py +125 -0
  89. qanswer_sdk/models/ai_excel_task_update.py +125 -0
  90. qanswer_sdk/models/ai_task_settings_update_payload.py +95 -0
  91. qanswer_sdk/models/ai_template_base_with_id.py +95 -0
  92. qanswer_sdk/models/ai_template_cell.py +113 -0
  93. qanswer_sdk/models/ai_template_cell_base.py +87 -0
  94. qanswer_sdk/models/ai_template_cell_update_payload.py +95 -0
  95. qanswer_sdk/models/ai_template_column.py +99 -0
  96. qanswer_sdk/models/ai_template_column_base.py +93 -0
  97. qanswer_sdk/models/ai_template_column_update_payload.py +109 -0
  98. qanswer_sdk/models/ai_template_column_with_cells.py +109 -0
  99. qanswer_sdk/models/ai_template_create_payload.py +128 -0
  100. qanswer_sdk/models/ai_template_row.py +93 -0
  101. qanswer_sdk/models/ai_template_row_base.py +87 -0
  102. qanswer_sdk/models/ai_template_row_update_payload.py +103 -0
  103. qanswer_sdk/models/ai_template_row_with_cells.py +103 -0
  104. qanswer_sdk/models/ai_template_with_cells.py +134 -0
  105. qanswer_sdk/models/ai_template_with_cells_new_column_id.py +136 -0
  106. qanswer_sdk/models/allowed_extension.py +53 -0
  107. qanswer_sdk/models/allowed_file_extensions.py +98 -0
  108. qanswer_sdk/models/api_key_header_type.py +38 -0
  109. qanswer_sdk/models/api_key_mcp_authentication_config.py +94 -0
  110. qanswer_sdk/models/applied_filter_type.py +37 -0
  111. qanswer_sdk/models/applied_metadata_filter.py +103 -0
  112. qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
  113. qanswer_sdk/models/assistant_category_color_definition.py +89 -0
  114. qanswer_sdk/models/assistant_category_color_item.py +89 -0
  115. qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
  116. qanswer_sdk/models/assistant_category_count.py +91 -0
  117. qanswer_sdk/models/assistant_message_stop.py +93 -0
  118. qanswer_sdk/models/assistant_task.py +43 -0
  119. qanswer_sdk/models/assistant_template.py +111 -0
  120. qanswer_sdk/models/assistant_template_filter_dto.py +120 -0
  121. qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +121 -0
  122. qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
  123. qanswer_sdk/models/audio_file_upload_payload.py +107 -0
  124. qanswer_sdk/models/audio_format.py +37 -0
  125. qanswer_sdk/models/audio_segment.py +95 -0
  126. qanswer_sdk/models/audio_segment_update_payload.py +97 -0
  127. qanswer_sdk/models/audio_segment_update_response.py +91 -0
  128. qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
  129. qanswer_sdk/models/audio_speaker_update_response.py +91 -0
  130. qanswer_sdk/models/audio_transcription_list_response.py +101 -0
  131. qanswer_sdk/models/audio_transcription_mode.py +37 -0
  132. qanswer_sdk/models/audio_transcription_record.py +101 -0
  133. qanswer_sdk/models/audio_upload_response.py +99 -0
  134. qanswer_sdk/models/audio_upload_transcription.py +99 -0
  135. qanswer_sdk/models/audio_word_segment.py +93 -0
  136. qanswer_sdk/models/audio_word_span_change.py +94 -0
  137. qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
  138. qanswer_sdk/models/audio_word_span_update_response.py +91 -0
  139. qanswer_sdk/models/audio_word_update_payload.py +100 -0
  140. qanswer_sdk/models/audio_word_update_response.py +91 -0
  141. qanswer_sdk/models/auth_link_response.py +91 -0
  142. qanswer_sdk/models/auto_bot_description_request.py +89 -0
  143. qanswer_sdk/models/auto_bot_description_response.py +87 -0
  144. qanswer_sdk/models/available_aggregation.py +98 -0
  145. qanswer_sdk/models/available_connectors_response.py +99 -0
  146. qanswer_sdk/models/available_embedding_models_response.py +95 -0
  147. qanswer_sdk/models/available_endpoints_response.py +95 -0
  148. qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
  149. qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
  150. qanswer_sdk/models/available_storage_preference.py +103 -0
  151. qanswer_sdk/models/base_connectors_response.py +89 -0
  152. qanswer_sdk/models/base_conversation_response.py +89 -0
  153. qanswer_sdk/models/base_feedback_response.py +89 -0
  154. qanswer_sdk/models/bot_answer_length.py +38 -0
  155. qanswer_sdk/models/branding_app_title.py +87 -0
  156. qanswer_sdk/models/branding_system_message.py +87 -0
  157. qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
  158. qanswer_sdk/models/capability_type.py +37 -0
  159. qanswer_sdk/models/cell.py +89 -0
  160. qanswer_sdk/models/change_password.py +89 -0
  161. qanswer_sdk/models/change_password_admin.py +89 -0
  162. qanswer_sdk/models/change_role.py +96 -0
  163. qanswer_sdk/models/chat_task_settings.py +141 -0
  164. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  165. qanswer_sdk/models/chat_task_update.py +139 -0
  166. qanswer_sdk/models/chatbot_chat_payload.py +148 -0
  167. qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
  168. qanswer_sdk/models/chatbot_llm_dto.py +147 -0
  169. qanswer_sdk/models/chatbot_response.py +151 -0
  170. qanswer_sdk/models/chatbot_setting_dto.py +99 -0
  171. qanswer_sdk/models/chatbot_setting_request.py +91 -0
  172. qanswer_sdk/models/class_info.py +89 -0
  173. qanswer_sdk/models/clone_dataset_request.py +104 -0
  174. qanswer_sdk/models/clone_dataset_response.py +91 -0
  175. qanswer_sdk/models/config.py +228 -0
  176. qanswer_sdk/models/config1.py +138 -0
  177. qanswer_sdk/models/connector_config_list_response.py +99 -0
  178. qanswer_sdk/models/connector_config_model.py +102 -0
  179. qanswer_sdk/models/connector_config_patch_payload.py +93 -0
  180. qanswer_sdk/models/connector_config_response.py +95 -0
  181. qanswer_sdk/models/connector_config_sync_response.py +93 -0
  182. qanswer_sdk/models/connector_config_type.py +37 -0
  183. qanswer_sdk/models/connector_model.py +118 -0
  184. qanswer_sdk/models/connector_type.py +50 -0
  185. qanswer_sdk/models/connector_type_dto.py +98 -0
  186. qanswer_sdk/models/connector_type_list_dto.py +95 -0
  187. qanswer_sdk/models/content_item.py +130 -0
  188. qanswer_sdk/models/content_item_type.py +39 -0
  189. qanswer_sdk/models/conversation_message.py +259 -0
  190. qanswer_sdk/models/conversation_message_error_key.py +52 -0
  191. qanswer_sdk/models/conversation_message_search_result.py +121 -0
  192. qanswer_sdk/models/conversation_model.py +169 -0
  193. qanswer_sdk/models/conversation_overall_stats.py +97 -0
  194. qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
  195. qanswer_sdk/models/conversation_retention_response.py +91 -0
  196. qanswer_sdk/models/conversation_statistics.py +95 -0
  197. qanswer_sdk/models/conversation_update.py +93 -0
  198. qanswer_sdk/models/conversation_users_stats.py +99 -0
  199. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  200. qanswer_sdk/models/coordinates.py +89 -0
  201. qanswer_sdk/models/cost_summary_dto.py +99 -0
  202. qanswer_sdk/models/create_connector_request.py +95 -0
  203. qanswer_sdk/models/create_connector_response.py +95 -0
  204. qanswer_sdk/models/create_dataset_request.py +145 -0
  205. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  206. qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
  207. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
  208. qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
  209. qanswer_sdk/models/credits_info_global_dto.py +97 -0
  210. qanswer_sdk/models/credits_info_organization_dto.py +95 -0
  211. qanswer_sdk/models/currency.py +38 -0
  212. qanswer_sdk/models/data_filling_mode.py +39 -0
  213. qanswer_sdk/models/data_storage_preference.py +38 -0
  214. qanswer_sdk/models/dataset_config_request.py +138 -0
  215. qanswer_sdk/models/dataset_default_values_model.py +138 -0
  216. qanswer_sdk/models/dataset_detail.py +137 -0
  217. qanswer_sdk/models/dataset_detail_kg.py +97 -0
  218. qanswer_sdk/models/dataset_schema.py +242 -0
  219. qanswer_sdk/models/dataset_size_response.py +91 -0
  220. qanswer_sdk/models/dataset_type.py +38 -0
  221. qanswer_sdk/models/dataset_update_object.py +216 -0
  222. qanswer_sdk/models/dataset_users_response.py +87 -0
  223. qanswer_sdk/models/default_prompt.py +106 -0
  224. qanswer_sdk/models/delete_connector_model.py +96 -0
  225. qanswer_sdk/models/delete_connector_request.py +99 -0
  226. qanswer_sdk/models/delete_connectors_response.py +89 -0
  227. qanswer_sdk/models/delete_files_status_response.py +91 -0
  228. qanswer_sdk/models/delete_index.py +91 -0
  229. qanswer_sdk/models/delete_index_resp.py +89 -0
  230. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  231. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  232. qanswer_sdk/models/delete_synonym.py +93 -0
  233. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  234. qanswer_sdk/models/delete_synonyms.py +91 -0
  235. qanswer_sdk/models/delete_user_response.py +89 -0
  236. qanswer_sdk/models/diarization_queue_status.py +99 -0
  237. qanswer_sdk/models/document_content_response.py +91 -0
  238. qanswer_sdk/models/document_content_update_model.py +99 -0
  239. qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
  240. qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
  241. qanswer_sdk/models/document_metadata.py +173 -0
  242. qanswer_sdk/models/document_metadata_list_wrapper.py +100 -0
  243. qanswer_sdk/models/document_parsing_task_settings.py +130 -0
  244. qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
  245. qanswer_sdk/models/document_parsing_task_update.py +127 -0
  246. qanswer_sdk/models/document_status_response.py +89 -0
  247. qanswer_sdk/models/dummy_error.py +89 -0
  248. qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
  249. qanswer_sdk/models/duplicate_report_template_response.py +87 -0
  250. qanswer_sdk/models/e_consilium_connector_config.py +108 -0
  251. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  252. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  253. qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
  254. qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
  255. qanswer_sdk/models/email_folder.py +91 -0
  256. qanswer_sdk/models/email_request.py +87 -0
  257. qanswer_sdk/models/embedder_cost_entry.py +91 -0
  258. qanswer_sdk/models/embedder_cost_filter.py +112 -0
  259. qanswer_sdk/models/embedder_cost_list.py +111 -0
  260. qanswer_sdk/models/embedder_create_dto.py +149 -0
  261. qanswer_sdk/models/embedder_detailed_dto.py +171 -0
  262. qanswer_sdk/models/embedder_dto.py +101 -0
  263. qanswer_sdk/models/embedder_list_dto.py +101 -0
  264. qanswer_sdk/models/embedder_update_dto.py +143 -0
  265. qanswer_sdk/models/embedding_endpoint.py +149 -0
  266. qanswer_sdk/models/embedding_endpoint_create.py +147 -0
  267. qanswer_sdk/models/embedding_endpoint_export_payload.py +87 -0
  268. qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
  269. qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
  270. qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
  271. qanswer_sdk/models/embedding_endpoint_names_validation_payload.py +87 -0
  272. qanswer_sdk/models/embedding_endpoint_update.py +141 -0
  273. qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
  274. qanswer_sdk/models/embedding_model.py +96 -0
  275. qanswer_sdk/models/embedding_provider.py +44 -0
  276. qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
  277. qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
  278. qanswer_sdk/models/endpoint_status.py +38 -0
  279. qanswer_sdk/models/entity_description.py +93 -0
  280. qanswer_sdk/models/entity_description_dto.py +93 -0
  281. qanswer_sdk/models/entity_linking_payload.py +97 -0
  282. qanswer_sdk/models/entity_linking_response.py +97 -0
  283. qanswer_sdk/models/entity_model_in_linking.py +95 -0
  284. qanswer_sdk/models/es_meta_data.py +98 -0
  285. qanswer_sdk/models/es_meta_data_value.py +87 -0
  286. qanswer_sdk/models/evaluate_feedback_response.py +109 -0
  287. qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
  288. qanswer_sdk/models/external_sources_quota_request.py +91 -0
  289. qanswer_sdk/models/external_sources_quota_response.py +89 -0
  290. qanswer_sdk/models/extra_body.py +91 -0
  291. qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
  292. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  293. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  294. qanswer_sdk/models/fact.py +96 -0
  295. qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
  296. qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
  297. qanswer_sdk/models/feedback_model.py +141 -0
  298. qanswer_sdk/models/feedback_response.py +95 -0
  299. qanswer_sdk/models/feedback_update.py +105 -0
  300. qanswer_sdk/models/file_es_meta_data.py +116 -0
  301. qanswer_sdk/models/file_failure_reason.py +48 -0
  302. qanswer_sdk/models/file_folder_model.py +115 -0
  303. qanswer_sdk/models/file_model.py +130 -0
  304. qanswer_sdk/models/file_status.py +43 -0
  305. qanswer_sdk/models/file_type.py +37 -0
  306. qanswer_sdk/models/file_upload_payload.py +107 -0
  307. qanswer_sdk/models/files_by_connector_model.py +89 -0
  308. qanswer_sdk/models/g_drive_connector_info.py +96 -0
  309. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  310. qanswer_sdk/models/g_drive_download_request.py +103 -0
  311. qanswer_sdk/models/generate_ai_cells_by_dimension_payload.py +91 -0
  312. qanswer_sdk/models/generate_ai_cells_payload.py +95 -0
  313. qanswer_sdk/models/generation_params.py +89 -0
  314. qanswer_sdk/models/get_aggregations_payload.py +104 -0
  315. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  316. qanswer_sdk/models/get_conversation_response.py +95 -0
  317. qanswer_sdk/models/global_config_dto.py +135 -0
  318. qanswer_sdk/models/google_drive_connector_config.py +110 -0
  319. qanswer_sdk/models/guardrail_endpoint.py +121 -0
  320. qanswer_sdk/models/guardrail_mode.py +38 -0
  321. qanswer_sdk/models/highlight_audio_payload_model.py +109 -0
  322. qanswer_sdk/models/http_validation_error.py +95 -0
  323. qanswer_sdk/models/iframe_strategy.py +38 -0
  324. qanswer_sdk/models/image_url_detail.py +38 -0
  325. qanswer_sdk/models/imap_add_payload.py +105 -0
  326. qanswer_sdk/models/imap_additional_fields.py +101 -0
  327. qanswer_sdk/models/imap_file_metadata.py +114 -0
  328. qanswer_sdk/models/imap_search_response.py +113 -0
  329. qanswer_sdk/models/index_config.py +89 -0
  330. qanswer_sdk/models/install_response.py +89 -0
  331. qanswer_sdk/models/interface_origin.py +48 -0
  332. qanswer_sdk/models/ip2_geo_response.py +91 -0
  333. qanswer_sdk/models/is_enabled_response.py +87 -0
  334. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  335. qanswer_sdk/models/label.py +89 -0
  336. qanswer_sdk/models/labeled_node.py +89 -0
  337. qanswer_sdk/models/language.py +42 -0
  338. qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
  339. qanswer_sdk/models/link.py +99 -0
  340. qanswer_sdk/models/link_extraction_response.py +97 -0
  341. qanswer_sdk/models/link_result_paginated.py +97 -0
  342. qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
  343. qanswer_sdk/models/linker.py +103 -0
  344. qanswer_sdk/models/linking_result_input.py +95 -0
  345. qanswer_sdk/models/linking_result_output.py +95 -0
  346. qanswer_sdk/models/links.py +99 -0
  347. qanswer_sdk/models/list_ai_templates_response.py +101 -0
  348. qanswer_sdk/models/list_connectors_response.py +95 -0
  349. qanswer_sdk/models/list_conversation_response.py +105 -0
  350. qanswer_sdk/models/list_feedback_response.py +105 -0
  351. qanswer_sdk/models/list_files_connector_response.py +107 -0
  352. qanswer_sdk/models/list_published_assistants_payload.py +115 -0
  353. qanswer_sdk/models/list_socket_events.py +95 -0
  354. qanswer_sdk/models/list_synonyms_model.py +95 -0
  355. qanswer_sdk/models/llm_context_ranges.py +93 -0
  356. qanswer_sdk/models/llm_context_ranges_response.py +93 -0
  357. qanswer_sdk/models/llm_cost_entry.py +97 -0
  358. qanswer_sdk/models/llm_cost_filter.py +112 -0
  359. qanswer_sdk/models/llm_cost_list.py +111 -0
  360. qanswer_sdk/models/llm_create_dto.py +208 -0
  361. qanswer_sdk/models/llm_detailed_dto.py +231 -0
  362. qanswer_sdk/models/llm_details.py +123 -0
  363. qanswer_sdk/models/llm_dto.py +147 -0
  364. qanswer_sdk/models/llm_endpoint.py +212 -0
  365. qanswer_sdk/models/llm_endpoint_create.py +204 -0
  366. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  367. qanswer_sdk/models/llm_endpoint_export_payload.py +87 -0
  368. qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
  369. qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
  370. qanswer_sdk/models/llm_endpoint_input.py +212 -0
  371. qanswer_sdk/models/llm_endpoint_modality.py +37 -0
  372. qanswer_sdk/models/llm_endpoint_names_validation_payload.py +87 -0
  373. qanswer_sdk/models/llm_endpoint_provider.py +44 -0
  374. qanswer_sdk/models/llm_endpoint_read_input.py +212 -0
  375. qanswer_sdk/models/llm_endpoint_read_output.py +212 -0
  376. qanswer_sdk/models/llm_endpoint_update.py +204 -0
  377. qanswer_sdk/models/llm_endpoint_usage_migration_response.py +93 -0
  378. qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
  379. qanswer_sdk/models/llm_filter_dto.py +111 -0
  380. qanswer_sdk/models/llm_health_response.py +89 -0
  381. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  382. qanswer_sdk/models/llm_list_dto.py +101 -0
  383. qanswer_sdk/models/llm_update_dto.py +208 -0
  384. qanswer_sdk/models/llm_usage_origin.py +63 -0
  385. qanswer_sdk/models/location_details.py +97 -0
  386. qanswer_sdk/models/log_request.py +125 -0
  387. qanswer_sdk/models/login_request.py +89 -0
  388. qanswer_sdk/models/logs_visibility_policy.py +38 -0
  389. qanswer_sdk/models/logs_visibility_policy_payload.py +98 -0
  390. qanswer_sdk/models/logs_visibility_policy_response.py +98 -0
  391. qanswer_sdk/models/mcp_authentication_type.py +39 -0
  392. qanswer_sdk/models/mcp_connection.py +105 -0
  393. qanswer_sdk/models/mcp_connection_create.py +98 -0
  394. qanswer_sdk/models/mcp_server.py +167 -0
  395. qanswer_sdk/models/mcp_server0.py +167 -0
  396. qanswer_sdk/models/mcp_server_create.py +133 -0
  397. qanswer_sdk/models/mcp_server_dto.py +167 -0
  398. qanswer_sdk/models/mcp_server_type.py +37 -0
  399. qanswer_sdk/models/mcp_server_update.py +131 -0
  400. qanswer_sdk/models/mcp_tool_dto.py +141 -0
  401. qanswer_sdk/models/mcp_tool_info.py +95 -0
  402. qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
  403. qanswer_sdk/models/mcp_tool_update.py +91 -0
  404. qanswer_sdk/models/mcp_transport.py +37 -0
  405. qanswer_sdk/models/mcp_visibility.py +38 -0
  406. qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
  407. qanswer_sdk/models/message_role.py +38 -0
  408. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  409. qanswer_sdk/models/microsoft_connector_config.py +110 -0
  410. qanswer_sdk/models/modify_connector_request.py +107 -0
  411. qanswer_sdk/models/modify_file_display_name_request.py +97 -0
  412. qanswer_sdk/models/notification_dto.py +137 -0
  413. qanswer_sdk/models/notification_filter.py +116 -0
  414. qanswer_sdk/models/notification_list_dto.py +101 -0
  415. qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
  416. qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
  417. qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +109 -0
  418. qanswer_sdk/models/notification_payload_conversation_shared_dto.py +105 -0
  419. qanswer_sdk/models/notification_payload_dto.py +193 -0
  420. qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
  421. qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
  422. qanswer_sdk/models/notification_read_dto.py +89 -0
  423. qanswer_sdk/models/notification_type.py +44 -0
  424. qanswer_sdk/models/o_auth_redirect_response.py +89 -0
  425. qanswer_sdk/models/o_auth_service_dto.py +89 -0
  426. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  427. qanswer_sdk/models/one_drive_download_request.py +103 -0
  428. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  429. qanswer_sdk/models/one_note_download_request.py +103 -0
  430. qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
  431. qanswer_sdk/models/organization.py +93 -0
  432. qanswer_sdk/models/organization_creation.py +91 -0
  433. qanswer_sdk/models/organization_dto.py +93 -0
  434. qanswer_sdk/models/organization_filter_dto.py +134 -0
  435. qanswer_sdk/models/organization_list_dto.py +101 -0
  436. qanswer_sdk/models/paginated_report_templates.py +101 -0
  437. qanswer_sdk/models/password.py +89 -0
  438. qanswer_sdk/models/pinecone_index_model.py +91 -0
  439. qanswer_sdk/models/plan_dto.py +132 -0
  440. qanswer_sdk/models/predicted_class.py +89 -0
  441. qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
  442. qanswer_sdk/models/prepared_synonym_group.py +87 -0
  443. qanswer_sdk/models/pricing_plan.py +51 -0
  444. qanswer_sdk/models/pricing_type.py +38 -0
  445. qanswer_sdk/models/prompt_type.py +51 -0
  446. qanswer_sdk/models/provider.py +87 -0
  447. qanswer_sdk/models/publication_add_payload.py +105 -0
  448. qanswer_sdk/models/publication_file_metadata.py +105 -0
  449. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  450. qanswer_sdk/models/publication_office_connector_config.py +110 -0
  451. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  452. qanswer_sdk/models/published_assistant_from_java.py +94 -0
  453. qanswer_sdk/models/put_cell_payload.py +89 -0
  454. qanswer_sdk/models/qa_context.py +129 -0
  455. qanswer_sdk/models/qa_context_display_type.py +44 -0
  456. qanswer_sdk/models/qa_contexts.py +116 -0
  457. qanswer_sdk/models/qa_table.py +100 -0
  458. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  459. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  460. qanswer_sdk/models/question_suggestion_response.py +87 -0
  461. qanswer_sdk/models/rag_params.py +89 -0
  462. qanswer_sdk/models/rag_payload.py +186 -0
  463. qanswer_sdk/models/rag_response.py +155 -0
  464. qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
  465. qanswer_sdk/models/rdf_linked_entity.py +97 -0
  466. qanswer_sdk/models/reasoning_effort.py +39 -0
  467. qanswer_sdk/models/reference_model.py +99 -0
  468. qanswer_sdk/models/refresh_frequency.py +39 -0
  469. qanswer_sdk/models/refresh_token_request.py +87 -0
  470. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  471. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  472. qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
  473. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  474. qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
  475. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  476. qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
  477. qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
  478. qanswer_sdk/models/report_copilot_slot_task_settings.py +127 -0
  479. qanswer_sdk/models/report_copilot_slot_task_settings_update.py +127 -0
  480. qanswer_sdk/models/report_copilot_task_settings.py +125 -0
  481. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  482. qanswer_sdk/models/report_copilot_task_update.py +125 -0
  483. qanswer_sdk/models/report_template.py +139 -0
  484. qanswer_sdk/models/report_template_create_payload.py +117 -0
  485. qanswer_sdk/models/report_template_image_upload_response.py +87 -0
  486. qanswer_sdk/models/report_template_simplified.py +115 -0
  487. qanswer_sdk/models/report_template_simplified_payload.py +91 -0
  488. qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
  489. qanswer_sdk/models/report_template_update_payload.py +121 -0
  490. qanswer_sdk/models/report_templates_search_payload.py +106 -0
  491. qanswer_sdk/models/reset_password.py +87 -0
  492. qanswer_sdk/models/response_audit_model.py +99 -0
  493. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  494. qanswer_sdk/models/response_get_dummy_union_connector_config_model_backend_api_connectors_config_dummy_models_union_get.py +228 -0
  495. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  496. qanswer_sdk/models/retry_params.py +89 -0
  497. qanswer_sdk/models/return_type.py +38 -0
  498. qanswer_sdk/models/role.py +99 -0
  499. qanswer_sdk/models/role_name.py +37 -0
  500. qanswer_sdk/models/scrolling_strategy.py +37 -0
  501. qanswer_sdk/models/search_conversation_messages_response.py +105 -0
  502. qanswer_sdk/models/search_document_response.py +105 -0
  503. qanswer_sdk/models/search_index_payload.py +114 -0
  504. qanswer_sdk/models/search_metadata_filter.py +94 -0
  505. qanswer_sdk/models/search_payload.py +146 -0
  506. qanswer_sdk/models/search_response.py +125 -0
  507. qanswer_sdk/models/search_synonyms_resp.py +91 -0
  508. qanswer_sdk/models/search_task_settings.py +139 -0
  509. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  510. qanswer_sdk/models/search_task_update.py +137 -0
  511. qanswer_sdk/models/sender_type.py +38 -0
  512. qanswer_sdk/models/share_point_connector_settings.py +94 -0
  513. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  514. qanswer_sdk/models/share_point_download_request.py +103 -0
  515. qanswer_sdk/models/shared_by.py +38 -0
  516. qanswer_sdk/models/shared_entity_type.py +38 -0
  517. qanswer_sdk/models/shared_organization_access.py +125 -0
  518. qanswer_sdk/models/shared_organization_access_dto.py +125 -0
  519. qanswer_sdk/models/shared_team_access.py +125 -0
  520. qanswer_sdk/models/shared_team_access_dto.py +125 -0
  521. qanswer_sdk/models/shared_user.py +99 -0
  522. qanswer_sdk/models/sign_up_request.py +108 -0
  523. qanswer_sdk/models/signout_request.py +87 -0
  524. qanswer_sdk/models/slot.py +162 -0
  525. qanswer_sdk/models/slot_history_entry.py +127 -0
  526. qanswer_sdk/models/slot_in_prompt.py +91 -0
  527. qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
  528. qanswer_sdk/models/slot_update.py +142 -0
  529. qanswer_sdk/models/socker_join_user.py +91 -0
  530. qanswer_sdk/models/socket_ai_cell_generation.py +99 -0
  531. qanswer_sdk/models/socket_conversation_message.py +280 -0
  532. qanswer_sdk/models/socket_events_q_answer.py +51 -0
  533. qanswer_sdk/models/socket_feedback_evaluation_progress.py +114 -0
  534. qanswer_sdk/models/socket_file_metadata.py +207 -0
  535. qanswer_sdk/models/socket_join_conversation.py +97 -0
  536. qanswer_sdk/models/socket_join_dataset.py +93 -0
  537. qanswer_sdk/models/socket_message_status.py +40 -0
  538. qanswer_sdk/models/socket_notification.py +127 -0
  539. qanswer_sdk/models/socket_report_continuation_response.py +106 -0
  540. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +122 -0
  541. qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +122 -0
  542. qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
  543. qanswer_sdk/models/socket_speech2_text_response.py +131 -0
  544. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  545. qanswer_sdk/models/source.py +125 -0
  546. qanswer_sdk/models/source_metadata.py +109 -0
  547. qanswer_sdk/models/speech2_text_response.py +119 -0
  548. qanswer_sdk/models/stat_per_date.py +89 -0
  549. qanswer_sdk/models/status_response.py +89 -0
  550. qanswer_sdk/models/stop_template_generation_payload.py +91 -0
  551. qanswer_sdk/models/storage_active_status.py +37 -0
  552. qanswer_sdk/models/subscription_response.py +101 -0
  553. qanswer_sdk/models/subscription_status.py +39 -0
  554. qanswer_sdk/models/suggestion_list_response.py +87 -0
  555. qanswer_sdk/models/summa_server.py +101 -0
  556. qanswer_sdk/models/task_category.py +58 -0
  557. qanswer_sdk/models/task_name.py +43 -0
  558. qanswer_sdk/models/team.py +93 -0
  559. qanswer_sdk/models/team_creation.py +89 -0
  560. qanswer_sdk/models/team_creation_dto.py +89 -0
  561. qanswer_sdk/models/team_dto.py +93 -0
  562. qanswer_sdk/models/team_filter_dto.py +141 -0
  563. qanswer_sdk/models/team_list_dto.py +101 -0
  564. qanswer_sdk/models/template_clip_structure.py +114 -0
  565. qanswer_sdk/models/template_toggle_request.py +93 -0
  566. qanswer_sdk/models/terms_bucket.py +94 -0
  567. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  568. qanswer_sdk/models/text2_sparql_payload.py +188 -0
  569. qanswer_sdk/models/text2_sparql_task_settings.py +125 -0
  570. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  571. qanswer_sdk/models/text2_sparql_task_update.py +125 -0
  572. qanswer_sdk/models/text_classification_payload.py +99 -0
  573. qanswer_sdk/models/text_classification_response.py +87 -0
  574. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  575. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  576. qanswer_sdk/models/thinking_block.py +91 -0
  577. qanswer_sdk/models/tool_selection.py +89 -0
  578. qanswer_sdk/models/total_stat.py +96 -0
  579. qanswer_sdk/models/ui_mappings.py +141 -0
  580. qanswer_sdk/models/update_cells_payload.py +93 -0
  581. qanswer_sdk/models/update_file_es_meta_data.py +116 -0
  582. qanswer_sdk/models/update_metadata_model_input.py +97 -0
  583. qanswer_sdk/models/update_metadata_model_output.py +97 -0
  584. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  585. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  586. qanswer_sdk/models/update_synonyms.py +95 -0
  587. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  588. qanswer_sdk/models/update_template_cells_payload.py +101 -0
  589. qanswer_sdk/models/upload_metadata.py +115 -0
  590. qanswer_sdk/models/user.py +91 -0
  591. qanswer_sdk/models/user_credits_config_dto.py +99 -0
  592. qanswer_sdk/models/user_credits_dto.py +106 -0
  593. qanswer_sdk/models/user_dataset_api_key.py +120 -0
  594. qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
  595. qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +102 -0
  596. qanswer_sdk/models/user_dto.py +91 -0
  597. qanswer_sdk/models/user_filter_dto.py +155 -0
  598. qanswer_sdk/models/user_identity_availability.py +87 -0
  599. qanswer_sdk/models/user_info_dto.py +95 -0
  600. qanswer_sdk/models/user_list_dto.py +101 -0
  601. qanswer_sdk/models/user_log.py +102 -0
  602. qanswer_sdk/models/user_log_dto.py +102 -0
  603. qanswer_sdk/models/user_logs_list_dto.py +97 -0
  604. qanswer_sdk/models/user_mcp_tool_selection_dto.py +118 -0
  605. qanswer_sdk/models/user_oauth_token.py +96 -0
  606. qanswer_sdk/models/user_oauth_token_dto.py +96 -0
  607. qanswer_sdk/models/user_profile_dto.py +200 -0
  608. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  609. qanswer_sdk/models/user_stat_per_date.py +90 -0
  610. qanswer_sdk/models/validation_error.py +108 -0
  611. qanswer_sdk/models/validation_error_loc_inner.py +138 -0
  612. qanswer_sdk/models/warn_visibility.py +40 -0
  613. qanswer_sdk/models/websearch_connector_config.py +102 -0
  614. qanswer_sdk/models/websearch_scraping_site.py +91 -0
  615. qanswer_sdk/models/website_add_payload.py +102 -0
  616. qanswer_sdk/models/website_connector_config.py +102 -0
  617. qanswer_sdk/models/website_connector_settings.py +160 -0
  618. qanswer_sdk/models/widget_configs.py +109 -0
  619. qanswer_sdk/py.typed +0 -0
  620. qanswer_sdk/rest.py +258 -0
  621. qanswer_sdk-0.46.0.dev0.dist-info/METADATA +252 -0
  622. qanswer_sdk-0.46.0.dev0.dist-info/RECORD +624 -0
  623. qanswer_sdk-0.46.0.dev0.dist-info/WHEEL +5 -0
  624. qanswer_sdk-0.46.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1852 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ free-text-client
5
+
6
+ QAnswer 2.0 API
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import StrictBool, StrictInt, StrictStr, field_validator
20
+ from typing import Any, List, Optional
21
+ from qanswer_sdk.models.plan_dto import PlanDto
22
+ from qanswer_sdk.models.subscription_response import SubscriptionResponse
23
+
24
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
25
+ from qanswer_sdk.api_response import ApiResponse
26
+ from qanswer_sdk.rest import RESTResponseType
27
+
28
+
29
+ class PaymentApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def checkout_branding(
44
+ self,
45
+ enabled: Optional[StrictBool] = None,
46
+ currency: Optional[StrictStr] = None,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> str:
60
+ """Create a stripe checkout to add remove branding feature
61
+
62
+ Creates a Stripe checkout session for remove branding feature.
63
+
64
+ :param enabled:
65
+ :type enabled: bool
66
+ :param currency:
67
+ :type currency: str
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._checkout_branding_serialize(
91
+ enabled=enabled,
92
+ currency=currency,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "str",
101
+ '422': "HTTPValidationError",
102
+ }
103
+ response_data = self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ def checkout_branding_with_http_info(
116
+ self,
117
+ enabled: Optional[StrictBool] = None,
118
+ currency: Optional[StrictStr] = None,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[str]:
132
+ """Create a stripe checkout to add remove branding feature
133
+
134
+ Creates a Stripe checkout session for remove branding feature.
135
+
136
+ :param enabled:
137
+ :type enabled: bool
138
+ :param currency:
139
+ :type currency: str
140
+ :param _request_timeout: timeout setting for this request. If one
141
+ number provided, it will be total request
142
+ timeout. It can also be a pair (tuple) of
143
+ (connection, read) timeouts.
144
+ :type _request_timeout: int, tuple(int, int), optional
145
+ :param _request_auth: set to override the auth_settings for an a single
146
+ request; this effectively ignores the
147
+ authentication in the spec for a single request.
148
+ :type _request_auth: dict, optional
149
+ :param _content_type: force content-type for the request.
150
+ :type _content_type: str, Optional
151
+ :param _headers: set to override the headers for a single
152
+ request; this effectively ignores the headers
153
+ in the spec for a single request.
154
+ :type _headers: dict, optional
155
+ :param _host_index: set to override the host_index for a single
156
+ request; this effectively ignores the host_index
157
+ in the spec for a single request.
158
+ :type _host_index: int, optional
159
+ :return: Returns the result object.
160
+ """ # noqa: E501
161
+
162
+ _param = self._checkout_branding_serialize(
163
+ enabled=enabled,
164
+ currency=currency,
165
+ _request_auth=_request_auth,
166
+ _content_type=_content_type,
167
+ _headers=_headers,
168
+ _host_index=_host_index
169
+ )
170
+
171
+ _response_types_map: Dict[str, Optional[str]] = {
172
+ '200': "str",
173
+ '422': "HTTPValidationError",
174
+ }
175
+ response_data = self.api_client.call_api(
176
+ *_param,
177
+ _request_timeout=_request_timeout
178
+ )
179
+ response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+
186
+ @validate_call
187
+ def checkout_branding_without_preload_content(
188
+ self,
189
+ enabled: Optional[StrictBool] = None,
190
+ currency: Optional[StrictStr] = None,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Annotated[StrictFloat, Field(gt=0)]
197
+ ]
198
+ ] = None,
199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
200
+ _content_type: Optional[StrictStr] = None,
201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
203
+ ) -> RESTResponseType:
204
+ """Create a stripe checkout to add remove branding feature
205
+
206
+ Creates a Stripe checkout session for remove branding feature.
207
+
208
+ :param enabled:
209
+ :type enabled: bool
210
+ :param currency:
211
+ :type currency: str
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._checkout_branding_serialize(
235
+ enabled=enabled,
236
+ currency=currency,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "str",
245
+ '422': "HTTPValidationError",
246
+ }
247
+ response_data = self.api_client.call_api(
248
+ *_param,
249
+ _request_timeout=_request_timeout
250
+ )
251
+ return response_data.response
252
+
253
+
254
+ def _checkout_branding_serialize(
255
+ self,
256
+ enabled,
257
+ currency,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> RequestSerialized:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ # process the query parameters
280
+ if enabled is not None:
281
+
282
+ _query_params.append(('enabled', enabled))
283
+
284
+ if currency is not None:
285
+
286
+ _query_params.append(('currency', currency))
287
+
288
+ # process the header parameters
289
+ # process the form parameters
290
+ # process the body parameter
291
+
292
+
293
+ # set the HTTP header `Accept`
294
+ if 'Accept' not in _header_params:
295
+ _header_params['Accept'] = self.api_client.select_header_accept(
296
+ [
297
+ 'application/json'
298
+ ]
299
+ )
300
+
301
+
302
+ # authentication setting
303
+ _auth_settings: List[str] = [
304
+ 'QAnswer-Api-Key',
305
+ 'Bearer token'
306
+ ]
307
+
308
+ return self.api_client.param_serialize(
309
+ method='POST',
310
+ resource_path='/backend/api/payment/checkout-branding',
311
+ path_params=_path_params,
312
+ query_params=_query_params,
313
+ header_params=_header_params,
314
+ body=_body_params,
315
+ post_params=_form_params,
316
+ files=_files,
317
+ auth_settings=_auth_settings,
318
+ collection_formats=_collection_formats,
319
+ _host=_host,
320
+ _request_auth=_request_auth
321
+ )
322
+
323
+
324
+
325
+
326
+ @validate_call
327
+ def create_checkout_link(
328
+ self,
329
+ pricing_plan: StrictStr,
330
+ _request_timeout: Union[
331
+ None,
332
+ Annotated[StrictFloat, Field(gt=0)],
333
+ Tuple[
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Annotated[StrictFloat, Field(gt=0)]
336
+ ]
337
+ ] = None,
338
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
339
+ _content_type: Optional[StrictStr] = None,
340
+ _headers: Optional[Dict[StrictStr, Any]] = None,
341
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
342
+ ) -> SubscriptionResponse:
343
+ """Create a stripe checkout to make a payment
344
+
345
+ Creates a Stripe checkout session for plan changes.
346
+
347
+ :param pricing_plan: (required)
348
+ :type pricing_plan: str
349
+ :param _request_timeout: timeout setting for this request. If one
350
+ number provided, it will be total request
351
+ timeout. It can also be a pair (tuple) of
352
+ (connection, read) timeouts.
353
+ :type _request_timeout: int, tuple(int, int), optional
354
+ :param _request_auth: set to override the auth_settings for an a single
355
+ request; this effectively ignores the
356
+ authentication in the spec for a single request.
357
+ :type _request_auth: dict, optional
358
+ :param _content_type: force content-type for the request.
359
+ :type _content_type: str, Optional
360
+ :param _headers: set to override the headers for a single
361
+ request; this effectively ignores the headers
362
+ in the spec for a single request.
363
+ :type _headers: dict, optional
364
+ :param _host_index: set to override the host_index for a single
365
+ request; this effectively ignores the host_index
366
+ in the spec for a single request.
367
+ :type _host_index: int, optional
368
+ :return: Returns the result object.
369
+ """ # noqa: E501
370
+
371
+ _param = self._create_checkout_link_serialize(
372
+ pricing_plan=pricing_plan,
373
+ _request_auth=_request_auth,
374
+ _content_type=_content_type,
375
+ _headers=_headers,
376
+ _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ '200': "SubscriptionResponse",
381
+ '422': "HTTPValidationError",
382
+ }
383
+ response_data = self.api_client.call_api(
384
+ *_param,
385
+ _request_timeout=_request_timeout
386
+ )
387
+ response_data.read()
388
+ return self.api_client.response_deserialize(
389
+ response_data=response_data,
390
+ response_types_map=_response_types_map,
391
+ ).data
392
+
393
+
394
+ @validate_call
395
+ def create_checkout_link_with_http_info(
396
+ self,
397
+ pricing_plan: StrictStr,
398
+ _request_timeout: Union[
399
+ None,
400
+ Annotated[StrictFloat, Field(gt=0)],
401
+ Tuple[
402
+ Annotated[StrictFloat, Field(gt=0)],
403
+ Annotated[StrictFloat, Field(gt=0)]
404
+ ]
405
+ ] = None,
406
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
407
+ _content_type: Optional[StrictStr] = None,
408
+ _headers: Optional[Dict[StrictStr, Any]] = None,
409
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
410
+ ) -> ApiResponse[SubscriptionResponse]:
411
+ """Create a stripe checkout to make a payment
412
+
413
+ Creates a Stripe checkout session for plan changes.
414
+
415
+ :param pricing_plan: (required)
416
+ :type pricing_plan: str
417
+ :param _request_timeout: timeout setting for this request. If one
418
+ number provided, it will be total request
419
+ timeout. It can also be a pair (tuple) of
420
+ (connection, read) timeouts.
421
+ :type _request_timeout: int, tuple(int, int), optional
422
+ :param _request_auth: set to override the auth_settings for an a single
423
+ request; this effectively ignores the
424
+ authentication in the spec for a single request.
425
+ :type _request_auth: dict, optional
426
+ :param _content_type: force content-type for the request.
427
+ :type _content_type: str, Optional
428
+ :param _headers: set to override the headers for a single
429
+ request; this effectively ignores the headers
430
+ in the spec for a single request.
431
+ :type _headers: dict, optional
432
+ :param _host_index: set to override the host_index for a single
433
+ request; this effectively ignores the host_index
434
+ in the spec for a single request.
435
+ :type _host_index: int, optional
436
+ :return: Returns the result object.
437
+ """ # noqa: E501
438
+
439
+ _param = self._create_checkout_link_serialize(
440
+ pricing_plan=pricing_plan,
441
+ _request_auth=_request_auth,
442
+ _content_type=_content_type,
443
+ _headers=_headers,
444
+ _host_index=_host_index
445
+ )
446
+
447
+ _response_types_map: Dict[str, Optional[str]] = {
448
+ '200': "SubscriptionResponse",
449
+ '422': "HTTPValidationError",
450
+ }
451
+ response_data = self.api_client.call_api(
452
+ *_param,
453
+ _request_timeout=_request_timeout
454
+ )
455
+ response_data.read()
456
+ return self.api_client.response_deserialize(
457
+ response_data=response_data,
458
+ response_types_map=_response_types_map,
459
+ )
460
+
461
+
462
+ @validate_call
463
+ def create_checkout_link_without_preload_content(
464
+ self,
465
+ pricing_plan: StrictStr,
466
+ _request_timeout: Union[
467
+ None,
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Tuple[
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Annotated[StrictFloat, Field(gt=0)]
472
+ ]
473
+ ] = None,
474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
475
+ _content_type: Optional[StrictStr] = None,
476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
478
+ ) -> RESTResponseType:
479
+ """Create a stripe checkout to make a payment
480
+
481
+ Creates a Stripe checkout session for plan changes.
482
+
483
+ :param pricing_plan: (required)
484
+ :type pricing_plan: str
485
+ :param _request_timeout: timeout setting for this request. If one
486
+ number provided, it will be total request
487
+ timeout. It can also be a pair (tuple) of
488
+ (connection, read) timeouts.
489
+ :type _request_timeout: int, tuple(int, int), optional
490
+ :param _request_auth: set to override the auth_settings for an a single
491
+ request; this effectively ignores the
492
+ authentication in the spec for a single request.
493
+ :type _request_auth: dict, optional
494
+ :param _content_type: force content-type for the request.
495
+ :type _content_type: str, Optional
496
+ :param _headers: set to override the headers for a single
497
+ request; this effectively ignores the headers
498
+ in the spec for a single request.
499
+ :type _headers: dict, optional
500
+ :param _host_index: set to override the host_index for a single
501
+ request; this effectively ignores the host_index
502
+ in the spec for a single request.
503
+ :type _host_index: int, optional
504
+ :return: Returns the result object.
505
+ """ # noqa: E501
506
+
507
+ _param = self._create_checkout_link_serialize(
508
+ pricing_plan=pricing_plan,
509
+ _request_auth=_request_auth,
510
+ _content_type=_content_type,
511
+ _headers=_headers,
512
+ _host_index=_host_index
513
+ )
514
+
515
+ _response_types_map: Dict[str, Optional[str]] = {
516
+ '200': "SubscriptionResponse",
517
+ '422': "HTTPValidationError",
518
+ }
519
+ response_data = self.api_client.call_api(
520
+ *_param,
521
+ _request_timeout=_request_timeout
522
+ )
523
+ return response_data.response
524
+
525
+
526
+ def _create_checkout_link_serialize(
527
+ self,
528
+ pricing_plan,
529
+ _request_auth,
530
+ _content_type,
531
+ _headers,
532
+ _host_index,
533
+ ) -> RequestSerialized:
534
+
535
+ _host = None
536
+
537
+ _collection_formats: Dict[str, str] = {
538
+ }
539
+
540
+ _path_params: Dict[str, str] = {}
541
+ _query_params: List[Tuple[str, str]] = []
542
+ _header_params: Dict[str, Optional[str]] = _headers or {}
543
+ _form_params: List[Tuple[str, str]] = []
544
+ _files: Dict[
545
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
546
+ ] = {}
547
+ _body_params: Optional[bytes] = None
548
+
549
+ # process the path parameters
550
+ # process the query parameters
551
+ if pricing_plan is not None:
552
+
553
+ _query_params.append(('pricingPlan', pricing_plan))
554
+
555
+ # process the header parameters
556
+ # process the form parameters
557
+ # process the body parameter
558
+
559
+
560
+ # set the HTTP header `Accept`
561
+ if 'Accept' not in _header_params:
562
+ _header_params['Accept'] = self.api_client.select_header_accept(
563
+ [
564
+ 'application/json'
565
+ ]
566
+ )
567
+
568
+
569
+ # authentication setting
570
+ _auth_settings: List[str] = [
571
+ 'QAnswer-Api-Key',
572
+ 'Bearer token'
573
+ ]
574
+
575
+ return self.api_client.param_serialize(
576
+ method='POST',
577
+ resource_path='/backend/api/payment/checkout-subscription',
578
+ path_params=_path_params,
579
+ query_params=_query_params,
580
+ header_params=_header_params,
581
+ body=_body_params,
582
+ post_params=_form_params,
583
+ files=_files,
584
+ auth_settings=_auth_settings,
585
+ collection_formats=_collection_formats,
586
+ _host=_host,
587
+ _request_auth=_request_auth
588
+ )
589
+
590
+
591
+
592
+
593
+ @validate_call
594
+ def create_checkout_link_data(
595
+ self,
596
+ number_data_package: Optional[StrictInt] = None,
597
+ currency: Optional[StrictStr] = None,
598
+ _request_timeout: Union[
599
+ None,
600
+ Annotated[StrictFloat, Field(gt=0)],
601
+ Tuple[
602
+ Annotated[StrictFloat, Field(gt=0)],
603
+ Annotated[StrictFloat, Field(gt=0)]
604
+ ]
605
+ ] = None,
606
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
607
+ _content_type: Optional[StrictStr] = None,
608
+ _headers: Optional[Dict[StrictStr, Any]] = None,
609
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
610
+ ) -> str:
611
+ """Create a stripe checkout to add data packages
612
+
613
+ Creates a Stripe checkout session for data packages.
614
+
615
+ :param number_data_package:
616
+ :type number_data_package: int
617
+ :param currency:
618
+ :type currency: str
619
+ :param _request_timeout: timeout setting for this request. If one
620
+ number provided, it will be total request
621
+ timeout. It can also be a pair (tuple) of
622
+ (connection, read) timeouts.
623
+ :type _request_timeout: int, tuple(int, int), optional
624
+ :param _request_auth: set to override the auth_settings for an a single
625
+ request; this effectively ignores the
626
+ authentication in the spec for a single request.
627
+ :type _request_auth: dict, optional
628
+ :param _content_type: force content-type for the request.
629
+ :type _content_type: str, Optional
630
+ :param _headers: set to override the headers for a single
631
+ request; this effectively ignores the headers
632
+ in the spec for a single request.
633
+ :type _headers: dict, optional
634
+ :param _host_index: set to override the host_index for a single
635
+ request; this effectively ignores the host_index
636
+ in the spec for a single request.
637
+ :type _host_index: int, optional
638
+ :return: Returns the result object.
639
+ """ # noqa: E501
640
+
641
+ _param = self._create_checkout_link_data_serialize(
642
+ number_data_package=number_data_package,
643
+ currency=currency,
644
+ _request_auth=_request_auth,
645
+ _content_type=_content_type,
646
+ _headers=_headers,
647
+ _host_index=_host_index
648
+ )
649
+
650
+ _response_types_map: Dict[str, Optional[str]] = {
651
+ '200': "str",
652
+ '422': "HTTPValidationError",
653
+ }
654
+ response_data = self.api_client.call_api(
655
+ *_param,
656
+ _request_timeout=_request_timeout
657
+ )
658
+ response_data.read()
659
+ return self.api_client.response_deserialize(
660
+ response_data=response_data,
661
+ response_types_map=_response_types_map,
662
+ ).data
663
+
664
+
665
+ @validate_call
666
+ def create_checkout_link_data_with_http_info(
667
+ self,
668
+ number_data_package: Optional[StrictInt] = None,
669
+ currency: Optional[StrictStr] = None,
670
+ _request_timeout: Union[
671
+ None,
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Tuple[
674
+ Annotated[StrictFloat, Field(gt=0)],
675
+ Annotated[StrictFloat, Field(gt=0)]
676
+ ]
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> ApiResponse[str]:
683
+ """Create a stripe checkout to add data packages
684
+
685
+ Creates a Stripe checkout session for data packages.
686
+
687
+ :param number_data_package:
688
+ :type number_data_package: int
689
+ :param currency:
690
+ :type currency: str
691
+ :param _request_timeout: timeout setting for this request. If one
692
+ number provided, it will be total request
693
+ timeout. It can also be a pair (tuple) of
694
+ (connection, read) timeouts.
695
+ :type _request_timeout: int, tuple(int, int), optional
696
+ :param _request_auth: set to override the auth_settings for an a single
697
+ request; this effectively ignores the
698
+ authentication in the spec for a single request.
699
+ :type _request_auth: dict, optional
700
+ :param _content_type: force content-type for the request.
701
+ :type _content_type: str, Optional
702
+ :param _headers: set to override the headers for a single
703
+ request; this effectively ignores the headers
704
+ in the spec for a single request.
705
+ :type _headers: dict, optional
706
+ :param _host_index: set to override the host_index for a single
707
+ request; this effectively ignores the host_index
708
+ in the spec for a single request.
709
+ :type _host_index: int, optional
710
+ :return: Returns the result object.
711
+ """ # noqa: E501
712
+
713
+ _param = self._create_checkout_link_data_serialize(
714
+ number_data_package=number_data_package,
715
+ currency=currency,
716
+ _request_auth=_request_auth,
717
+ _content_type=_content_type,
718
+ _headers=_headers,
719
+ _host_index=_host_index
720
+ )
721
+
722
+ _response_types_map: Dict[str, Optional[str]] = {
723
+ '200': "str",
724
+ '422': "HTTPValidationError",
725
+ }
726
+ response_data = self.api_client.call_api(
727
+ *_param,
728
+ _request_timeout=_request_timeout
729
+ )
730
+ response_data.read()
731
+ return self.api_client.response_deserialize(
732
+ response_data=response_data,
733
+ response_types_map=_response_types_map,
734
+ )
735
+
736
+
737
+ @validate_call
738
+ def create_checkout_link_data_without_preload_content(
739
+ self,
740
+ number_data_package: Optional[StrictInt] = None,
741
+ currency: Optional[StrictStr] = None,
742
+ _request_timeout: Union[
743
+ None,
744
+ Annotated[StrictFloat, Field(gt=0)],
745
+ Tuple[
746
+ Annotated[StrictFloat, Field(gt=0)],
747
+ Annotated[StrictFloat, Field(gt=0)]
748
+ ]
749
+ ] = None,
750
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
751
+ _content_type: Optional[StrictStr] = None,
752
+ _headers: Optional[Dict[StrictStr, Any]] = None,
753
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
754
+ ) -> RESTResponseType:
755
+ """Create a stripe checkout to add data packages
756
+
757
+ Creates a Stripe checkout session for data packages.
758
+
759
+ :param number_data_package:
760
+ :type number_data_package: int
761
+ :param currency:
762
+ :type currency: str
763
+ :param _request_timeout: timeout setting for this request. If one
764
+ number provided, it will be total request
765
+ timeout. It can also be a pair (tuple) of
766
+ (connection, read) timeouts.
767
+ :type _request_timeout: int, tuple(int, int), optional
768
+ :param _request_auth: set to override the auth_settings for an a single
769
+ request; this effectively ignores the
770
+ authentication in the spec for a single request.
771
+ :type _request_auth: dict, optional
772
+ :param _content_type: force content-type for the request.
773
+ :type _content_type: str, Optional
774
+ :param _headers: set to override the headers for a single
775
+ request; this effectively ignores the headers
776
+ in the spec for a single request.
777
+ :type _headers: dict, optional
778
+ :param _host_index: set to override the host_index for a single
779
+ request; this effectively ignores the host_index
780
+ in the spec for a single request.
781
+ :type _host_index: int, optional
782
+ :return: Returns the result object.
783
+ """ # noqa: E501
784
+
785
+ _param = self._create_checkout_link_data_serialize(
786
+ number_data_package=number_data_package,
787
+ currency=currency,
788
+ _request_auth=_request_auth,
789
+ _content_type=_content_type,
790
+ _headers=_headers,
791
+ _host_index=_host_index
792
+ )
793
+
794
+ _response_types_map: Dict[str, Optional[str]] = {
795
+ '200': "str",
796
+ '422': "HTTPValidationError",
797
+ }
798
+ response_data = self.api_client.call_api(
799
+ *_param,
800
+ _request_timeout=_request_timeout
801
+ )
802
+ return response_data.response
803
+
804
+
805
+ def _create_checkout_link_data_serialize(
806
+ self,
807
+ number_data_package,
808
+ currency,
809
+ _request_auth,
810
+ _content_type,
811
+ _headers,
812
+ _host_index,
813
+ ) -> RequestSerialized:
814
+
815
+ _host = None
816
+
817
+ _collection_formats: Dict[str, str] = {
818
+ }
819
+
820
+ _path_params: Dict[str, str] = {}
821
+ _query_params: List[Tuple[str, str]] = []
822
+ _header_params: Dict[str, Optional[str]] = _headers or {}
823
+ _form_params: List[Tuple[str, str]] = []
824
+ _files: Dict[
825
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
826
+ ] = {}
827
+ _body_params: Optional[bytes] = None
828
+
829
+ # process the path parameters
830
+ # process the query parameters
831
+ if number_data_package is not None:
832
+
833
+ _query_params.append(('numberDataPackage', number_data_package))
834
+
835
+ if currency is not None:
836
+
837
+ _query_params.append(('currency', currency))
838
+
839
+ # process the header parameters
840
+ # process the form parameters
841
+ # process the body parameter
842
+
843
+
844
+ # set the HTTP header `Accept`
845
+ if 'Accept' not in _header_params:
846
+ _header_params['Accept'] = self.api_client.select_header_accept(
847
+ [
848
+ 'application/json'
849
+ ]
850
+ )
851
+
852
+
853
+ # authentication setting
854
+ _auth_settings: List[str] = [
855
+ 'QAnswer-Api-Key',
856
+ 'Bearer token'
857
+ ]
858
+
859
+ return self.api_client.param_serialize(
860
+ method='POST',
861
+ resource_path='/backend/api/payment/checkout-data',
862
+ path_params=_path_params,
863
+ query_params=_query_params,
864
+ header_params=_header_params,
865
+ body=_body_params,
866
+ post_params=_form_params,
867
+ files=_files,
868
+ auth_settings=_auth_settings,
869
+ collection_formats=_collection_formats,
870
+ _host=_host,
871
+ _request_auth=_request_auth
872
+ )
873
+
874
+
875
+
876
+
877
+ @validate_call
878
+ def create_checkout_session(
879
+ self,
880
+ _request_timeout: Union[
881
+ None,
882
+ Annotated[StrictFloat, Field(gt=0)],
883
+ Tuple[
884
+ Annotated[StrictFloat, Field(gt=0)],
885
+ Annotated[StrictFloat, Field(gt=0)]
886
+ ]
887
+ ] = None,
888
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
889
+ _content_type: Optional[StrictStr] = None,
890
+ _headers: Optional[Dict[StrictStr, Any]] = None,
891
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
892
+ ) -> str:
893
+ """Create a stripe session to manage the payment
894
+
895
+ Creates a Stripe billing portal session.
896
+
897
+ :param _request_timeout: timeout setting for this request. If one
898
+ number provided, it will be total request
899
+ timeout. It can also be a pair (tuple) of
900
+ (connection, read) timeouts.
901
+ :type _request_timeout: int, tuple(int, int), optional
902
+ :param _request_auth: set to override the auth_settings for an a single
903
+ request; this effectively ignores the
904
+ authentication in the spec for a single request.
905
+ :type _request_auth: dict, optional
906
+ :param _content_type: force content-type for the request.
907
+ :type _content_type: str, Optional
908
+ :param _headers: set to override the headers for a single
909
+ request; this effectively ignores the headers
910
+ in the spec for a single request.
911
+ :type _headers: dict, optional
912
+ :param _host_index: set to override the host_index for a single
913
+ request; this effectively ignores the host_index
914
+ in the spec for a single request.
915
+ :type _host_index: int, optional
916
+ :return: Returns the result object.
917
+ """ # noqa: E501
918
+
919
+ _param = self._create_checkout_session_serialize(
920
+ _request_auth=_request_auth,
921
+ _content_type=_content_type,
922
+ _headers=_headers,
923
+ _host_index=_host_index
924
+ )
925
+
926
+ _response_types_map: Dict[str, Optional[str]] = {
927
+ '200': "str",
928
+ }
929
+ response_data = self.api_client.call_api(
930
+ *_param,
931
+ _request_timeout=_request_timeout
932
+ )
933
+ response_data.read()
934
+ return self.api_client.response_deserialize(
935
+ response_data=response_data,
936
+ response_types_map=_response_types_map,
937
+ ).data
938
+
939
+
940
+ @validate_call
941
+ def create_checkout_session_with_http_info(
942
+ self,
943
+ _request_timeout: Union[
944
+ None,
945
+ Annotated[StrictFloat, Field(gt=0)],
946
+ Tuple[
947
+ Annotated[StrictFloat, Field(gt=0)],
948
+ Annotated[StrictFloat, Field(gt=0)]
949
+ ]
950
+ ] = None,
951
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
952
+ _content_type: Optional[StrictStr] = None,
953
+ _headers: Optional[Dict[StrictStr, Any]] = None,
954
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
955
+ ) -> ApiResponse[str]:
956
+ """Create a stripe session to manage the payment
957
+
958
+ Creates a Stripe billing portal session.
959
+
960
+ :param _request_timeout: timeout setting for this request. If one
961
+ number provided, it will be total request
962
+ timeout. It can also be a pair (tuple) of
963
+ (connection, read) timeouts.
964
+ :type _request_timeout: int, tuple(int, int), optional
965
+ :param _request_auth: set to override the auth_settings for an a single
966
+ request; this effectively ignores the
967
+ authentication in the spec for a single request.
968
+ :type _request_auth: dict, optional
969
+ :param _content_type: force content-type for the request.
970
+ :type _content_type: str, Optional
971
+ :param _headers: set to override the headers for a single
972
+ request; this effectively ignores the headers
973
+ in the spec for a single request.
974
+ :type _headers: dict, optional
975
+ :param _host_index: set to override the host_index for a single
976
+ request; this effectively ignores the host_index
977
+ in the spec for a single request.
978
+ :type _host_index: int, optional
979
+ :return: Returns the result object.
980
+ """ # noqa: E501
981
+
982
+ _param = self._create_checkout_session_serialize(
983
+ _request_auth=_request_auth,
984
+ _content_type=_content_type,
985
+ _headers=_headers,
986
+ _host_index=_host_index
987
+ )
988
+
989
+ _response_types_map: Dict[str, Optional[str]] = {
990
+ '200': "str",
991
+ }
992
+ response_data = self.api_client.call_api(
993
+ *_param,
994
+ _request_timeout=_request_timeout
995
+ )
996
+ response_data.read()
997
+ return self.api_client.response_deserialize(
998
+ response_data=response_data,
999
+ response_types_map=_response_types_map,
1000
+ )
1001
+
1002
+
1003
+ @validate_call
1004
+ def create_checkout_session_without_preload_content(
1005
+ self,
1006
+ _request_timeout: Union[
1007
+ None,
1008
+ Annotated[StrictFloat, Field(gt=0)],
1009
+ Tuple[
1010
+ Annotated[StrictFloat, Field(gt=0)],
1011
+ Annotated[StrictFloat, Field(gt=0)]
1012
+ ]
1013
+ ] = None,
1014
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1015
+ _content_type: Optional[StrictStr] = None,
1016
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1017
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1018
+ ) -> RESTResponseType:
1019
+ """Create a stripe session to manage the payment
1020
+
1021
+ Creates a Stripe billing portal session.
1022
+
1023
+ :param _request_timeout: timeout setting for this request. If one
1024
+ number provided, it will be total request
1025
+ timeout. It can also be a pair (tuple) of
1026
+ (connection, read) timeouts.
1027
+ :type _request_timeout: int, tuple(int, int), optional
1028
+ :param _request_auth: set to override the auth_settings for an a single
1029
+ request; this effectively ignores the
1030
+ authentication in the spec for a single request.
1031
+ :type _request_auth: dict, optional
1032
+ :param _content_type: force content-type for the request.
1033
+ :type _content_type: str, Optional
1034
+ :param _headers: set to override the headers for a single
1035
+ request; this effectively ignores the headers
1036
+ in the spec for a single request.
1037
+ :type _headers: dict, optional
1038
+ :param _host_index: set to override the host_index for a single
1039
+ request; this effectively ignores the host_index
1040
+ in the spec for a single request.
1041
+ :type _host_index: int, optional
1042
+ :return: Returns the result object.
1043
+ """ # noqa: E501
1044
+
1045
+ _param = self._create_checkout_session_serialize(
1046
+ _request_auth=_request_auth,
1047
+ _content_type=_content_type,
1048
+ _headers=_headers,
1049
+ _host_index=_host_index
1050
+ )
1051
+
1052
+ _response_types_map: Dict[str, Optional[str]] = {
1053
+ '200': "str",
1054
+ }
1055
+ response_data = self.api_client.call_api(
1056
+ *_param,
1057
+ _request_timeout=_request_timeout
1058
+ )
1059
+ return response_data.response
1060
+
1061
+
1062
+ def _create_checkout_session_serialize(
1063
+ self,
1064
+ _request_auth,
1065
+ _content_type,
1066
+ _headers,
1067
+ _host_index,
1068
+ ) -> RequestSerialized:
1069
+
1070
+ _host = None
1071
+
1072
+ _collection_formats: Dict[str, str] = {
1073
+ }
1074
+
1075
+ _path_params: Dict[str, str] = {}
1076
+ _query_params: List[Tuple[str, str]] = []
1077
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1078
+ _form_params: List[Tuple[str, str]] = []
1079
+ _files: Dict[
1080
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1081
+ ] = {}
1082
+ _body_params: Optional[bytes] = None
1083
+
1084
+ # process the path parameters
1085
+ # process the query parameters
1086
+ # process the header parameters
1087
+ # process the form parameters
1088
+ # process the body parameter
1089
+
1090
+
1091
+ # set the HTTP header `Accept`
1092
+ if 'Accept' not in _header_params:
1093
+ _header_params['Accept'] = self.api_client.select_header_accept(
1094
+ [
1095
+ 'application/json'
1096
+ ]
1097
+ )
1098
+
1099
+
1100
+ # authentication setting
1101
+ _auth_settings: List[str] = [
1102
+ 'QAnswer-Api-Key',
1103
+ 'Bearer token'
1104
+ ]
1105
+
1106
+ return self.api_client.param_serialize(
1107
+ method='POST',
1108
+ resource_path='/backend/api/payment/manage-subscription-session',
1109
+ path_params=_path_params,
1110
+ query_params=_query_params,
1111
+ header_params=_header_params,
1112
+ body=_body_params,
1113
+ post_params=_form_params,
1114
+ files=_files,
1115
+ auth_settings=_auth_settings,
1116
+ collection_formats=_collection_formats,
1117
+ _host=_host,
1118
+ _request_auth=_request_auth
1119
+ )
1120
+
1121
+
1122
+
1123
+
1124
+ @validate_call
1125
+ def post_events_webhook(
1126
+ self,
1127
+ _request_timeout: Union[
1128
+ None,
1129
+ Annotated[StrictFloat, Field(gt=0)],
1130
+ Tuple[
1131
+ Annotated[StrictFloat, Field(gt=0)],
1132
+ Annotated[StrictFloat, Field(gt=0)]
1133
+ ]
1134
+ ] = None,
1135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1136
+ _content_type: Optional[StrictStr] = None,
1137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1139
+ ) -> object:
1140
+ """Webhook for stripe service
1141
+
1142
+ Stripe webhook handler for subscription events.
1143
+
1144
+ :param _request_timeout: timeout setting for this request. If one
1145
+ number provided, it will be total request
1146
+ timeout. It can also be a pair (tuple) of
1147
+ (connection, read) timeouts.
1148
+ :type _request_timeout: int, tuple(int, int), optional
1149
+ :param _request_auth: set to override the auth_settings for an a single
1150
+ request; this effectively ignores the
1151
+ authentication in the spec for a single request.
1152
+ :type _request_auth: dict, optional
1153
+ :param _content_type: force content-type for the request.
1154
+ :type _content_type: str, Optional
1155
+ :param _headers: set to override the headers for a single
1156
+ request; this effectively ignores the headers
1157
+ in the spec for a single request.
1158
+ :type _headers: dict, optional
1159
+ :param _host_index: set to override the host_index for a single
1160
+ request; this effectively ignores the host_index
1161
+ in the spec for a single request.
1162
+ :type _host_index: int, optional
1163
+ :return: Returns the result object.
1164
+ """ # noqa: E501
1165
+
1166
+ _param = self._post_events_webhook_serialize(
1167
+ _request_auth=_request_auth,
1168
+ _content_type=_content_type,
1169
+ _headers=_headers,
1170
+ _host_index=_host_index
1171
+ )
1172
+
1173
+ _response_types_map: Dict[str, Optional[str]] = {
1174
+ '200': "object",
1175
+ }
1176
+ response_data = self.api_client.call_api(
1177
+ *_param,
1178
+ _request_timeout=_request_timeout
1179
+ )
1180
+ response_data.read()
1181
+ return self.api_client.response_deserialize(
1182
+ response_data=response_data,
1183
+ response_types_map=_response_types_map,
1184
+ ).data
1185
+
1186
+
1187
+ @validate_call
1188
+ def post_events_webhook_with_http_info(
1189
+ self,
1190
+ _request_timeout: Union[
1191
+ None,
1192
+ Annotated[StrictFloat, Field(gt=0)],
1193
+ Tuple[
1194
+ Annotated[StrictFloat, Field(gt=0)],
1195
+ Annotated[StrictFloat, Field(gt=0)]
1196
+ ]
1197
+ ] = None,
1198
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1199
+ _content_type: Optional[StrictStr] = None,
1200
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1201
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1202
+ ) -> ApiResponse[object]:
1203
+ """Webhook for stripe service
1204
+
1205
+ Stripe webhook handler for subscription events.
1206
+
1207
+ :param _request_timeout: timeout setting for this request. If one
1208
+ number provided, it will be total request
1209
+ timeout. It can also be a pair (tuple) of
1210
+ (connection, read) timeouts.
1211
+ :type _request_timeout: int, tuple(int, int), optional
1212
+ :param _request_auth: set to override the auth_settings for an a single
1213
+ request; this effectively ignores the
1214
+ authentication in the spec for a single request.
1215
+ :type _request_auth: dict, optional
1216
+ :param _content_type: force content-type for the request.
1217
+ :type _content_type: str, Optional
1218
+ :param _headers: set to override the headers for a single
1219
+ request; this effectively ignores the headers
1220
+ in the spec for a single request.
1221
+ :type _headers: dict, optional
1222
+ :param _host_index: set to override the host_index for a single
1223
+ request; this effectively ignores the host_index
1224
+ in the spec for a single request.
1225
+ :type _host_index: int, optional
1226
+ :return: Returns the result object.
1227
+ """ # noqa: E501
1228
+
1229
+ _param = self._post_events_webhook_serialize(
1230
+ _request_auth=_request_auth,
1231
+ _content_type=_content_type,
1232
+ _headers=_headers,
1233
+ _host_index=_host_index
1234
+ )
1235
+
1236
+ _response_types_map: Dict[str, Optional[str]] = {
1237
+ '200': "object",
1238
+ }
1239
+ response_data = self.api_client.call_api(
1240
+ *_param,
1241
+ _request_timeout=_request_timeout
1242
+ )
1243
+ response_data.read()
1244
+ return self.api_client.response_deserialize(
1245
+ response_data=response_data,
1246
+ response_types_map=_response_types_map,
1247
+ )
1248
+
1249
+
1250
+ @validate_call
1251
+ def post_events_webhook_without_preload_content(
1252
+ self,
1253
+ _request_timeout: Union[
1254
+ None,
1255
+ Annotated[StrictFloat, Field(gt=0)],
1256
+ Tuple[
1257
+ Annotated[StrictFloat, Field(gt=0)],
1258
+ Annotated[StrictFloat, Field(gt=0)]
1259
+ ]
1260
+ ] = None,
1261
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1262
+ _content_type: Optional[StrictStr] = None,
1263
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1264
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1265
+ ) -> RESTResponseType:
1266
+ """Webhook for stripe service
1267
+
1268
+ Stripe webhook handler for subscription events.
1269
+
1270
+ :param _request_timeout: timeout setting for this request. If one
1271
+ number provided, it will be total request
1272
+ timeout. It can also be a pair (tuple) of
1273
+ (connection, read) timeouts.
1274
+ :type _request_timeout: int, tuple(int, int), optional
1275
+ :param _request_auth: set to override the auth_settings for an a single
1276
+ request; this effectively ignores the
1277
+ authentication in the spec for a single request.
1278
+ :type _request_auth: dict, optional
1279
+ :param _content_type: force content-type for the request.
1280
+ :type _content_type: str, Optional
1281
+ :param _headers: set to override the headers for a single
1282
+ request; this effectively ignores the headers
1283
+ in the spec for a single request.
1284
+ :type _headers: dict, optional
1285
+ :param _host_index: set to override the host_index for a single
1286
+ request; this effectively ignores the host_index
1287
+ in the spec for a single request.
1288
+ :type _host_index: int, optional
1289
+ :return: Returns the result object.
1290
+ """ # noqa: E501
1291
+
1292
+ _param = self._post_events_webhook_serialize(
1293
+ _request_auth=_request_auth,
1294
+ _content_type=_content_type,
1295
+ _headers=_headers,
1296
+ _host_index=_host_index
1297
+ )
1298
+
1299
+ _response_types_map: Dict[str, Optional[str]] = {
1300
+ '200': "object",
1301
+ }
1302
+ response_data = self.api_client.call_api(
1303
+ *_param,
1304
+ _request_timeout=_request_timeout
1305
+ )
1306
+ return response_data.response
1307
+
1308
+
1309
+ def _post_events_webhook_serialize(
1310
+ self,
1311
+ _request_auth,
1312
+ _content_type,
1313
+ _headers,
1314
+ _host_index,
1315
+ ) -> RequestSerialized:
1316
+
1317
+ _host = None
1318
+
1319
+ _collection_formats: Dict[str, str] = {
1320
+ }
1321
+
1322
+ _path_params: Dict[str, str] = {}
1323
+ _query_params: List[Tuple[str, str]] = []
1324
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1325
+ _form_params: List[Tuple[str, str]] = []
1326
+ _files: Dict[
1327
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1328
+ ] = {}
1329
+ _body_params: Optional[bytes] = None
1330
+
1331
+ # process the path parameters
1332
+ # process the query parameters
1333
+ # process the header parameters
1334
+ # process the form parameters
1335
+ # process the body parameter
1336
+
1337
+
1338
+ # set the HTTP header `Accept`
1339
+ if 'Accept' not in _header_params:
1340
+ _header_params['Accept'] = self.api_client.select_header_accept(
1341
+ [
1342
+ 'application/json'
1343
+ ]
1344
+ )
1345
+
1346
+
1347
+ # authentication setting
1348
+ _auth_settings: List[str] = [
1349
+ ]
1350
+
1351
+ return self.api_client.param_serialize(
1352
+ method='POST',
1353
+ resource_path='/backend/api/payment/stripe_webhooks',
1354
+ path_params=_path_params,
1355
+ query_params=_query_params,
1356
+ header_params=_header_params,
1357
+ body=_body_params,
1358
+ post_params=_form_params,
1359
+ files=_files,
1360
+ auth_settings=_auth_settings,
1361
+ collection_formats=_collection_formats,
1362
+ _host=_host,
1363
+ _request_auth=_request_auth
1364
+ )
1365
+
1366
+
1367
+
1368
+
1369
+ @validate_call
1370
+ def pricing_plans(
1371
+ self,
1372
+ _request_timeout: Union[
1373
+ None,
1374
+ Annotated[StrictFloat, Field(gt=0)],
1375
+ Tuple[
1376
+ Annotated[StrictFloat, Field(gt=0)],
1377
+ Annotated[StrictFloat, Field(gt=0)]
1378
+ ]
1379
+ ] = None,
1380
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1381
+ _content_type: Optional[StrictStr] = None,
1382
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1383
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1384
+ ) -> List[PlanDto]:
1385
+ """List all available plans
1386
+
1387
+
1388
+ :param _request_timeout: timeout setting for this request. If one
1389
+ number provided, it will be total request
1390
+ timeout. It can also be a pair (tuple) of
1391
+ (connection, read) timeouts.
1392
+ :type _request_timeout: int, tuple(int, int), optional
1393
+ :param _request_auth: set to override the auth_settings for an a single
1394
+ request; this effectively ignores the
1395
+ authentication in the spec for a single request.
1396
+ :type _request_auth: dict, optional
1397
+ :param _content_type: force content-type for the request.
1398
+ :type _content_type: str, Optional
1399
+ :param _headers: set to override the headers for a single
1400
+ request; this effectively ignores the headers
1401
+ in the spec for a single request.
1402
+ :type _headers: dict, optional
1403
+ :param _host_index: set to override the host_index for a single
1404
+ request; this effectively ignores the host_index
1405
+ in the spec for a single request.
1406
+ :type _host_index: int, optional
1407
+ :return: Returns the result object.
1408
+ """ # noqa: E501
1409
+
1410
+ _param = self._pricing_plans_serialize(
1411
+ _request_auth=_request_auth,
1412
+ _content_type=_content_type,
1413
+ _headers=_headers,
1414
+ _host_index=_host_index
1415
+ )
1416
+
1417
+ _response_types_map: Dict[str, Optional[str]] = {
1418
+ '200': "List[PlanDto]",
1419
+ }
1420
+ response_data = self.api_client.call_api(
1421
+ *_param,
1422
+ _request_timeout=_request_timeout
1423
+ )
1424
+ response_data.read()
1425
+ return self.api_client.response_deserialize(
1426
+ response_data=response_data,
1427
+ response_types_map=_response_types_map,
1428
+ ).data
1429
+
1430
+
1431
+ @validate_call
1432
+ def pricing_plans_with_http_info(
1433
+ self,
1434
+ _request_timeout: Union[
1435
+ None,
1436
+ Annotated[StrictFloat, Field(gt=0)],
1437
+ Tuple[
1438
+ Annotated[StrictFloat, Field(gt=0)],
1439
+ Annotated[StrictFloat, Field(gt=0)]
1440
+ ]
1441
+ ] = None,
1442
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1443
+ _content_type: Optional[StrictStr] = None,
1444
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1445
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1446
+ ) -> ApiResponse[List[PlanDto]]:
1447
+ """List all available plans
1448
+
1449
+
1450
+ :param _request_timeout: timeout setting for this request. If one
1451
+ number provided, it will be total request
1452
+ timeout. It can also be a pair (tuple) of
1453
+ (connection, read) timeouts.
1454
+ :type _request_timeout: int, tuple(int, int), optional
1455
+ :param _request_auth: set to override the auth_settings for an a single
1456
+ request; this effectively ignores the
1457
+ authentication in the spec for a single request.
1458
+ :type _request_auth: dict, optional
1459
+ :param _content_type: force content-type for the request.
1460
+ :type _content_type: str, Optional
1461
+ :param _headers: set to override the headers for a single
1462
+ request; this effectively ignores the headers
1463
+ in the spec for a single request.
1464
+ :type _headers: dict, optional
1465
+ :param _host_index: set to override the host_index for a single
1466
+ request; this effectively ignores the host_index
1467
+ in the spec for a single request.
1468
+ :type _host_index: int, optional
1469
+ :return: Returns the result object.
1470
+ """ # noqa: E501
1471
+
1472
+ _param = self._pricing_plans_serialize(
1473
+ _request_auth=_request_auth,
1474
+ _content_type=_content_type,
1475
+ _headers=_headers,
1476
+ _host_index=_host_index
1477
+ )
1478
+
1479
+ _response_types_map: Dict[str, Optional[str]] = {
1480
+ '200': "List[PlanDto]",
1481
+ }
1482
+ response_data = self.api_client.call_api(
1483
+ *_param,
1484
+ _request_timeout=_request_timeout
1485
+ )
1486
+ response_data.read()
1487
+ return self.api_client.response_deserialize(
1488
+ response_data=response_data,
1489
+ response_types_map=_response_types_map,
1490
+ )
1491
+
1492
+
1493
+ @validate_call
1494
+ def pricing_plans_without_preload_content(
1495
+ self,
1496
+ _request_timeout: Union[
1497
+ None,
1498
+ Annotated[StrictFloat, Field(gt=0)],
1499
+ Tuple[
1500
+ Annotated[StrictFloat, Field(gt=0)],
1501
+ Annotated[StrictFloat, Field(gt=0)]
1502
+ ]
1503
+ ] = None,
1504
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1505
+ _content_type: Optional[StrictStr] = None,
1506
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1507
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1508
+ ) -> RESTResponseType:
1509
+ """List all available plans
1510
+
1511
+
1512
+ :param _request_timeout: timeout setting for this request. If one
1513
+ number provided, it will be total request
1514
+ timeout. It can also be a pair (tuple) of
1515
+ (connection, read) timeouts.
1516
+ :type _request_timeout: int, tuple(int, int), optional
1517
+ :param _request_auth: set to override the auth_settings for an a single
1518
+ request; this effectively ignores the
1519
+ authentication in the spec for a single request.
1520
+ :type _request_auth: dict, optional
1521
+ :param _content_type: force content-type for the request.
1522
+ :type _content_type: str, Optional
1523
+ :param _headers: set to override the headers for a single
1524
+ request; this effectively ignores the headers
1525
+ in the spec for a single request.
1526
+ :type _headers: dict, optional
1527
+ :param _host_index: set to override the host_index for a single
1528
+ request; this effectively ignores the host_index
1529
+ in the spec for a single request.
1530
+ :type _host_index: int, optional
1531
+ :return: Returns the result object.
1532
+ """ # noqa: E501
1533
+
1534
+ _param = self._pricing_plans_serialize(
1535
+ _request_auth=_request_auth,
1536
+ _content_type=_content_type,
1537
+ _headers=_headers,
1538
+ _host_index=_host_index
1539
+ )
1540
+
1541
+ _response_types_map: Dict[str, Optional[str]] = {
1542
+ '200': "List[PlanDto]",
1543
+ }
1544
+ response_data = self.api_client.call_api(
1545
+ *_param,
1546
+ _request_timeout=_request_timeout
1547
+ )
1548
+ return response_data.response
1549
+
1550
+
1551
+ def _pricing_plans_serialize(
1552
+ self,
1553
+ _request_auth,
1554
+ _content_type,
1555
+ _headers,
1556
+ _host_index,
1557
+ ) -> RequestSerialized:
1558
+
1559
+ _host = None
1560
+
1561
+ _collection_formats: Dict[str, str] = {
1562
+ }
1563
+
1564
+ _path_params: Dict[str, str] = {}
1565
+ _query_params: List[Tuple[str, str]] = []
1566
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1567
+ _form_params: List[Tuple[str, str]] = []
1568
+ _files: Dict[
1569
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1570
+ ] = {}
1571
+ _body_params: Optional[bytes] = None
1572
+
1573
+ # process the path parameters
1574
+ # process the query parameters
1575
+ # process the header parameters
1576
+ # process the form parameters
1577
+ # process the body parameter
1578
+
1579
+
1580
+ # set the HTTP header `Accept`
1581
+ if 'Accept' not in _header_params:
1582
+ _header_params['Accept'] = self.api_client.select_header_accept(
1583
+ [
1584
+ 'application/json'
1585
+ ]
1586
+ )
1587
+
1588
+
1589
+ # authentication setting
1590
+ _auth_settings: List[str] = [
1591
+ ]
1592
+
1593
+ return self.api_client.param_serialize(
1594
+ method='GET',
1595
+ resource_path='/backend/api/payment/plans',
1596
+ path_params=_path_params,
1597
+ query_params=_query_params,
1598
+ header_params=_header_params,
1599
+ body=_body_params,
1600
+ post_params=_form_params,
1601
+ files=_files,
1602
+ auth_settings=_auth_settings,
1603
+ collection_formats=_collection_formats,
1604
+ _host=_host,
1605
+ _request_auth=_request_auth
1606
+ )
1607
+
1608
+
1609
+
1610
+
1611
+ @validate_call
1612
+ def subscription(
1613
+ self,
1614
+ _request_timeout: Union[
1615
+ None,
1616
+ Annotated[StrictFloat, Field(gt=0)],
1617
+ Tuple[
1618
+ Annotated[StrictFloat, Field(gt=0)],
1619
+ Annotated[StrictFloat, Field(gt=0)]
1620
+ ]
1621
+ ] = None,
1622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1623
+ _content_type: Optional[StrictStr] = None,
1624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1626
+ ) -> PlanDto:
1627
+ """Retrieves the current plan of the user
1628
+
1629
+
1630
+ :param _request_timeout: timeout setting for this request. If one
1631
+ number provided, it will be total request
1632
+ timeout. It can also be a pair (tuple) of
1633
+ (connection, read) timeouts.
1634
+ :type _request_timeout: int, tuple(int, int), optional
1635
+ :param _request_auth: set to override the auth_settings for an a single
1636
+ request; this effectively ignores the
1637
+ authentication in the spec for a single request.
1638
+ :type _request_auth: dict, optional
1639
+ :param _content_type: force content-type for the request.
1640
+ :type _content_type: str, Optional
1641
+ :param _headers: set to override the headers for a single
1642
+ request; this effectively ignores the headers
1643
+ in the spec for a single request.
1644
+ :type _headers: dict, optional
1645
+ :param _host_index: set to override the host_index for a single
1646
+ request; this effectively ignores the host_index
1647
+ in the spec for a single request.
1648
+ :type _host_index: int, optional
1649
+ :return: Returns the result object.
1650
+ """ # noqa: E501
1651
+
1652
+ _param = self._subscription_serialize(
1653
+ _request_auth=_request_auth,
1654
+ _content_type=_content_type,
1655
+ _headers=_headers,
1656
+ _host_index=_host_index
1657
+ )
1658
+
1659
+ _response_types_map: Dict[str, Optional[str]] = {
1660
+ '200': "PlanDto",
1661
+ }
1662
+ response_data = self.api_client.call_api(
1663
+ *_param,
1664
+ _request_timeout=_request_timeout
1665
+ )
1666
+ response_data.read()
1667
+ return self.api_client.response_deserialize(
1668
+ response_data=response_data,
1669
+ response_types_map=_response_types_map,
1670
+ ).data
1671
+
1672
+
1673
+ @validate_call
1674
+ def subscription_with_http_info(
1675
+ self,
1676
+ _request_timeout: Union[
1677
+ None,
1678
+ Annotated[StrictFloat, Field(gt=0)],
1679
+ Tuple[
1680
+ Annotated[StrictFloat, Field(gt=0)],
1681
+ Annotated[StrictFloat, Field(gt=0)]
1682
+ ]
1683
+ ] = None,
1684
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1685
+ _content_type: Optional[StrictStr] = None,
1686
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1687
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1688
+ ) -> ApiResponse[PlanDto]:
1689
+ """Retrieves the current plan of the user
1690
+
1691
+
1692
+ :param _request_timeout: timeout setting for this request. If one
1693
+ number provided, it will be total request
1694
+ timeout. It can also be a pair (tuple) of
1695
+ (connection, read) timeouts.
1696
+ :type _request_timeout: int, tuple(int, int), optional
1697
+ :param _request_auth: set to override the auth_settings for an a single
1698
+ request; this effectively ignores the
1699
+ authentication in the spec for a single request.
1700
+ :type _request_auth: dict, optional
1701
+ :param _content_type: force content-type for the request.
1702
+ :type _content_type: str, Optional
1703
+ :param _headers: set to override the headers for a single
1704
+ request; this effectively ignores the headers
1705
+ in the spec for a single request.
1706
+ :type _headers: dict, optional
1707
+ :param _host_index: set to override the host_index for a single
1708
+ request; this effectively ignores the host_index
1709
+ in the spec for a single request.
1710
+ :type _host_index: int, optional
1711
+ :return: Returns the result object.
1712
+ """ # noqa: E501
1713
+
1714
+ _param = self._subscription_serialize(
1715
+ _request_auth=_request_auth,
1716
+ _content_type=_content_type,
1717
+ _headers=_headers,
1718
+ _host_index=_host_index
1719
+ )
1720
+
1721
+ _response_types_map: Dict[str, Optional[str]] = {
1722
+ '200': "PlanDto",
1723
+ }
1724
+ response_data = self.api_client.call_api(
1725
+ *_param,
1726
+ _request_timeout=_request_timeout
1727
+ )
1728
+ response_data.read()
1729
+ return self.api_client.response_deserialize(
1730
+ response_data=response_data,
1731
+ response_types_map=_response_types_map,
1732
+ )
1733
+
1734
+
1735
+ @validate_call
1736
+ def subscription_without_preload_content(
1737
+ self,
1738
+ _request_timeout: Union[
1739
+ None,
1740
+ Annotated[StrictFloat, Field(gt=0)],
1741
+ Tuple[
1742
+ Annotated[StrictFloat, Field(gt=0)],
1743
+ Annotated[StrictFloat, Field(gt=0)]
1744
+ ]
1745
+ ] = None,
1746
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1747
+ _content_type: Optional[StrictStr] = None,
1748
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1749
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1750
+ ) -> RESTResponseType:
1751
+ """Retrieves the current plan of the user
1752
+
1753
+
1754
+ :param _request_timeout: timeout setting for this request. If one
1755
+ number provided, it will be total request
1756
+ timeout. It can also be a pair (tuple) of
1757
+ (connection, read) timeouts.
1758
+ :type _request_timeout: int, tuple(int, int), optional
1759
+ :param _request_auth: set to override the auth_settings for an a single
1760
+ request; this effectively ignores the
1761
+ authentication in the spec for a single request.
1762
+ :type _request_auth: dict, optional
1763
+ :param _content_type: force content-type for the request.
1764
+ :type _content_type: str, Optional
1765
+ :param _headers: set to override the headers for a single
1766
+ request; this effectively ignores the headers
1767
+ in the spec for a single request.
1768
+ :type _headers: dict, optional
1769
+ :param _host_index: set to override the host_index for a single
1770
+ request; this effectively ignores the host_index
1771
+ in the spec for a single request.
1772
+ :type _host_index: int, optional
1773
+ :return: Returns the result object.
1774
+ """ # noqa: E501
1775
+
1776
+ _param = self._subscription_serialize(
1777
+ _request_auth=_request_auth,
1778
+ _content_type=_content_type,
1779
+ _headers=_headers,
1780
+ _host_index=_host_index
1781
+ )
1782
+
1783
+ _response_types_map: Dict[str, Optional[str]] = {
1784
+ '200': "PlanDto",
1785
+ }
1786
+ response_data = self.api_client.call_api(
1787
+ *_param,
1788
+ _request_timeout=_request_timeout
1789
+ )
1790
+ return response_data.response
1791
+
1792
+
1793
+ def _subscription_serialize(
1794
+ self,
1795
+ _request_auth,
1796
+ _content_type,
1797
+ _headers,
1798
+ _host_index,
1799
+ ) -> RequestSerialized:
1800
+
1801
+ _host = None
1802
+
1803
+ _collection_formats: Dict[str, str] = {
1804
+ }
1805
+
1806
+ _path_params: Dict[str, str] = {}
1807
+ _query_params: List[Tuple[str, str]] = []
1808
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1809
+ _form_params: List[Tuple[str, str]] = []
1810
+ _files: Dict[
1811
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1812
+ ] = {}
1813
+ _body_params: Optional[bytes] = None
1814
+
1815
+ # process the path parameters
1816
+ # process the query parameters
1817
+ # process the header parameters
1818
+ # process the form parameters
1819
+ # process the body parameter
1820
+
1821
+
1822
+ # set the HTTP header `Accept`
1823
+ if 'Accept' not in _header_params:
1824
+ _header_params['Accept'] = self.api_client.select_header_accept(
1825
+ [
1826
+ 'application/json'
1827
+ ]
1828
+ )
1829
+
1830
+
1831
+ # authentication setting
1832
+ _auth_settings: List[str] = [
1833
+ 'QAnswer-Api-Key',
1834
+ 'Bearer token'
1835
+ ]
1836
+
1837
+ return self.api_client.param_serialize(
1838
+ method='GET',
1839
+ resource_path='/backend/api/payment/plan',
1840
+ path_params=_path_params,
1841
+ query_params=_query_params,
1842
+ header_params=_header_params,
1843
+ body=_body_params,
1844
+ post_params=_form_params,
1845
+ files=_files,
1846
+ auth_settings=_auth_settings,
1847
+ collection_formats=_collection_formats,
1848
+ _host=_host,
1849
+ _request_auth=_request_auth
1850
+ )
1851
+
1852
+