qanswer_sdk 3.1193.0__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 (346) hide show
  1. qanswer_sdk/__init__.py +366 -0
  2. qanswer_sdk/api/__init__.py +47 -0
  3. qanswer_sdk/api/admin_api.py +11207 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5331 -0
  5. qanswer_sdk/api/ai_assistant_api.py +4377 -0
  6. qanswer_sdk/api/bot_slack_api.py +814 -0
  7. qanswer_sdk/api/chat_completion_api.py +309 -0
  8. qanswer_sdk/api/chatbot_api.py +1091 -0
  9. qanswer_sdk/api/connector_document_api.py +1406 -0
  10. qanswer_sdk/api/connector_e_consilium_api.py +326 -0
  11. qanswer_sdk/api/connector_e_consilium_search_index_connector_api.py +1215 -0
  12. qanswer_sdk/api/connector_google_drive_api.py +1870 -0
  13. qanswer_sdk/api/connector_one_drive_api.py +1559 -0
  14. qanswer_sdk/api/connector_onenote_api.py +1576 -0
  15. qanswer_sdk/api/connector_pinecone_api.py +892 -0
  16. qanswer_sdk/api/connector_publication_office_controller_api.py +1215 -0
  17. qanswer_sdk/api/connector_qn_a_api.py +1538 -0
  18. qanswer_sdk/api/connector_rdf_answer_api.py +1445 -0
  19. qanswer_sdk/api/connector_rdf_api.py +5318 -0
  20. qanswer_sdk/api/connector_sharepoint_api.py +2584 -0
  21. qanswer_sdk/api/connector_websearch_api.py +326 -0
  22. qanswer_sdk/api/connector_website_api.py +2068 -0
  23. qanswer_sdk/api/connectors_api.py +1497 -0
  24. qanswer_sdk/api/connectors_data_api.py +3697 -0
  25. qanswer_sdk/api/conversation_logs_api.py +6668 -0
  26. qanswer_sdk/api/dataset_config_api.py +2178 -0
  27. qanswer_sdk/api/debug_api.py +282 -0
  28. qanswer_sdk/api/llm_api.py +563 -0
  29. qanswer_sdk/api/llm_consumption_controller_api.py +310 -0
  30. qanswer_sdk/api/organizations_teams_api.py +8465 -0
  31. qanswer_sdk/api/payment_api.py +1546 -0
  32. qanswer_sdk/api/socket_api.py +2975 -0
  33. qanswer_sdk/api/speech_to_text_api.py +734 -0
  34. qanswer_sdk/api/tag_api.py +2396 -0
  35. qanswer_sdk/api/task_chat_api.py +2064 -0
  36. qanswer_sdk/api/task_rdf_linker_api.py +4382 -0
  37. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3522 -0
  38. qanswer_sdk/api/task_rdf_text_linker_api.py +1346 -0
  39. qanswer_sdk/api/task_relation_extraction_api.py +2977 -0
  40. qanswer_sdk/api/task_report_copilot_api.py +2980 -0
  41. qanswer_sdk/api/task_search_api.py +1784 -0
  42. qanswer_sdk/api/task_sparql2text_api.py +326 -0
  43. qanswer_sdk/api/task_text2sparql_api.py +908 -0
  44. qanswer_sdk/api/task_text_classification_api.py +914 -0
  45. qanswer_sdk/api/user_api.py +7098 -0
  46. qanswer_sdk/api_client.py +797 -0
  47. qanswer_sdk/api_response.py +21 -0
  48. qanswer_sdk/configuration.py +487 -0
  49. qanswer_sdk/exceptions.py +199 -0
  50. qanswer_sdk/models/__init__.py +307 -0
  51. qanswer_sdk/models/access_pdf_payload_model.py +109 -0
  52. qanswer_sdk/models/add_qn_a_request.py +103 -0
  53. qanswer_sdk/models/add_synonyms.py +91 -0
  54. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  55. qanswer_sdk/models/aggregate.py +97 -0
  56. qanswer_sdk/models/aggregation.py +112 -0
  57. qanswer_sdk/models/aggregations_group.py +102 -0
  58. qanswer_sdk/models/ai_assistant_dto.py +103 -0
  59. qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
  60. qanswer_sdk/models/allowed_file_extensions.py +98 -0
  61. qanswer_sdk/models/api_response.py +87 -0
  62. qanswer_sdk/models/applied_metadata_filter.py +98 -0
  63. qanswer_sdk/models/assistant_message_stop.py +93 -0
  64. qanswer_sdk/models/auth_link_response.py +91 -0
  65. qanswer_sdk/models/autocompletion_config.py +93 -0
  66. qanswer_sdk/models/available_connectors_response.py +99 -0
  67. qanswer_sdk/models/available_embedding_models_response.py +95 -0
  68. qanswer_sdk/models/available_endpoints_response.py +95 -0
  69. qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
  70. qanswer_sdk/models/available_space_quota_for_dataset.py +91 -0
  71. qanswer_sdk/models/available_storage_preference.py +103 -0
  72. qanswer_sdk/models/base_connectors_response.py +89 -0
  73. qanswer_sdk/models/base_conversation_response.py +89 -0
  74. qanswer_sdk/models/base_feedback_response.py +89 -0
  75. qanswer_sdk/models/branding_data.py +87 -0
  76. qanswer_sdk/models/cell.py +89 -0
  77. qanswer_sdk/models/change_password.py +89 -0
  78. qanswer_sdk/models/change_password_admin.py +89 -0
  79. qanswer_sdk/models/change_role.py +96 -0
  80. qanswer_sdk/models/chat_task_settings.py +135 -0
  81. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  82. qanswer_sdk/models/chat_task_update.py +129 -0
  83. qanswer_sdk/models/chatbot_chat_payload.py +115 -0
  84. qanswer_sdk/models/chatbot_conversation_model.py +141 -0
  85. qanswer_sdk/models/chatbot_response.py +119 -0
  86. qanswer_sdk/models/check_mode_response.py +100 -0
  87. qanswer_sdk/models/class_info.py +89 -0
  88. qanswer_sdk/models/connector_model.py +112 -0
  89. qanswer_sdk/models/content_item.py +130 -0
  90. qanswer_sdk/models/conversation_message.py +186 -0
  91. qanswer_sdk/models/conversation_model.py +131 -0
  92. qanswer_sdk/models/conversation_statistics.py +95 -0
  93. qanswer_sdk/models/conversation_update.py +93 -0
  94. qanswer_sdk/models/conversation_users_stats.py +99 -0
  95. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  96. qanswer_sdk/models/coordinates.py +89 -0
  97. qanswer_sdk/models/cost_summary.py +99 -0
  98. qanswer_sdk/models/create_connector_request.py +93 -0
  99. qanswer_sdk/models/create_connector_response.py +95 -0
  100. qanswer_sdk/models/create_pinecone_connector_request.py +95 -0
  101. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +103 -0
  102. qanswer_sdk/models/create_sharepoint_connector_request.py +101 -0
  103. qanswer_sdk/models/dataset_config_request.py +187 -0
  104. qanswer_sdk/models/dataset_default_values_model.py +141 -0
  105. qanswer_sdk/models/dataset_description.py +91 -0
  106. qanswer_sdk/models/dataset_detail.py +133 -0
  107. qanswer_sdk/models/dataset_detail_kg.py +158 -0
  108. qanswer_sdk/models/dataset_schema.py +207 -0
  109. qanswer_sdk/models/dataset_update_object.py +195 -0
  110. qanswer_sdk/models/dataset_users_response.py +87 -0
  111. qanswer_sdk/models/default_prompt.py +106 -0
  112. qanswer_sdk/models/delete_connector_model.py +96 -0
  113. qanswer_sdk/models/delete_connector_request.py +99 -0
  114. qanswer_sdk/models/delete_connectors_response.py +91 -0
  115. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  116. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  117. qanswer_sdk/models/delete_synonym.py +91 -0
  118. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  119. qanswer_sdk/models/diarization_segment.py +93 -0
  120. qanswer_sdk/models/document_content_response.py +91 -0
  121. qanswer_sdk/models/document_content_update_model.py +95 -0
  122. qanswer_sdk/models/document_file_delete_by_connector_model.py +99 -0
  123. qanswer_sdk/models/document_metadata.py +107 -0
  124. qanswer_sdk/models/document_metadata_list_wrapper.py +95 -0
  125. qanswer_sdk/models/document_status_response.py +89 -0
  126. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  127. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  128. qanswer_sdk/models/econsilium_search_index_add_payload.py +105 -0
  129. qanswer_sdk/models/econsilium_search_index_additional_fields.py +101 -0
  130. qanswer_sdk/models/email_request.py +87 -0
  131. qanswer_sdk/models/embedding_endpoint.py +139 -0
  132. qanswer_sdk/models/embedding_endpoint_create.py +137 -0
  133. qanswer_sdk/models/embedding_endpoint_update.py +131 -0
  134. qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
  135. qanswer_sdk/models/embedding_model.py +96 -0
  136. qanswer_sdk/models/entity.py +97 -0
  137. qanswer_sdk/models/entity_linker_response.py +99 -0
  138. qanswer_sdk/models/entity_model.py +99 -0
  139. qanswer_sdk/models/extra_body.py +91 -0
  140. qanswer_sdk/models/extract_hyper_links_payload.py +102 -0
  141. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  142. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  143. qanswer_sdk/models/fact.py +96 -0
  144. qanswer_sdk/models/feedback_model.py +107 -0
  145. qanswer_sdk/models/feedback_update.py +103 -0
  146. qanswer_sdk/models/file_es_meta_data.py +89 -0
  147. qanswer_sdk/models/file_folder_model.py +113 -0
  148. qanswer_sdk/models/file_model.py +134 -0
  149. qanswer_sdk/models/files_by_connector_model.py +89 -0
  150. qanswer_sdk/models/format_return.py +87 -0
  151. qanswer_sdk/models/g_drive_connector_info.py +95 -0
  152. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  153. qanswer_sdk/models/g_drive_download_request.py +101 -0
  154. qanswer_sdk/models/generation_params.py +89 -0
  155. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  156. qanswer_sdk/models/get_conversation_response.py +95 -0
  157. qanswer_sdk/models/guardrail_endpoint.py +121 -0
  158. qanswer_sdk/models/has_lucene_index_result.py +87 -0
  159. qanswer_sdk/models/index_config.py +95 -0
  160. qanswer_sdk/models/install_response.py +89 -0
  161. qanswer_sdk/models/is_enabled_response.py +87 -0
  162. qanswer_sdk/models/is_merging_result.py +87 -0
  163. qanswer_sdk/models/json_nullable_file_failure_reason.py +87 -0
  164. qanswer_sdk/models/json_nullable_source_metadata.py +87 -0
  165. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  166. qanswer_sdk/models/label.py +89 -0
  167. qanswer_sdk/models/labeled_node.py +89 -0
  168. qanswer_sdk/models/link.py +103 -0
  169. qanswer_sdk/models/link_extraction_response.py +97 -0
  170. qanswer_sdk/models/link_result_paginated.py +97 -0
  171. qanswer_sdk/models/linker.py +103 -0
  172. qanswer_sdk/models/linking_result.py +95 -0
  173. qanswer_sdk/models/links.py +99 -0
  174. qanswer_sdk/models/list_chatbot_conversation_response.py +105 -0
  175. qanswer_sdk/models/list_connectors_response.py +95 -0
  176. qanswer_sdk/models/list_conversation_response.py +105 -0
  177. qanswer_sdk/models/list_feedback_response.py +105 -0
  178. qanswer_sdk/models/list_files_connector_response.py +101 -0
  179. qanswer_sdk/models/list_socket_events.py +95 -0
  180. qanswer_sdk/models/list_synonyms_model.py +89 -0
  181. qanswer_sdk/models/llm_context_ranges_response.py +93 -0
  182. qanswer_sdk/models/llm_cost.py +108 -0
  183. qanswer_sdk/models/llm_details.py +111 -0
  184. qanswer_sdk/models/llm_endpoint.py +167 -0
  185. qanswer_sdk/models/llm_endpoint_create.py +165 -0
  186. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  187. qanswer_sdk/models/llm_endpoint_update.py +163 -0
  188. qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
  189. qanswer_sdk/models/login_request.py +89 -0
  190. qanswer_sdk/models/logo.py +89 -0
  191. qanswer_sdk/models/lucene_index_request_result.py +87 -0
  192. qanswer_sdk/models/merge_request_result.py +87 -0
  193. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  194. qanswer_sdk/models/modify_connector_request.py +111 -0
  195. qanswer_sdk/models/o_auth_service.py +89 -0
  196. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  197. qanswer_sdk/models/one_drive_download_request.py +101 -0
  198. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  199. qanswer_sdk/models/one_note_download_request.py +101 -0
  200. qanswer_sdk/models/organization.py +93 -0
  201. qanswer_sdk/models/organization_creation.py +91 -0
  202. qanswer_sdk/models/organization_filter.py +87 -0
  203. qanswer_sdk/models/organization_shared.py +105 -0
  204. qanswer_sdk/models/page_organization.py +123 -0
  205. qanswer_sdk/models/page_team_with_count.py +123 -0
  206. qanswer_sdk/models/pageable.py +92 -0
  207. qanswer_sdk/models/pageable_object.py +101 -0
  208. qanswer_sdk/models/password.py +89 -0
  209. qanswer_sdk/models/pinecone_index_model.py +91 -0
  210. qanswer_sdk/models/plan.py +123 -0
  211. qanswer_sdk/models/predicted_class.py +89 -0
  212. qanswer_sdk/models/prompt_token_count_details.py +99 -0
  213. qanswer_sdk/models/provider.py +87 -0
  214. qanswer_sdk/models/publication_add_payload.py +103 -0
  215. qanswer_sdk/models/publication_file_metadata.py +105 -0
  216. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  217. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  218. qanswer_sdk/models/qa_context.py +129 -0
  219. qanswer_sdk/models/qa_contexts.py +116 -0
  220. qanswer_sdk/models/qa_metadata_payload.py +123 -0
  221. qanswer_sdk/models/qa_table.py +102 -0
  222. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  223. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  224. qanswer_sdk/models/question_completion.py +89 -0
  225. qanswer_sdk/models/rag_params.py +89 -0
  226. qanswer_sdk/models/rag_payload.py +154 -0
  227. qanswer_sdk/models/rag_response.py +150 -0
  228. qanswer_sdk/models/ranker_config.py +93 -0
  229. qanswer_sdk/models/reference_model.py +95 -0
  230. qanswer_sdk/models/refresh_token_request.py +87 -0
  231. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  232. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  233. qanswer_sdk/models/relation_extraction_configuration.py +105 -0
  234. qanswer_sdk/models/relation_extraction_payload.py +111 -0
  235. qanswer_sdk/models/relation_extraction_result.py +101 -0
  236. qanswer_sdk/models/relation_extraction_schema.py +101 -0
  237. qanswer_sdk/models/relation_extraction_task_settings.py +123 -0
  238. qanswer_sdk/models/relation_extraction_task_settings_update_payload.py +95 -0
  239. qanswer_sdk/models/relation_extraction_task_update.py +117 -0
  240. qanswer_sdk/models/relation_extraction_template_payload.py +97 -0
  241. qanswer_sdk/models/relation_extraction_template_update_payload.py +95 -0
  242. qanswer_sdk/models/relation_model.py +89 -0
  243. qanswer_sdk/models/report_copilot_create_payload.py +103 -0
  244. qanswer_sdk/models/report_copilot_export_template_as_docx_payload_simplified.py +91 -0
  245. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  246. qanswer_sdk/models/report_copilot_generation_from_slots_response.py +95 -0
  247. qanswer_sdk/models/report_copilot_refinement_payload.py +104 -0
  248. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  249. qanswer_sdk/models/report_copilot_slot_task_settings.py +125 -0
  250. qanswer_sdk/models/report_copilot_slot_task_update.py +119 -0
  251. qanswer_sdk/models/report_copilot_task_settings.py +123 -0
  252. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  253. qanswer_sdk/models/report_copilot_task_update.py +117 -0
  254. qanswer_sdk/models/report_copilot_template.py +107 -0
  255. qanswer_sdk/models/report_copilot_template_simplified.py +95 -0
  256. qanswer_sdk/models/report_copilot_update_payload.py +101 -0
  257. qanswer_sdk/models/reset_password.py +87 -0
  258. qanswer_sdk/models/response_audit_model.py +99 -0
  259. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  260. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  261. qanswer_sdk/models/retry_params.py +89 -0
  262. qanswer_sdk/models/role.py +99 -0
  263. qanswer_sdk/models/search_document_response.py +105 -0
  264. qanswer_sdk/models/search_index_payload.py +114 -0
  265. qanswer_sdk/models/search_metadata_filter.py +89 -0
  266. qanswer_sdk/models/search_payload.py +124 -0
  267. qanswer_sdk/models/search_response.py +113 -0
  268. qanswer_sdk/models/search_task_settings.py +131 -0
  269. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  270. qanswer_sdk/models/search_task_update.py +123 -0
  271. qanswer_sdk/models/set_logo1_request.py +87 -0
  272. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  273. qanswer_sdk/models/share_point_download_request.py +101 -0
  274. qanswer_sdk/models/shared_organization_access.py +109 -0
  275. qanswer_sdk/models/shared_team_access.py +107 -0
  276. qanswer_sdk/models/shared_user.py +99 -0
  277. qanswer_sdk/models/sign_up_request.py +96 -0
  278. qanswer_sdk/models/signout_request.py +87 -0
  279. qanswer_sdk/models/slot.py +138 -0
  280. qanswer_sdk/models/slot_in_prompt.py +91 -0
  281. qanswer_sdk/models/slot_update.py +138 -0
  282. qanswer_sdk/models/socket_conversation_message.py +207 -0
  283. qanswer_sdk/models/socket_data_extraction.py +109 -0
  284. qanswer_sdk/models/socket_file_metadata.py +172 -0
  285. qanswer_sdk/models/socket_join_conversation.py +97 -0
  286. qanswer_sdk/models/socket_join_dataset.py +93 -0
  287. qanswer_sdk/models/socket_report_continuation_response.py +106 -0
  288. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +120 -0
  289. qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
  290. qanswer_sdk/models/socket_speech2_text_response.py +99 -0
  291. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  292. qanswer_sdk/models/sort_object.py +91 -0
  293. qanswer_sdk/models/source.py +125 -0
  294. qanswer_sdk/models/sparql2_text_payload.py +97 -0
  295. qanswer_sdk/models/speech2_text_response.py +87 -0
  296. qanswer_sdk/models/speech2_text_with_diarization_response.py +106 -0
  297. qanswer_sdk/models/stat_per_date.py +89 -0
  298. qanswer_sdk/models/status_response.py +89 -0
  299. qanswer_sdk/models/subject_model.py +91 -0
  300. qanswer_sdk/models/suggestion_list_response.py +87 -0
  301. qanswer_sdk/models/summa_server.py +101 -0
  302. qanswer_sdk/models/tag_payload.py +87 -0
  303. qanswer_sdk/models/tag_qa_list_payload.py +100 -0
  304. qanswer_sdk/models/tag_qa_payload.py +91 -0
  305. qanswer_sdk/models/team.py +93 -0
  306. qanswer_sdk/models/team_creation.py +89 -0
  307. qanswer_sdk/models/team_filter.py +91 -0
  308. qanswer_sdk/models/team_shared.py +105 -0
  309. qanswer_sdk/models/team_with_count.py +95 -0
  310. qanswer_sdk/models/terms_bucket.py +89 -0
  311. qanswer_sdk/models/text2_sparql_payload.py +156 -0
  312. qanswer_sdk/models/text2_sparql_task_settings.py +123 -0
  313. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  314. qanswer_sdk/models/text2_sparql_task_update.py +117 -0
  315. qanswer_sdk/models/text_classification_payload.py +99 -0
  316. qanswer_sdk/models/text_classification_response.py +87 -0
  317. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  318. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  319. qanswer_sdk/models/total_stat.py +96 -0
  320. qanswer_sdk/models/ui_mappings.py +141 -0
  321. qanswer_sdk/models/update_metadata_model.py +95 -0
  322. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  323. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  324. qanswer_sdk/models/update_synonyms.py +93 -0
  325. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  326. qanswer_sdk/models/uri_mapping.py +89 -0
  327. qanswer_sdk/models/user.py +91 -0
  328. qanswer_sdk/models/user_chatbot_setting_payload.py +106 -0
  329. qanswer_sdk/models/user_chatbot_setting_response.py +105 -0
  330. qanswer_sdk/models/user_dataset.py +144 -0
  331. qanswer_sdk/models/user_dataset_api_key.py +116 -0
  332. qanswer_sdk/models/user_filter.py +101 -0
  333. qanswer_sdk/models/user_identity_availability.py +87 -0
  334. qanswer_sdk/models/user_list_dto.py +101 -0
  335. qanswer_sdk/models/user_oauth_token.py +96 -0
  336. qanswer_sdk/models/user_profile.py +184 -0
  337. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  338. qanswer_sdk/models/user_profile_paginated.py +101 -0
  339. qanswer_sdk/models/website_add_payload.py +98 -0
  340. qanswer_sdk/models/website_connector_settings.py +160 -0
  341. qanswer_sdk/models/widget_configs.py +105 -0
  342. qanswer_sdk/py.typed +0 -0
  343. qanswer_sdk/rest.py +257 -0
  344. qanswer_sdk-3.1193.0.dist-info/METADATA +125 -0
  345. qanswer_sdk-3.1193.0.dist-info/RECORD +346 -0
  346. qanswer_sdk-3.1193.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,1546 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.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 StrictInt, StrictStr, field_validator
20
+ from typing import List
21
+ from qanswer_sdk.models.plan import Plan
22
+
23
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
24
+ from qanswer_sdk.api_response import ApiResponse
25
+ from qanswer_sdk.rest import RESTResponseType
26
+
27
+
28
+ class PaymentApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+
41
+ @validate_call
42
+ def create_checkout_link(
43
+ self,
44
+ pricing_plan: StrictStr,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> str:
58
+ """Create a stripe checkout to make a payment
59
+
60
+
61
+ :param pricing_plan: (required)
62
+ :type pricing_plan: str
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._create_checkout_link_serialize(
86
+ pricing_plan=pricing_plan,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ '200': "str",
95
+ }
96
+ response_data = self.api_client.call_api(
97
+ *_param,
98
+ _request_timeout=_request_timeout
99
+ )
100
+ response_data.read()
101
+ return self.api_client.response_deserialize(
102
+ response_data=response_data,
103
+ response_types_map=_response_types_map,
104
+ ).data
105
+
106
+
107
+ @validate_call
108
+ def create_checkout_link_with_http_info(
109
+ self,
110
+ pricing_plan: StrictStr,
111
+ _request_timeout: Union[
112
+ None,
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Tuple[
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Annotated[StrictFloat, Field(gt=0)]
117
+ ]
118
+ ] = None,
119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
120
+ _content_type: Optional[StrictStr] = None,
121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
+ ) -> ApiResponse[str]:
124
+ """Create a stripe checkout to make a payment
125
+
126
+
127
+ :param pricing_plan: (required)
128
+ :type pricing_plan: str
129
+ :param _request_timeout: timeout setting for this request. If one
130
+ number provided, it will be total request
131
+ timeout. It can also be a pair (tuple) of
132
+ (connection, read) timeouts.
133
+ :type _request_timeout: int, tuple(int, int), optional
134
+ :param _request_auth: set to override the auth_settings for an a single
135
+ request; this effectively ignores the
136
+ authentication in the spec for a single request.
137
+ :type _request_auth: dict, optional
138
+ :param _content_type: force content-type for the request.
139
+ :type _content_type: str, Optional
140
+ :param _headers: set to override the headers for a single
141
+ request; this effectively ignores the headers
142
+ in the spec for a single request.
143
+ :type _headers: dict, optional
144
+ :param _host_index: set to override the host_index for a single
145
+ request; this effectively ignores the host_index
146
+ in the spec for a single request.
147
+ :type _host_index: int, optional
148
+ :return: Returns the result object.
149
+ """ # noqa: E501
150
+
151
+ _param = self._create_checkout_link_serialize(
152
+ pricing_plan=pricing_plan,
153
+ _request_auth=_request_auth,
154
+ _content_type=_content_type,
155
+ _headers=_headers,
156
+ _host_index=_host_index
157
+ )
158
+
159
+ _response_types_map: Dict[str, Optional[str]] = {
160
+ '200': "str",
161
+ }
162
+ response_data = self.api_client.call_api(
163
+ *_param,
164
+ _request_timeout=_request_timeout
165
+ )
166
+ response_data.read()
167
+ return self.api_client.response_deserialize(
168
+ response_data=response_data,
169
+ response_types_map=_response_types_map,
170
+ )
171
+
172
+
173
+ @validate_call
174
+ def create_checkout_link_without_preload_content(
175
+ self,
176
+ pricing_plan: StrictStr,
177
+ _request_timeout: Union[
178
+ None,
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Tuple[
181
+ Annotated[StrictFloat, Field(gt=0)],
182
+ Annotated[StrictFloat, Field(gt=0)]
183
+ ]
184
+ ] = None,
185
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
186
+ _content_type: Optional[StrictStr] = None,
187
+ _headers: Optional[Dict[StrictStr, Any]] = None,
188
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
189
+ ) -> RESTResponseType:
190
+ """Create a stripe checkout to make a payment
191
+
192
+
193
+ :param pricing_plan: (required)
194
+ :type pricing_plan: str
195
+ :param _request_timeout: timeout setting for this request. If one
196
+ number provided, it will be total request
197
+ timeout. It can also be a pair (tuple) of
198
+ (connection, read) timeouts.
199
+ :type _request_timeout: int, tuple(int, int), optional
200
+ :param _request_auth: set to override the auth_settings for an a single
201
+ request; this effectively ignores the
202
+ authentication in the spec for a single request.
203
+ :type _request_auth: dict, optional
204
+ :param _content_type: force content-type for the request.
205
+ :type _content_type: str, Optional
206
+ :param _headers: set to override the headers for a single
207
+ request; this effectively ignores the headers
208
+ in the spec for a single request.
209
+ :type _headers: dict, optional
210
+ :param _host_index: set to override the host_index for a single
211
+ request; this effectively ignores the host_index
212
+ in the spec for a single request.
213
+ :type _host_index: int, optional
214
+ :return: Returns the result object.
215
+ """ # noqa: E501
216
+
217
+ _param = self._create_checkout_link_serialize(
218
+ pricing_plan=pricing_plan,
219
+ _request_auth=_request_auth,
220
+ _content_type=_content_type,
221
+ _headers=_headers,
222
+ _host_index=_host_index
223
+ )
224
+
225
+ _response_types_map: Dict[str, Optional[str]] = {
226
+ '200': "str",
227
+ }
228
+ response_data = self.api_client.call_api(
229
+ *_param,
230
+ _request_timeout=_request_timeout
231
+ )
232
+ return response_data.response
233
+
234
+
235
+ def _create_checkout_link_serialize(
236
+ self,
237
+ pricing_plan,
238
+ _request_auth,
239
+ _content_type,
240
+ _headers,
241
+ _host_index,
242
+ ) -> RequestSerialized:
243
+
244
+ _host = None
245
+
246
+ _collection_formats: Dict[str, str] = {
247
+ }
248
+
249
+ _path_params: Dict[str, str] = {}
250
+ _query_params: List[Tuple[str, str]] = []
251
+ _header_params: Dict[str, Optional[str]] = _headers or {}
252
+ _form_params: List[Tuple[str, str]] = []
253
+ _files: Dict[
254
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
255
+ ] = {}
256
+ _body_params: Optional[bytes] = None
257
+
258
+ # process the path parameters
259
+ # process the query parameters
260
+ if pricing_plan is not None:
261
+
262
+ _query_params.append(('pricingPlan', pricing_plan))
263
+
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+
268
+
269
+ # set the HTTP header `Accept`
270
+ if 'Accept' not in _header_params:
271
+ _header_params['Accept'] = self.api_client.select_header_accept(
272
+ [
273
+ '*/*'
274
+ ]
275
+ )
276
+
277
+
278
+ # authentication setting
279
+ _auth_settings: List[str] = [
280
+ 'QAnswer-Api-Key',
281
+ 'Bearer'
282
+ ]
283
+
284
+ return self.api_client.param_serialize(
285
+ method='POST',
286
+ resource_path='/api/payment/checkout-subscription',
287
+ path_params=_path_params,
288
+ query_params=_query_params,
289
+ header_params=_header_params,
290
+ body=_body_params,
291
+ post_params=_form_params,
292
+ files=_files,
293
+ auth_settings=_auth_settings,
294
+ collection_formats=_collection_formats,
295
+ _host=_host,
296
+ _request_auth=_request_auth
297
+ )
298
+
299
+
300
+
301
+
302
+ @validate_call
303
+ def create_checkout_link_data(
304
+ self,
305
+ number_data_package: StrictInt,
306
+ currency: StrictStr,
307
+ _request_timeout: Union[
308
+ None,
309
+ Annotated[StrictFloat, Field(gt=0)],
310
+ Tuple[
311
+ Annotated[StrictFloat, Field(gt=0)],
312
+ Annotated[StrictFloat, Field(gt=0)]
313
+ ]
314
+ ] = None,
315
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
316
+ _content_type: Optional[StrictStr] = None,
317
+ _headers: Optional[Dict[StrictStr, Any]] = None,
318
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
319
+ ) -> str:
320
+ """Create a stripe checkout to add data packages
321
+
322
+
323
+ :param number_data_package: (required)
324
+ :type number_data_package: int
325
+ :param currency: (required)
326
+ :type currency: str
327
+ :param _request_timeout: timeout setting for this request. If one
328
+ number provided, it will be total request
329
+ timeout. It can also be a pair (tuple) of
330
+ (connection, read) timeouts.
331
+ :type _request_timeout: int, tuple(int, int), optional
332
+ :param _request_auth: set to override the auth_settings for an a single
333
+ request; this effectively ignores the
334
+ authentication in the spec for a single request.
335
+ :type _request_auth: dict, optional
336
+ :param _content_type: force content-type for the request.
337
+ :type _content_type: str, Optional
338
+ :param _headers: set to override the headers for a single
339
+ request; this effectively ignores the headers
340
+ in the spec for a single request.
341
+ :type _headers: dict, optional
342
+ :param _host_index: set to override the host_index for a single
343
+ request; this effectively ignores the host_index
344
+ in the spec for a single request.
345
+ :type _host_index: int, optional
346
+ :return: Returns the result object.
347
+ """ # noqa: E501
348
+
349
+ _param = self._create_checkout_link_data_serialize(
350
+ number_data_package=number_data_package,
351
+ currency=currency,
352
+ _request_auth=_request_auth,
353
+ _content_type=_content_type,
354
+ _headers=_headers,
355
+ _host_index=_host_index
356
+ )
357
+
358
+ _response_types_map: Dict[str, Optional[str]] = {
359
+ '200': "str",
360
+ }
361
+ response_data = self.api_client.call_api(
362
+ *_param,
363
+ _request_timeout=_request_timeout
364
+ )
365
+ response_data.read()
366
+ return self.api_client.response_deserialize(
367
+ response_data=response_data,
368
+ response_types_map=_response_types_map,
369
+ ).data
370
+
371
+
372
+ @validate_call
373
+ def create_checkout_link_data_with_http_info(
374
+ self,
375
+ number_data_package: StrictInt,
376
+ currency: StrictStr,
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Annotated[StrictFloat, Field(gt=0)]
383
+ ]
384
+ ] = None,
385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
386
+ _content_type: Optional[StrictStr] = None,
387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
389
+ ) -> ApiResponse[str]:
390
+ """Create a stripe checkout to add data packages
391
+
392
+
393
+ :param number_data_package: (required)
394
+ :type number_data_package: int
395
+ :param currency: (required)
396
+ :type currency: str
397
+ :param _request_timeout: timeout setting for this request. If one
398
+ number provided, it will be total request
399
+ timeout. It can also be a pair (tuple) of
400
+ (connection, read) timeouts.
401
+ :type _request_timeout: int, tuple(int, int), optional
402
+ :param _request_auth: set to override the auth_settings for an a single
403
+ request; this effectively ignores the
404
+ authentication in the spec for a single request.
405
+ :type _request_auth: dict, optional
406
+ :param _content_type: force content-type for the request.
407
+ :type _content_type: str, Optional
408
+ :param _headers: set to override the headers for a single
409
+ request; this effectively ignores the headers
410
+ in the spec for a single request.
411
+ :type _headers: dict, optional
412
+ :param _host_index: set to override the host_index for a single
413
+ request; this effectively ignores the host_index
414
+ in the spec for a single request.
415
+ :type _host_index: int, optional
416
+ :return: Returns the result object.
417
+ """ # noqa: E501
418
+
419
+ _param = self._create_checkout_link_data_serialize(
420
+ number_data_package=number_data_package,
421
+ currency=currency,
422
+ _request_auth=_request_auth,
423
+ _content_type=_content_type,
424
+ _headers=_headers,
425
+ _host_index=_host_index
426
+ )
427
+
428
+ _response_types_map: Dict[str, Optional[str]] = {
429
+ '200': "str",
430
+ }
431
+ response_data = self.api_client.call_api(
432
+ *_param,
433
+ _request_timeout=_request_timeout
434
+ )
435
+ response_data.read()
436
+ return self.api_client.response_deserialize(
437
+ response_data=response_data,
438
+ response_types_map=_response_types_map,
439
+ )
440
+
441
+
442
+ @validate_call
443
+ def create_checkout_link_data_without_preload_content(
444
+ self,
445
+ number_data_package: StrictInt,
446
+ currency: StrictStr,
447
+ _request_timeout: Union[
448
+ None,
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Tuple[
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Annotated[StrictFloat, Field(gt=0)]
453
+ ]
454
+ ] = None,
455
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
456
+ _content_type: Optional[StrictStr] = None,
457
+ _headers: Optional[Dict[StrictStr, Any]] = None,
458
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
459
+ ) -> RESTResponseType:
460
+ """Create a stripe checkout to add data packages
461
+
462
+
463
+ :param number_data_package: (required)
464
+ :type number_data_package: int
465
+ :param currency: (required)
466
+ :type currency: str
467
+ :param _request_timeout: timeout setting for this request. If one
468
+ number provided, it will be total request
469
+ timeout. It can also be a pair (tuple) of
470
+ (connection, read) timeouts.
471
+ :type _request_timeout: int, tuple(int, int), optional
472
+ :param _request_auth: set to override the auth_settings for an a single
473
+ request; this effectively ignores the
474
+ authentication in the spec for a single request.
475
+ :type _request_auth: dict, optional
476
+ :param _content_type: force content-type for the request.
477
+ :type _content_type: str, Optional
478
+ :param _headers: set to override the headers for a single
479
+ request; this effectively ignores the headers
480
+ in the spec for a single request.
481
+ :type _headers: dict, optional
482
+ :param _host_index: set to override the host_index for a single
483
+ request; this effectively ignores the host_index
484
+ in the spec for a single request.
485
+ :type _host_index: int, optional
486
+ :return: Returns the result object.
487
+ """ # noqa: E501
488
+
489
+ _param = self._create_checkout_link_data_serialize(
490
+ number_data_package=number_data_package,
491
+ currency=currency,
492
+ _request_auth=_request_auth,
493
+ _content_type=_content_type,
494
+ _headers=_headers,
495
+ _host_index=_host_index
496
+ )
497
+
498
+ _response_types_map: Dict[str, Optional[str]] = {
499
+ '200': "str",
500
+ }
501
+ response_data = self.api_client.call_api(
502
+ *_param,
503
+ _request_timeout=_request_timeout
504
+ )
505
+ return response_data.response
506
+
507
+
508
+ def _create_checkout_link_data_serialize(
509
+ self,
510
+ number_data_package,
511
+ currency,
512
+ _request_auth,
513
+ _content_type,
514
+ _headers,
515
+ _host_index,
516
+ ) -> RequestSerialized:
517
+
518
+ _host = None
519
+
520
+ _collection_formats: Dict[str, str] = {
521
+ }
522
+
523
+ _path_params: Dict[str, str] = {}
524
+ _query_params: List[Tuple[str, str]] = []
525
+ _header_params: Dict[str, Optional[str]] = _headers or {}
526
+ _form_params: List[Tuple[str, str]] = []
527
+ _files: Dict[
528
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
529
+ ] = {}
530
+ _body_params: Optional[bytes] = None
531
+
532
+ # process the path parameters
533
+ # process the query parameters
534
+ if number_data_package is not None:
535
+
536
+ _query_params.append(('numberDataPackage', number_data_package))
537
+
538
+ if currency is not None:
539
+
540
+ _query_params.append(('currency', currency))
541
+
542
+ # process the header parameters
543
+ # process the form parameters
544
+ # process the body parameter
545
+
546
+
547
+ # set the HTTP header `Accept`
548
+ if 'Accept' not in _header_params:
549
+ _header_params['Accept'] = self.api_client.select_header_accept(
550
+ [
551
+ '*/*'
552
+ ]
553
+ )
554
+
555
+
556
+ # authentication setting
557
+ _auth_settings: List[str] = [
558
+ 'QAnswer-Api-Key',
559
+ 'Bearer'
560
+ ]
561
+
562
+ return self.api_client.param_serialize(
563
+ method='POST',
564
+ resource_path='/api/payment/checkout-data',
565
+ path_params=_path_params,
566
+ query_params=_query_params,
567
+ header_params=_header_params,
568
+ body=_body_params,
569
+ post_params=_form_params,
570
+ files=_files,
571
+ auth_settings=_auth_settings,
572
+ collection_formats=_collection_formats,
573
+ _host=_host,
574
+ _request_auth=_request_auth
575
+ )
576
+
577
+
578
+
579
+
580
+ @validate_call
581
+ def create_checkout_session(
582
+ self,
583
+ _request_timeout: Union[
584
+ None,
585
+ Annotated[StrictFloat, Field(gt=0)],
586
+ Tuple[
587
+ Annotated[StrictFloat, Field(gt=0)],
588
+ Annotated[StrictFloat, Field(gt=0)]
589
+ ]
590
+ ] = None,
591
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
592
+ _content_type: Optional[StrictStr] = None,
593
+ _headers: Optional[Dict[StrictStr, Any]] = None,
594
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
595
+ ) -> str:
596
+ """Create a stripe session to manage the payment
597
+
598
+
599
+ :param _request_timeout: timeout setting for this request. If one
600
+ number provided, it will be total request
601
+ timeout. It can also be a pair (tuple) of
602
+ (connection, read) timeouts.
603
+ :type _request_timeout: int, tuple(int, int), optional
604
+ :param _request_auth: set to override the auth_settings for an a single
605
+ request; this effectively ignores the
606
+ authentication in the spec for a single request.
607
+ :type _request_auth: dict, optional
608
+ :param _content_type: force content-type for the request.
609
+ :type _content_type: str, Optional
610
+ :param _headers: set to override the headers for a single
611
+ request; this effectively ignores the headers
612
+ in the spec for a single request.
613
+ :type _headers: dict, optional
614
+ :param _host_index: set to override the host_index for a single
615
+ request; this effectively ignores the host_index
616
+ in the spec for a single request.
617
+ :type _host_index: int, optional
618
+ :return: Returns the result object.
619
+ """ # noqa: E501
620
+
621
+ _param = self._create_checkout_session_serialize(
622
+ _request_auth=_request_auth,
623
+ _content_type=_content_type,
624
+ _headers=_headers,
625
+ _host_index=_host_index
626
+ )
627
+
628
+ _response_types_map: Dict[str, Optional[str]] = {
629
+ '200': "str",
630
+ }
631
+ response_data = self.api_client.call_api(
632
+ *_param,
633
+ _request_timeout=_request_timeout
634
+ )
635
+ response_data.read()
636
+ return self.api_client.response_deserialize(
637
+ response_data=response_data,
638
+ response_types_map=_response_types_map,
639
+ ).data
640
+
641
+
642
+ @validate_call
643
+ def create_checkout_session_with_http_info(
644
+ self,
645
+ _request_timeout: Union[
646
+ None,
647
+ Annotated[StrictFloat, Field(gt=0)],
648
+ Tuple[
649
+ Annotated[StrictFloat, Field(gt=0)],
650
+ Annotated[StrictFloat, Field(gt=0)]
651
+ ]
652
+ ] = None,
653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
654
+ _content_type: Optional[StrictStr] = None,
655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
657
+ ) -> ApiResponse[str]:
658
+ """Create a stripe session to manage the payment
659
+
660
+
661
+ :param _request_timeout: timeout setting for this request. If one
662
+ number provided, it will be total request
663
+ timeout. It can also be a pair (tuple) of
664
+ (connection, read) timeouts.
665
+ :type _request_timeout: int, tuple(int, int), optional
666
+ :param _request_auth: set to override the auth_settings for an a single
667
+ request; this effectively ignores the
668
+ authentication in the spec for a single request.
669
+ :type _request_auth: dict, optional
670
+ :param _content_type: force content-type for the request.
671
+ :type _content_type: str, Optional
672
+ :param _headers: set to override the headers for a single
673
+ request; this effectively ignores the headers
674
+ in the spec for a single request.
675
+ :type _headers: dict, optional
676
+ :param _host_index: set to override the host_index for a single
677
+ request; this effectively ignores the host_index
678
+ in the spec for a single request.
679
+ :type _host_index: int, optional
680
+ :return: Returns the result object.
681
+ """ # noqa: E501
682
+
683
+ _param = self._create_checkout_session_serialize(
684
+ _request_auth=_request_auth,
685
+ _content_type=_content_type,
686
+ _headers=_headers,
687
+ _host_index=_host_index
688
+ )
689
+
690
+ _response_types_map: Dict[str, Optional[str]] = {
691
+ '200': "str",
692
+ }
693
+ response_data = self.api_client.call_api(
694
+ *_param,
695
+ _request_timeout=_request_timeout
696
+ )
697
+ response_data.read()
698
+ return self.api_client.response_deserialize(
699
+ response_data=response_data,
700
+ response_types_map=_response_types_map,
701
+ )
702
+
703
+
704
+ @validate_call
705
+ def create_checkout_session_without_preload_content(
706
+ self,
707
+ _request_timeout: Union[
708
+ None,
709
+ Annotated[StrictFloat, Field(gt=0)],
710
+ Tuple[
711
+ Annotated[StrictFloat, Field(gt=0)],
712
+ Annotated[StrictFloat, Field(gt=0)]
713
+ ]
714
+ ] = None,
715
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
716
+ _content_type: Optional[StrictStr] = None,
717
+ _headers: Optional[Dict[StrictStr, Any]] = None,
718
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
719
+ ) -> RESTResponseType:
720
+ """Create a stripe session to manage the payment
721
+
722
+
723
+ :param _request_timeout: timeout setting for this request. If one
724
+ number provided, it will be total request
725
+ timeout. It can also be a pair (tuple) of
726
+ (connection, read) timeouts.
727
+ :type _request_timeout: int, tuple(int, int), optional
728
+ :param _request_auth: set to override the auth_settings for an a single
729
+ request; this effectively ignores the
730
+ authentication in the spec for a single request.
731
+ :type _request_auth: dict, optional
732
+ :param _content_type: force content-type for the request.
733
+ :type _content_type: str, Optional
734
+ :param _headers: set to override the headers for a single
735
+ request; this effectively ignores the headers
736
+ in the spec for a single request.
737
+ :type _headers: dict, optional
738
+ :param _host_index: set to override the host_index for a single
739
+ request; this effectively ignores the host_index
740
+ in the spec for a single request.
741
+ :type _host_index: int, optional
742
+ :return: Returns the result object.
743
+ """ # noqa: E501
744
+
745
+ _param = self._create_checkout_session_serialize(
746
+ _request_auth=_request_auth,
747
+ _content_type=_content_type,
748
+ _headers=_headers,
749
+ _host_index=_host_index
750
+ )
751
+
752
+ _response_types_map: Dict[str, Optional[str]] = {
753
+ '200': "str",
754
+ }
755
+ response_data = self.api_client.call_api(
756
+ *_param,
757
+ _request_timeout=_request_timeout
758
+ )
759
+ return response_data.response
760
+
761
+
762
+ def _create_checkout_session_serialize(
763
+ self,
764
+ _request_auth,
765
+ _content_type,
766
+ _headers,
767
+ _host_index,
768
+ ) -> RequestSerialized:
769
+
770
+ _host = None
771
+
772
+ _collection_formats: Dict[str, str] = {
773
+ }
774
+
775
+ _path_params: Dict[str, str] = {}
776
+ _query_params: List[Tuple[str, str]] = []
777
+ _header_params: Dict[str, Optional[str]] = _headers or {}
778
+ _form_params: List[Tuple[str, str]] = []
779
+ _files: Dict[
780
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
781
+ ] = {}
782
+ _body_params: Optional[bytes] = None
783
+
784
+ # process the path parameters
785
+ # process the query parameters
786
+ # process the header parameters
787
+ # process the form parameters
788
+ # process the body parameter
789
+
790
+
791
+ # set the HTTP header `Accept`
792
+ if 'Accept' not in _header_params:
793
+ _header_params['Accept'] = self.api_client.select_header_accept(
794
+ [
795
+ '*/*'
796
+ ]
797
+ )
798
+
799
+
800
+ # authentication setting
801
+ _auth_settings: List[str] = [
802
+ 'QAnswer-Api-Key',
803
+ 'Bearer'
804
+ ]
805
+
806
+ return self.api_client.param_serialize(
807
+ method='POST',
808
+ resource_path='/api/payment/manage-subscription-session',
809
+ path_params=_path_params,
810
+ query_params=_query_params,
811
+ header_params=_header_params,
812
+ body=_body_params,
813
+ post_params=_form_params,
814
+ files=_files,
815
+ auth_settings=_auth_settings,
816
+ collection_formats=_collection_formats,
817
+ _host=_host,
818
+ _request_auth=_request_auth
819
+ )
820
+
821
+
822
+
823
+
824
+ @validate_call
825
+ def post_events_webhook(
826
+ self,
827
+ _request_timeout: Union[
828
+ None,
829
+ Annotated[StrictFloat, Field(gt=0)],
830
+ Tuple[
831
+ Annotated[StrictFloat, Field(gt=0)],
832
+ Annotated[StrictFloat, Field(gt=0)]
833
+ ]
834
+ ] = None,
835
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
836
+ _content_type: Optional[StrictStr] = None,
837
+ _headers: Optional[Dict[StrictStr, Any]] = None,
838
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
839
+ ) -> None:
840
+ """Webhook for stripe service
841
+
842
+
843
+ :param _request_timeout: timeout setting for this request. If one
844
+ number provided, it will be total request
845
+ timeout. It can also be a pair (tuple) of
846
+ (connection, read) timeouts.
847
+ :type _request_timeout: int, tuple(int, int), optional
848
+ :param _request_auth: set to override the auth_settings for an a single
849
+ request; this effectively ignores the
850
+ authentication in the spec for a single request.
851
+ :type _request_auth: dict, optional
852
+ :param _content_type: force content-type for the request.
853
+ :type _content_type: str, Optional
854
+ :param _headers: set to override the headers for a single
855
+ request; this effectively ignores the headers
856
+ in the spec for a single request.
857
+ :type _headers: dict, optional
858
+ :param _host_index: set to override the host_index for a single
859
+ request; this effectively ignores the host_index
860
+ in the spec for a single request.
861
+ :type _host_index: int, optional
862
+ :return: Returns the result object.
863
+ """ # noqa: E501
864
+
865
+ _param = self._post_events_webhook_serialize(
866
+ _request_auth=_request_auth,
867
+ _content_type=_content_type,
868
+ _headers=_headers,
869
+ _host_index=_host_index
870
+ )
871
+
872
+ _response_types_map: Dict[str, Optional[str]] = {
873
+ '200': None,
874
+ }
875
+ response_data = self.api_client.call_api(
876
+ *_param,
877
+ _request_timeout=_request_timeout
878
+ )
879
+ response_data.read()
880
+ return self.api_client.response_deserialize(
881
+ response_data=response_data,
882
+ response_types_map=_response_types_map,
883
+ ).data
884
+
885
+
886
+ @validate_call
887
+ def post_events_webhook_with_http_info(
888
+ self,
889
+ _request_timeout: Union[
890
+ None,
891
+ Annotated[StrictFloat, Field(gt=0)],
892
+ Tuple[
893
+ Annotated[StrictFloat, Field(gt=0)],
894
+ Annotated[StrictFloat, Field(gt=0)]
895
+ ]
896
+ ] = None,
897
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
898
+ _content_type: Optional[StrictStr] = None,
899
+ _headers: Optional[Dict[StrictStr, Any]] = None,
900
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
901
+ ) -> ApiResponse[None]:
902
+ """Webhook for stripe service
903
+
904
+
905
+ :param _request_timeout: timeout setting for this request. If one
906
+ number provided, it will be total request
907
+ timeout. It can also be a pair (tuple) of
908
+ (connection, read) timeouts.
909
+ :type _request_timeout: int, tuple(int, int), optional
910
+ :param _request_auth: set to override the auth_settings for an a single
911
+ request; this effectively ignores the
912
+ authentication in the spec for a single request.
913
+ :type _request_auth: dict, optional
914
+ :param _content_type: force content-type for the request.
915
+ :type _content_type: str, Optional
916
+ :param _headers: set to override the headers for a single
917
+ request; this effectively ignores the headers
918
+ in the spec for a single request.
919
+ :type _headers: dict, optional
920
+ :param _host_index: set to override the host_index for a single
921
+ request; this effectively ignores the host_index
922
+ in the spec for a single request.
923
+ :type _host_index: int, optional
924
+ :return: Returns the result object.
925
+ """ # noqa: E501
926
+
927
+ _param = self._post_events_webhook_serialize(
928
+ _request_auth=_request_auth,
929
+ _content_type=_content_type,
930
+ _headers=_headers,
931
+ _host_index=_host_index
932
+ )
933
+
934
+ _response_types_map: Dict[str, Optional[str]] = {
935
+ '200': None,
936
+ }
937
+ response_data = self.api_client.call_api(
938
+ *_param,
939
+ _request_timeout=_request_timeout
940
+ )
941
+ response_data.read()
942
+ return self.api_client.response_deserialize(
943
+ response_data=response_data,
944
+ response_types_map=_response_types_map,
945
+ )
946
+
947
+
948
+ @validate_call
949
+ def post_events_webhook_without_preload_content(
950
+ self,
951
+ _request_timeout: Union[
952
+ None,
953
+ Annotated[StrictFloat, Field(gt=0)],
954
+ Tuple[
955
+ Annotated[StrictFloat, Field(gt=0)],
956
+ Annotated[StrictFloat, Field(gt=0)]
957
+ ]
958
+ ] = None,
959
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
960
+ _content_type: Optional[StrictStr] = None,
961
+ _headers: Optional[Dict[StrictStr, Any]] = None,
962
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
963
+ ) -> RESTResponseType:
964
+ """Webhook for stripe service
965
+
966
+
967
+ :param _request_timeout: timeout setting for this request. If one
968
+ number provided, it will be total request
969
+ timeout. It can also be a pair (tuple) of
970
+ (connection, read) timeouts.
971
+ :type _request_timeout: int, tuple(int, int), optional
972
+ :param _request_auth: set to override the auth_settings for an a single
973
+ request; this effectively ignores the
974
+ authentication in the spec for a single request.
975
+ :type _request_auth: dict, optional
976
+ :param _content_type: force content-type for the request.
977
+ :type _content_type: str, Optional
978
+ :param _headers: set to override the headers for a single
979
+ request; this effectively ignores the headers
980
+ in the spec for a single request.
981
+ :type _headers: dict, optional
982
+ :param _host_index: set to override the host_index for a single
983
+ request; this effectively ignores the host_index
984
+ in the spec for a single request.
985
+ :type _host_index: int, optional
986
+ :return: Returns the result object.
987
+ """ # noqa: E501
988
+
989
+ _param = self._post_events_webhook_serialize(
990
+ _request_auth=_request_auth,
991
+ _content_type=_content_type,
992
+ _headers=_headers,
993
+ _host_index=_host_index
994
+ )
995
+
996
+ _response_types_map: Dict[str, Optional[str]] = {
997
+ '200': None,
998
+ }
999
+ response_data = self.api_client.call_api(
1000
+ *_param,
1001
+ _request_timeout=_request_timeout
1002
+ )
1003
+ return response_data.response
1004
+
1005
+
1006
+ def _post_events_webhook_serialize(
1007
+ self,
1008
+ _request_auth,
1009
+ _content_type,
1010
+ _headers,
1011
+ _host_index,
1012
+ ) -> RequestSerialized:
1013
+
1014
+ _host = None
1015
+
1016
+ _collection_formats: Dict[str, str] = {
1017
+ }
1018
+
1019
+ _path_params: Dict[str, str] = {}
1020
+ _query_params: List[Tuple[str, str]] = []
1021
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1022
+ _form_params: List[Tuple[str, str]] = []
1023
+ _files: Dict[
1024
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1025
+ ] = {}
1026
+ _body_params: Optional[bytes] = None
1027
+
1028
+ # process the path parameters
1029
+ # process the query parameters
1030
+ # process the header parameters
1031
+ # process the form parameters
1032
+ # process the body parameter
1033
+
1034
+
1035
+
1036
+
1037
+ # authentication setting
1038
+ _auth_settings: List[str] = [
1039
+ 'QAnswer-Api-Key',
1040
+ 'Bearer'
1041
+ ]
1042
+
1043
+ return self.api_client.param_serialize(
1044
+ method='POST',
1045
+ resource_path='/api/payment/stripe_webhooks',
1046
+ path_params=_path_params,
1047
+ query_params=_query_params,
1048
+ header_params=_header_params,
1049
+ body=_body_params,
1050
+ post_params=_form_params,
1051
+ files=_files,
1052
+ auth_settings=_auth_settings,
1053
+ collection_formats=_collection_formats,
1054
+ _host=_host,
1055
+ _request_auth=_request_auth
1056
+ )
1057
+
1058
+
1059
+
1060
+
1061
+ @validate_call
1062
+ def pricing_plans(
1063
+ self,
1064
+ _request_timeout: Union[
1065
+ None,
1066
+ Annotated[StrictFloat, Field(gt=0)],
1067
+ Tuple[
1068
+ Annotated[StrictFloat, Field(gt=0)],
1069
+ Annotated[StrictFloat, Field(gt=0)]
1070
+ ]
1071
+ ] = None,
1072
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1073
+ _content_type: Optional[StrictStr] = None,
1074
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1075
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1076
+ ) -> List[Plan]:
1077
+ """List all available plans
1078
+
1079
+
1080
+ :param _request_timeout: timeout setting for this request. If one
1081
+ number provided, it will be total request
1082
+ timeout. It can also be a pair (tuple) of
1083
+ (connection, read) timeouts.
1084
+ :type _request_timeout: int, tuple(int, int), optional
1085
+ :param _request_auth: set to override the auth_settings for an a single
1086
+ request; this effectively ignores the
1087
+ authentication in the spec for a single request.
1088
+ :type _request_auth: dict, optional
1089
+ :param _content_type: force content-type for the request.
1090
+ :type _content_type: str, Optional
1091
+ :param _headers: set to override the headers for a single
1092
+ request; this effectively ignores the headers
1093
+ in the spec for a single request.
1094
+ :type _headers: dict, optional
1095
+ :param _host_index: set to override the host_index for a single
1096
+ request; this effectively ignores the host_index
1097
+ in the spec for a single request.
1098
+ :type _host_index: int, optional
1099
+ :return: Returns the result object.
1100
+ """ # noqa: E501
1101
+
1102
+ _param = self._pricing_plans_serialize(
1103
+ _request_auth=_request_auth,
1104
+ _content_type=_content_type,
1105
+ _headers=_headers,
1106
+ _host_index=_host_index
1107
+ )
1108
+
1109
+ _response_types_map: Dict[str, Optional[str]] = {
1110
+ '200': "List[Plan]",
1111
+ }
1112
+ response_data = self.api_client.call_api(
1113
+ *_param,
1114
+ _request_timeout=_request_timeout
1115
+ )
1116
+ response_data.read()
1117
+ return self.api_client.response_deserialize(
1118
+ response_data=response_data,
1119
+ response_types_map=_response_types_map,
1120
+ ).data
1121
+
1122
+
1123
+ @validate_call
1124
+ def pricing_plans_with_http_info(
1125
+ self,
1126
+ _request_timeout: Union[
1127
+ None,
1128
+ Annotated[StrictFloat, Field(gt=0)],
1129
+ Tuple[
1130
+ Annotated[StrictFloat, Field(gt=0)],
1131
+ Annotated[StrictFloat, Field(gt=0)]
1132
+ ]
1133
+ ] = None,
1134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1135
+ _content_type: Optional[StrictStr] = None,
1136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1138
+ ) -> ApiResponse[List[Plan]]:
1139
+ """List all available plans
1140
+
1141
+
1142
+ :param _request_timeout: timeout setting for this request. If one
1143
+ number provided, it will be total request
1144
+ timeout. It can also be a pair (tuple) of
1145
+ (connection, read) timeouts.
1146
+ :type _request_timeout: int, tuple(int, int), optional
1147
+ :param _request_auth: set to override the auth_settings for an a single
1148
+ request; this effectively ignores the
1149
+ authentication in the spec for a single request.
1150
+ :type _request_auth: dict, optional
1151
+ :param _content_type: force content-type for the request.
1152
+ :type _content_type: str, Optional
1153
+ :param _headers: set to override the headers for a single
1154
+ request; this effectively ignores the headers
1155
+ in the spec for a single request.
1156
+ :type _headers: dict, optional
1157
+ :param _host_index: set to override the host_index for a single
1158
+ request; this effectively ignores the host_index
1159
+ in the spec for a single request.
1160
+ :type _host_index: int, optional
1161
+ :return: Returns the result object.
1162
+ """ # noqa: E501
1163
+
1164
+ _param = self._pricing_plans_serialize(
1165
+ _request_auth=_request_auth,
1166
+ _content_type=_content_type,
1167
+ _headers=_headers,
1168
+ _host_index=_host_index
1169
+ )
1170
+
1171
+ _response_types_map: Dict[str, Optional[str]] = {
1172
+ '200': "List[Plan]",
1173
+ }
1174
+ response_data = self.api_client.call_api(
1175
+ *_param,
1176
+ _request_timeout=_request_timeout
1177
+ )
1178
+ response_data.read()
1179
+ return self.api_client.response_deserialize(
1180
+ response_data=response_data,
1181
+ response_types_map=_response_types_map,
1182
+ )
1183
+
1184
+
1185
+ @validate_call
1186
+ def pricing_plans_without_preload_content(
1187
+ self,
1188
+ _request_timeout: Union[
1189
+ None,
1190
+ Annotated[StrictFloat, Field(gt=0)],
1191
+ Tuple[
1192
+ Annotated[StrictFloat, Field(gt=0)],
1193
+ Annotated[StrictFloat, Field(gt=0)]
1194
+ ]
1195
+ ] = None,
1196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1197
+ _content_type: Optional[StrictStr] = None,
1198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1200
+ ) -> RESTResponseType:
1201
+ """List all available plans
1202
+
1203
+
1204
+ :param _request_timeout: timeout setting for this request. If one
1205
+ number provided, it will be total request
1206
+ timeout. It can also be a pair (tuple) of
1207
+ (connection, read) timeouts.
1208
+ :type _request_timeout: int, tuple(int, int), optional
1209
+ :param _request_auth: set to override the auth_settings for an a single
1210
+ request; this effectively ignores the
1211
+ authentication in the spec for a single request.
1212
+ :type _request_auth: dict, optional
1213
+ :param _content_type: force content-type for the request.
1214
+ :type _content_type: str, Optional
1215
+ :param _headers: set to override the headers for a single
1216
+ request; this effectively ignores the headers
1217
+ in the spec for a single request.
1218
+ :type _headers: dict, optional
1219
+ :param _host_index: set to override the host_index for a single
1220
+ request; this effectively ignores the host_index
1221
+ in the spec for a single request.
1222
+ :type _host_index: int, optional
1223
+ :return: Returns the result object.
1224
+ """ # noqa: E501
1225
+
1226
+ _param = self._pricing_plans_serialize(
1227
+ _request_auth=_request_auth,
1228
+ _content_type=_content_type,
1229
+ _headers=_headers,
1230
+ _host_index=_host_index
1231
+ )
1232
+
1233
+ _response_types_map: Dict[str, Optional[str]] = {
1234
+ '200': "List[Plan]",
1235
+ }
1236
+ response_data = self.api_client.call_api(
1237
+ *_param,
1238
+ _request_timeout=_request_timeout
1239
+ )
1240
+ return response_data.response
1241
+
1242
+
1243
+ def _pricing_plans_serialize(
1244
+ self,
1245
+ _request_auth,
1246
+ _content_type,
1247
+ _headers,
1248
+ _host_index,
1249
+ ) -> RequestSerialized:
1250
+
1251
+ _host = None
1252
+
1253
+ _collection_formats: Dict[str, str] = {
1254
+ }
1255
+
1256
+ _path_params: Dict[str, str] = {}
1257
+ _query_params: List[Tuple[str, str]] = []
1258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1259
+ _form_params: List[Tuple[str, str]] = []
1260
+ _files: Dict[
1261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1262
+ ] = {}
1263
+ _body_params: Optional[bytes] = None
1264
+
1265
+ # process the path parameters
1266
+ # process the query parameters
1267
+ # process the header parameters
1268
+ # process the form parameters
1269
+ # process the body parameter
1270
+
1271
+
1272
+ # set the HTTP header `Accept`
1273
+ if 'Accept' not in _header_params:
1274
+ _header_params['Accept'] = self.api_client.select_header_accept(
1275
+ [
1276
+ '*/*'
1277
+ ]
1278
+ )
1279
+
1280
+
1281
+ # authentication setting
1282
+ _auth_settings: List[str] = [
1283
+ 'QAnswer-Api-Key',
1284
+ 'Bearer'
1285
+ ]
1286
+
1287
+ return self.api_client.param_serialize(
1288
+ method='GET',
1289
+ resource_path='/api/payment/plans',
1290
+ path_params=_path_params,
1291
+ query_params=_query_params,
1292
+ header_params=_header_params,
1293
+ body=_body_params,
1294
+ post_params=_form_params,
1295
+ files=_files,
1296
+ auth_settings=_auth_settings,
1297
+ collection_formats=_collection_formats,
1298
+ _host=_host,
1299
+ _request_auth=_request_auth
1300
+ )
1301
+
1302
+
1303
+
1304
+
1305
+ @validate_call
1306
+ def subscription(
1307
+ self,
1308
+ _request_timeout: Union[
1309
+ None,
1310
+ Annotated[StrictFloat, Field(gt=0)],
1311
+ Tuple[
1312
+ Annotated[StrictFloat, Field(gt=0)],
1313
+ Annotated[StrictFloat, Field(gt=0)]
1314
+ ]
1315
+ ] = None,
1316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1317
+ _content_type: Optional[StrictStr] = None,
1318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1320
+ ) -> Plan:
1321
+ """Retrieves the current plan of the user
1322
+
1323
+
1324
+ :param _request_timeout: timeout setting for this request. If one
1325
+ number provided, it will be total request
1326
+ timeout. It can also be a pair (tuple) of
1327
+ (connection, read) timeouts.
1328
+ :type _request_timeout: int, tuple(int, int), optional
1329
+ :param _request_auth: set to override the auth_settings for an a single
1330
+ request; this effectively ignores the
1331
+ authentication in the spec for a single request.
1332
+ :type _request_auth: dict, optional
1333
+ :param _content_type: force content-type for the request.
1334
+ :type _content_type: str, Optional
1335
+ :param _headers: set to override the headers for a single
1336
+ request; this effectively ignores the headers
1337
+ in the spec for a single request.
1338
+ :type _headers: dict, optional
1339
+ :param _host_index: set to override the host_index for a single
1340
+ request; this effectively ignores the host_index
1341
+ in the spec for a single request.
1342
+ :type _host_index: int, optional
1343
+ :return: Returns the result object.
1344
+ """ # noqa: E501
1345
+
1346
+ _param = self._subscription_serialize(
1347
+ _request_auth=_request_auth,
1348
+ _content_type=_content_type,
1349
+ _headers=_headers,
1350
+ _host_index=_host_index
1351
+ )
1352
+
1353
+ _response_types_map: Dict[str, Optional[str]] = {
1354
+ '200': "Plan",
1355
+ }
1356
+ response_data = self.api_client.call_api(
1357
+ *_param,
1358
+ _request_timeout=_request_timeout
1359
+ )
1360
+ response_data.read()
1361
+ return self.api_client.response_deserialize(
1362
+ response_data=response_data,
1363
+ response_types_map=_response_types_map,
1364
+ ).data
1365
+
1366
+
1367
+ @validate_call
1368
+ def subscription_with_http_info(
1369
+ self,
1370
+ _request_timeout: Union[
1371
+ None,
1372
+ Annotated[StrictFloat, Field(gt=0)],
1373
+ Tuple[
1374
+ Annotated[StrictFloat, Field(gt=0)],
1375
+ Annotated[StrictFloat, Field(gt=0)]
1376
+ ]
1377
+ ] = None,
1378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1379
+ _content_type: Optional[StrictStr] = None,
1380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1382
+ ) -> ApiResponse[Plan]:
1383
+ """Retrieves the current plan of the user
1384
+
1385
+
1386
+ :param _request_timeout: timeout setting for this request. If one
1387
+ number provided, it will be total request
1388
+ timeout. It can also be a pair (tuple) of
1389
+ (connection, read) timeouts.
1390
+ :type _request_timeout: int, tuple(int, int), optional
1391
+ :param _request_auth: set to override the auth_settings for an a single
1392
+ request; this effectively ignores the
1393
+ authentication in the spec for a single request.
1394
+ :type _request_auth: dict, optional
1395
+ :param _content_type: force content-type for the request.
1396
+ :type _content_type: str, Optional
1397
+ :param _headers: set to override the headers for a single
1398
+ request; this effectively ignores the headers
1399
+ in the spec for a single request.
1400
+ :type _headers: dict, optional
1401
+ :param _host_index: set to override the host_index for a single
1402
+ request; this effectively ignores the host_index
1403
+ in the spec for a single request.
1404
+ :type _host_index: int, optional
1405
+ :return: Returns the result object.
1406
+ """ # noqa: E501
1407
+
1408
+ _param = self._subscription_serialize(
1409
+ _request_auth=_request_auth,
1410
+ _content_type=_content_type,
1411
+ _headers=_headers,
1412
+ _host_index=_host_index
1413
+ )
1414
+
1415
+ _response_types_map: Dict[str, Optional[str]] = {
1416
+ '200': "Plan",
1417
+ }
1418
+ response_data = self.api_client.call_api(
1419
+ *_param,
1420
+ _request_timeout=_request_timeout
1421
+ )
1422
+ response_data.read()
1423
+ return self.api_client.response_deserialize(
1424
+ response_data=response_data,
1425
+ response_types_map=_response_types_map,
1426
+ )
1427
+
1428
+
1429
+ @validate_call
1430
+ def subscription_without_preload_content(
1431
+ self,
1432
+ _request_timeout: Union[
1433
+ None,
1434
+ Annotated[StrictFloat, Field(gt=0)],
1435
+ Tuple[
1436
+ Annotated[StrictFloat, Field(gt=0)],
1437
+ Annotated[StrictFloat, Field(gt=0)]
1438
+ ]
1439
+ ] = None,
1440
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1441
+ _content_type: Optional[StrictStr] = None,
1442
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1443
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1444
+ ) -> RESTResponseType:
1445
+ """Retrieves the current plan of the user
1446
+
1447
+
1448
+ :param _request_timeout: timeout setting for this request. If one
1449
+ number provided, it will be total request
1450
+ timeout. It can also be a pair (tuple) of
1451
+ (connection, read) timeouts.
1452
+ :type _request_timeout: int, tuple(int, int), optional
1453
+ :param _request_auth: set to override the auth_settings for an a single
1454
+ request; this effectively ignores the
1455
+ authentication in the spec for a single request.
1456
+ :type _request_auth: dict, optional
1457
+ :param _content_type: force content-type for the request.
1458
+ :type _content_type: str, Optional
1459
+ :param _headers: set to override the headers for a single
1460
+ request; this effectively ignores the headers
1461
+ in the spec for a single request.
1462
+ :type _headers: dict, optional
1463
+ :param _host_index: set to override the host_index for a single
1464
+ request; this effectively ignores the host_index
1465
+ in the spec for a single request.
1466
+ :type _host_index: int, optional
1467
+ :return: Returns the result object.
1468
+ """ # noqa: E501
1469
+
1470
+ _param = self._subscription_serialize(
1471
+ _request_auth=_request_auth,
1472
+ _content_type=_content_type,
1473
+ _headers=_headers,
1474
+ _host_index=_host_index
1475
+ )
1476
+
1477
+ _response_types_map: Dict[str, Optional[str]] = {
1478
+ '200': "Plan",
1479
+ }
1480
+ response_data = self.api_client.call_api(
1481
+ *_param,
1482
+ _request_timeout=_request_timeout
1483
+ )
1484
+ return response_data.response
1485
+
1486
+
1487
+ def _subscription_serialize(
1488
+ self,
1489
+ _request_auth,
1490
+ _content_type,
1491
+ _headers,
1492
+ _host_index,
1493
+ ) -> RequestSerialized:
1494
+
1495
+ _host = None
1496
+
1497
+ _collection_formats: Dict[str, str] = {
1498
+ }
1499
+
1500
+ _path_params: Dict[str, str] = {}
1501
+ _query_params: List[Tuple[str, str]] = []
1502
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1503
+ _form_params: List[Tuple[str, str]] = []
1504
+ _files: Dict[
1505
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1506
+ ] = {}
1507
+ _body_params: Optional[bytes] = None
1508
+
1509
+ # process the path parameters
1510
+ # process the query parameters
1511
+ # process the header parameters
1512
+ # process the form parameters
1513
+ # process the body parameter
1514
+
1515
+
1516
+ # set the HTTP header `Accept`
1517
+ if 'Accept' not in _header_params:
1518
+ _header_params['Accept'] = self.api_client.select_header_accept(
1519
+ [
1520
+ '*/*'
1521
+ ]
1522
+ )
1523
+
1524
+
1525
+ # authentication setting
1526
+ _auth_settings: List[str] = [
1527
+ 'QAnswer-Api-Key',
1528
+ 'Bearer'
1529
+ ]
1530
+
1531
+ return self.api_client.param_serialize(
1532
+ method='GET',
1533
+ resource_path='/api/payment/plan',
1534
+ path_params=_path_params,
1535
+ query_params=_query_params,
1536
+ header_params=_header_params,
1537
+ body=_body_params,
1538
+ post_params=_form_params,
1539
+ files=_files,
1540
+ auth_settings=_auth_settings,
1541
+ collection_formats=_collection_formats,
1542
+ _host=_host,
1543
+ _request_auth=_request_auth
1544
+ )
1545
+
1546
+